How to Set Up Visual Studio Code to Program the Pi Pico (Windows)

preview_player
Показать описание
This video covers how to set up a windows machine with the required toolchain to begin programming the brand-new Raspberry Pi Pico. The toolchain has been installed and Visual Studio Code has been set up to write C code, build it and upload it to the Pico. Future videos will explore how to write your own code to the Raspberry Pi Pico, stay tuned for them!

The links for the required software is here:

The commands to download the pico SDK and example projects are:
git submodule update –init

To build the example projects from the command line use the following:
cmake -G "NMake Makefiles" ..
nmake

If this video helped you, please consider leaving a like and subscribing, thank you!

-- Equipment I use regularly --
The following links are affiliate links where I may make a small percentage on qualifying sales through these links. Use the respective UK or US links listed.

All videos and tutorials on this channel and mentioned websites are for educational purposes only.
Рекомендации по теме
Комментарии
Автор

You seem to be the only youtuber, seriously looking at C as a serious alternative ... Thank You!!! I wish you luck with your channel.

VisualBRON
Автор

thanks! this really helped me set up a develop environment for the pi Pico;
2 things that took me some time (because I was ignorant or to fast), that might help others prevent this:
- start developer command line before the "nmake" command
- start code from the developer command line or else you will get the error:
"Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable.
Error: No usable generator found."

(Hope this prevents you guys from google-ing the living **** before realizing developer command line is really necessary)

JonathanvanRijn
Автор

You deserve far more than 32 subscribers... well done, thanks for this gold mine of info.

cthoadmin
Автор

a $4 micro controller shouldn't be this hard to setup. The whole point of pico is easy projects...

depressedyouth
Автор

Thank you for this. FYI, three and a half years later, it is still mostly relevant, only Visual Studio Tools are dated 2022, not 2019. The only difference I noted was that going into VS code from the build directory left it untrusted, and so I couldn't configure the CMake tools until I had explicitly opened the C:\Pico\pico-examples folder, then it asked if I trusted the developers, ... and when I said "yes" it then enabled the CMake tools extensions. The only thing I have not been able to figure yet is what the IncludePath settings should be to get the VS Code not to red-squiggle all the includes of pico/*.h and hardware/*.h etc. Thank you for making this video, as I would not have been inclined to do this otherwise, ... It's breathtaking how complex they have made editing code, ...

eternaldoorman
Автор

An excellent walkthrough of a task that should be a lot easier. Thank you!!. One minor comment - it is correct in video but in text above: 'git submodule update –init' should be 'git submodule update --init' i.e. 2 dashes - I think that corrected to an em dash? (its only an issue if you copy and paste). But thank you again a superb video and I am looking forward to the rest.

hornorama
Автор

This is a vaulable resource that I turn to on every installation of the code chain.

djencore
Автор

Well Done! The clarity and conciseness of this video is exemplary. Thank You!!

vbrucehunt
Автор

The Arm GCC Compiler link points to a page that is now deprecated. Thie link on this deprecated page to the non deprectated toolchain downloads page is nothing like the one you used, unfortunately. A hint as to which toolchain I need would be very useful.

dave_lawrence
Автор

I just got myself a pico, and this video was really useful to set it up! Thank you! Are you going to be making videos on different projects for the pico?

sebastienschille
Автор

Thank you so much! I have 2 Pico in my drawer for more than 6 months, and while trying to use tinyusb with it, I had to go through your video to setup my environment for it. It was flawless. Lots of love! ❤

shadabmozaffar
Автор

This is a most useful video, thank you for adding it. A colleague and I went through the install and both ended up with the same build error. This is at the VS Code stage. We found the the only way to get the build to work was to delete the folder "CMakeFiles" prior to each build. The build time for the "blink" project on my average PC is over 1 minute. There are fatal errors in NMAKE but a working hex file is created. The errors are: "fatal error U1033: syntax error : ':' unexpected", "fatal error U1077" & return code '0x2'. I hope this helps.

simonquin
Автор

Way easier watching this that reading the official setup docs. Got it working easy on Windows 7

gorbulas
Автор

Thanks for the great video. The Visual Studio screens and in the are very difficult for my old eyes to see. It would have been better if the "Light" theme were used instead of the default Dark theme... The command windows were also very dark and hard to see...

Anyways. I finally got it working with your great directions. THANKS !!!

montpierce
Автор

Nice Tutorial. I did a litte addition, I wrote a little script that checks for the VID and PID for the pico, and opens the port with a bautrate of 1200, if its not a new one, then check for the files, on the newly added drive, that are always in the pico when connected as ready to install and copy and paste the files automatically.

zbugi
Автор

Hello. I have the error like that when i try to build:
"Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable."
Please help me to fix this.
Thank you

embeddeddevzone
Автор

I spent two full days failing at this. I try your method tonight.

Malcrom
Автор

Hello, When I installed this on another windows10 computer I had found that the latest and Python(python-3.9.6-amd64) programs(date, 15.07.2021) have a problem with building the build files in pico-examples(in both the "Developer Command Prompt" and in "Visual Studio Code") and a workaround is to install the same version of programs as in this video(version cmake-3.19.3-win64-x64 and python-3.9.1-amd64). This fixed the problem.

di
Автор

Wow! I hope this process gets simplified. It will scare off many.

kenwallace
Автор

This is an awesome resource for getting up and running

benmorris