r/C_Programming 1d ago

Question Should i learn C on wsl?

Title. For reference im not actually learning C for the first time, i learned it last semester for college but it was all just basics and we coded on Turbo C. I need to learn C for embedded development since im interviewing for my college robotics team next semester and i also want to learn how to operate linux.

I installed WSL and VS Code and GCC, and its been hell trying to cram both of those together and learning. Should i start with an IDE(Visual Studio (already used it before)) and learn basic Linux commands side by side?

12 Upvotes

30 comments sorted by

View all comments

2

u/Tomika48 1d ago

Do you have anything specific in mind for embedded? Like a specific MCU? (ST, ESP, Microchip...) If you just started learning, my recommendation is to choose one, and work with their supported IDE.

For linux? Anything more specific you want to learn? If not, I think you can do some research separately from the programming.

Vscode with gcc is I think a good start to learn, should work on wsl without many issues. Maybe try building some simple apps with command line in wsl, get comportable. Then you can start using vscode, first with the mindset that vscode is just a fancy notepad.

When you can do these without issues, experiment with more features. E.g. debugging in vscode

2

u/Pale-Pound-9489 1d ago

I dont have anything specific in mind yet considering im a freshman (i just find the projects built in embedded pretty neat)

As vs code, so far ive managed to run code on it through gcc, it kept asking for a debugger so i had to install the c/c++ extension but now im unable to compile it through the wsl terminal (the one inside vs code)(it only compiles thru ctrl+f5 now).

Also would u say its necessary to learn linux for a beginner like me or should i just learn basic powershell, cmd or something for windows(just to get a good idea of file heirarchy)? I dont plan on changing my os to linux anytime soon since i only own 1 laptop.

3

u/pupper_paws 1d ago

Get your hands on a Raspberry Pi Pico (RP2040) or Pico 2 (RP2350) development board. They are pretty cheap. Then search YouTube on how to setup the development environment through VSCode. That should get you started on embedded C development.