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

Поделиться
HTML-код
  • Опубликовано: 22 янв 2025

Комментарии • 284

  • @VisualBRON
    @VisualBRON 4 года назад +50

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

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  4 года назад +22

      Thanks Mark! I do feel like people are jumping on the MicroPython train to begin with. I will eventually cover both on this channel but I am far more comfortable with C and think C is a better option in terms of performance on microcontrollers. Glad to see that people are interested in the content here!

    • @sammyk7024
      @sammyk7024 3 года назад

      @@LearnEmbeddedSystems earned a subscriber. brilliant tutorial. thanks mate!

  • @JonathanvanRijn
    @JonathanvanRijn 4 года назад +23

    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)

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  4 года назад

      Glad to hear this video helped! Thanks for the tips for others

    • @digi533
      @digi533 4 года назад

      Hello!
      I have the same problem, can u teach me step-by-step that I can programming C/Cpp for the Pico. Sorry for my poor knowledge
      I do that all but "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."

    • @JonathanvanRijn
      @JonathanvanRijn 4 года назад +10

      ​@@digi533
      This can be solved (typically) in 2 ways:
      *Option A: *
      (as shown in this video from 7:47)
      1. Searching Windows start menu for *Developer Command Prompt for VS 2019* under *Visual Studio 2019* folder
      2. type *code*, then press *enter* to launch visual studio code from the developer command prompt (which is different from normal CMD.exe) and build again.
      *Option B: *
      Guessing you have windows 10:
      1. From the desktop, right-click the very bottom-left corner of the screen (windows logo) to get the Power User Task Menu.
      2. From the Power User Task Menu, click *System*.
      3. In the Settings window, scroll down to the Related settings section and click the *System info* link.
      4. In the System window, click the *Advanced system settings* link in the left navigation pane.
      5. In the System Properties window, click the *Advanced* tab, then click the *Environment Variables* button near the bottom of that tab.
      6. In the Environment Variables window (pictured below), highlight the *Path* variable in the *System variables* section and click the Edit button.
      7. Then click *New*
      8. Then add the link to the folder with nmake: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64" (or something like that, depending on your installation, try to browse to the MSVC and look what version you have installed)
      9. Restart Code and try building again
      from: www.computerhope.com/issues/ch000549.htm

    • @digi533
      @digi533 4 года назад +1

      @@JonathanvanRijn thank u, it works !!!!!!!

    • @dave_dennis
      @dave_dennis 4 года назад

      @@JonathanvanRijn line #9 is confusing me. Am I starting CODE when I open the developer command prompt? If not I don't know what this line means. Also Is a reboot required for this additional path to be implemented? Or is it in effect once the environment variables dialog is closed?

  • @cthoadmin7458
    @cthoadmin7458 4 года назад +9

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

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  4 года назад

      Thank you! Glad I could be of help :)

    • @cthoadmin7458
      @cthoadmin7458 4 года назад

      @@LearnEmbeddedSystems do you know if you can use free RTOS or other real time operating systems on the Pico like you can on the ESP32?

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  4 года назад

      I would expect a port of freeRTOS to be around the corner (if there isn't one already!), the RP2040 chip is well suited to use in an RTOS environment so many people will be interested in getting it working. I don't think freeRTOS will require much modification for it to function on the Pico. I will be sure to make a video on it once a port has been developed, or see if I can get one working.

    • @vano__
      @vano__ 2 года назад

      you got your revenge haha

  • @eternaldoorman5228
    @eternaldoorman5228 Год назад +4

    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, ...

  • @dave_lawrence
    @dave_lawrence 2 года назад +3

    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.

  • @rizwanmadni2805
    @rizwanmadni2805 Год назад

    7:11, I press the bootsel button and power pico pi, but I don't get the RPI drive.
    What might be the possible issues?

  • @dj1encore
    @dj1encore 2 года назад

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

  • @embeddeddevzone5605
    @embeddeddevzone5605 3 года назад +2

    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

  • @NOMOREPAM
    @NOMOREPAM Год назад

    At 8:21 VSC 2023 the way of entering path is now different from your video. I'm stuck. No way to set a value here.

  • @hornorama
    @hornorama 3 года назад +10

    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.

  • @simonquin7617
    @simonquin7617 3 года назад +3

    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.

  • @shadabmozaffar2996
    @shadabmozaffar2996 Год назад

    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! ❤

    • @mohammadrezamaulana28
      @mohammadrezamaulana28 Год назад

      I couldnt find the uf2 file after the build process
      did this happen to you?

  • @sebastienschille5546
    @sebastienschille5546 4 года назад +8

    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?

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  4 года назад +2

      That's the plan! Make sure you subscribe so you don't miss them!

    • @TuncayAyhan
      @TuncayAyhan 4 года назад

      @@LearnEmbeddedSystems Same here. At first I was like "Hell No, I'm not gonna do that. Gonna put the Pico in the drawer, but then I used the magic of PAUSING and i managed to get through it!
      EDIT: You should sync the talking part with your visual part. Because sometimes, it was out of sync. You talk to fast xD

  • @vbrucehunt8617
    @vbrucehunt8617 2 года назад +2

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

  • @gorbulas
    @gorbulas 2 года назад

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

  • @montpierce424
    @montpierce424 3 года назад +3

    Thanks for the great video. The Visual Studio screens and in the "getting-started-with-pico.pdf" 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 !!!

  • @di4241
    @di4241 3 года назад +1

    Hello, When I installed this on another windows10 computer I had found that the latest Cmake(cmake-3.21.0-windows-x86_640) 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.

  • @jearlblah5169
    @jearlblah5169 3 года назад +3

    what would you do differently to setup on mac?

  • @michaelmayfield3158
    @michaelmayfield3158 2 года назад +2

    I went through it twice and it doesn't build. Files are there in the pico-examples folder.
    D:\Pico\pico-examples\Build>cmake -G "NMake MakeFiles" ..
    CMake Error: Could not create named generator NMake MakeFiles

  • @arkaloz
    @arkaloz 7 месяцев назад

    Hi please keep in mind that you should launch visual studio code from the developer command prompt. I didn't do so and I had a lot of troubles.

  • @paulspark7287
    @paulspark7287 Год назад +1

    I added the "Nmake makefiles" in the CMake Tools -> Preferred Generators section.. so why do I see this when I open the pico-examples folder in VS Code?
    [main] Configuring project: pico-examples
    [main] Building folder: pico-examples
    [proc] Executing command: "C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\13.2 Rel1\bin\arm-none-eabi-gcc.exe" -v
    [main] 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.

    • @paulspark7287
      @paulspark7287 Год назад +1

      I fixed my problem by adding these lines to the VS Code settings.json file:
      "cmake.cmakePath": "C:\\Program Files\\CMake\\bin\\cmake.exe",
      "cmake.generator": "Visual Studio 16 2019",

  • @MatthewBendyna
    @MatthewBendyna 10 месяцев назад

    Is it important that the Visual Studio Code be version 2019? I installed 2022... At 50% after running nmake, there's some error message. NMAKE: fatal error U1077: '..\..\PIOASM\PIOASM.EXE -O... then a whole slew of other stuff. I think it was just Norton stopping something it shouldn't have that was a dependency but redoing the nmake command just results in it stopping at about 50% again.

  • @hisamezero3388
    @hisamezero3388 2 года назад

    Great video. The only video which was easy to follow!

  • @solasauto
    @solasauto 4 месяца назад

    Is there a similar setup video for linux systems somewhere? I'm a bit stuck and this did not translate.

  • @hounandanr9319
    @hounandanr9319 Год назад

    Hi, I could not setup. "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."
    I setup the settings.json as you mentioned - adding at the end. I setup the path to
    Any help on this?

  • @Malcrom1967
    @Malcrom1967 Год назад

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

  • @depressedyouth
    @depressedyouth 4 года назад +37

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

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  4 года назад +8

      I completely agree! Hopefully the whole process will be streamlined once the Arduino IDE officially supports the Pico.

    • @mezmerizer0266
      @mezmerizer0266 2 года назад +1

      @@LearnEmbeddedSystems over ayear later, and it's still impossible to do on the chromebook. The thing every school kid is supposed to have so they can experiement with this kind of easily affordable technology. It's shameful.

    • @FUNKLABOR_DL1LEP
      @FUNKLABOR_DL1LEP Год назад +1

      really? you won't pay near to nothing and the expectation is, to get a simple full idefor again ' nothing'? really?

    • @1257HANK
      @1257HANK 10 месяцев назад

      Funny that Particle Photon can set up “Visual Studio” by loading One Thing.
      Too bad New Photon costs $50.00!

  • @nagashreenb4763
    @nagashreenb4763 3 дня назад

    i am unable find the complete build in files what to do

  • @farouktilaoui7489
    @farouktilaoui7489 3 года назад +2

    When I tip cmake -G "NMake Makefiles".. in the developer show me a warning like this
    "CMake Warning:
    No source or binary directory provided. Both will be assumed to be the
    same as the current working directory, but note that this warning will
    become a fatal error in future CMake releases." so I need help to solve it

  • @berkayklc8636
    @berkayklc8636 Год назад

    I have done everything same. But the blink.uf2 just reboots the raspberry pi pico w. led doesn't flash. Does anyone have an idea?

  • @ExtantFrodo2
    @ExtantFrodo2 Год назад +2

    Why do you set the PICO_SDK_PATH TO "..\..\pico_sdk" rather than "C:\[whatever]\pico_sdk" ?

    • @shadabmozaffar2996
      @shadabmozaffar2996 Месяц назад

      You can set it like that also. It is just relative to cmake.

  • @wouchang
    @wouchang Год назад

    I need help there are no .uf2 files in any locations

  • @benmorris9925
    @benmorris9925 3 года назад

    This is an awesome resource for getting up and running

  • @dave_dennis
    @dave_dennis 3 года назад +2

    Well I have tried this for a second time. I got further this time. But mine fails during the nmake process. The first sign of a problem is when I get a Detecting C compliler ABI info - failed
    Also I notice when mine is checking for working C compiler: it is looking in /bin/Hostx64/x64/cl.exe while yours is looking in /bin/Hostx86/x86/cl.exe When mine looks in this x64 path it returns cl.exe - broken It is all down hill from there. :-(

  • @Art9240
    @Art9240 Год назад

    Is this the same as the other video with the "Windows Pico Installer"? I was just watching it yesterday for the first time and it was gone when I woke up.

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  Год назад +1

      This is the harder way but it should still work - I'm sorry the previous had a small error that I will try to correct and have back up shortly

  • @sansdomicileconnu
    @sansdomicileconnu 3 года назад

    it s very heavy toolchain specially microsoftbuild
    there is no alternatif more lightweight?

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  3 года назад +1

      I expect there will be when the arduino IDE supports the RP2040

  • @kenwallace6493
    @kenwallace6493 4 года назад +4

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

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  4 года назад +4

      Arduino has announced that they are working on supporting the Pico in their IDE, so I am sure it will be much more straightforward when they do!

  • @zbugi8537
    @zbugi8537 5 месяцев назад

    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.

  • @markwilliams5654
    @markwilliams5654 Год назад +1

    C:\Pico\pico-examples\build>cmake -G "NMake Makefiles" ..
    CMake Error at pico_sdk_import.cmake:63 (message):
    Directory 'C:/Pico/pico-examples/ ../ pico-sdk' not found
    Call Stack (most recent call first):
    CMakeLists.txt:4 (include)

  • @danieldc8841
    @danieldc8841 3 года назад +2

    Cheers for the video tutorial! This process currently feels quite convoluted, so I'm hoping it'll get simpler in time. Going to try to directly control a 64x64 LED matrix with the pico using C.

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  3 года назад

      It certainly is at the moment, but it should be better when support from the Arduino IDE comes out! Have fun with the LED matrix!

    • @bissonFamily
      @bissonFamily 2 года назад

      How did your project turn out? Did you use the PIO?

  • @nito8066
    @nito8066 Год назад

    hhey theres an error whenever i run git submodule update -init and it is error: pathspec '-init' did not match any file(s) known to git

    • @If0n702
      @If0n702 10 месяцев назад +1

      even though this comment is from a month ago Its 2 dashes

    • @nito8066
      @nito8066 10 месяцев назад

      @@If0n702 it has been so long that i had alredy dreamnt oh snorting 2 lines of cocaine

  • @albertovaglio2676
    @albertovaglio2676 2 года назад

    Hi I have a problem with developer command prompt, when I write the command "cmake -G "NMake Makefiles" .. " , it shows to me some problems: Compiler 'arm-none-eabi-gcc' not found, you can specify search path with
    "PICO_TOOLCHAIN_PATH". I've tried to fix this but I didn't succeed, can you please tell me how to solve this?

  • @StevenCookFX
    @StevenCookFX 6 месяцев назад

    NOTE: I have gotten this to work but the .uf2 files are not generated. Seems some type of setting/bug somewhere and there is no errors to point to a cause. :/

  • @mohammadrezamaulana28
    @mohammadrezamaulana28 Год назад

    I couldnt find the uf2 file after I did the build process
    Can anyone help with this issue?

  • @markbratcher9095
    @markbratcher9095 2 года назад

    cmake -G "NMake Makefiles" .. results in several errors. It seems to indicate that some environment variables are not set, such as CMAKE_C_COMPILER, etc...

  • @almostanengineer
    @almostanengineer 3 года назад +1

    Damn VS Studio Build tools takes a while to install, I've had 4 cups of tea so far, and I', 89% complete :o

    • @nextlifeonearth
      @nextlifeonearth 3 года назад

      It's way faster in wsl. Simply enable wsl, get your distro of choice, fetch the packages, fetch the git repo and done.

    • @almostanengineer
      @almostanengineer 3 года назад

      ​@@nextlifeonearth Honestly, I think it's more down to my 15+ year old computer and it's E5200 than not using the WSL

    • @nextlifeonearth
      @nextlifeonearth 3 года назад

      @@almostanengineer it takes ages on a top of the line computer today too, it's certainly not just your computer.
      But if you're on such an old computer I wouldn't even bother with Windows.

    • @almostanengineer
      @almostanengineer 3 года назад

      @@nextlifeonearth I 'bother' with windows because it has to run certain applications like Inventor, that are only avalible on Windows, and it's just easier to not have to dualboot to do this, and yes Inventor runs, just very very slowly.

    • @nextlifeonearth
      @nextlifeonearth 3 года назад +1

      @@almostanengineer it's kind of ironic how you run a $2k application on such an old computer.

  • @hilalkeles7832
    @hilalkeles7832 3 года назад

    Hey! Please help me. I did what you said. But in the last part vscode fails. Cmake can't find the way . Can't find which one to use. How can I fix ?

  • @jerryschull2122
    @jerryschull2122 3 года назад

    Very good. Really appreciate the detailed approach.

  • @LenPopp
    @LenPopp 2 года назад +1

    Thanks for this. I wrote down your instructions and it only came to 3.5 pages. :D
    For people who are daunted by the process, I recommend using the Arduino IDE to program the Pico - it's much easier to setup. But I want to learn the Pico SDK and this tutorial was a big help.

  • @captaincrunchcam5478
    @captaincrunchcam5478 Год назад

    I got Raspberry Pi Pico SDK version 1.3.0 (or later) required. Your version is. Any help on that

  • @bclarkca9113
    @bclarkca9113 3 года назад

    I have tried following your instructions to the letter, and encounter an error every time I run NMake. I get "CMakeFiles/hello_usb.dir/hello_usb.c.obj: No such file or directory". NMake then fails with a fatal error. There are some ASCII symbols next to the file path, which I suspect are the cause of the problem. However, I'm having trouble figuring out where the error might be coming from. Does anyone have any suggestions on where to find the list that CMake is running through?
    Edit: I seem to have solved the problem by downloading the version of CMake used in the video, rather than the current version.

    • @douggorgen
      @douggorgen 3 года назад +2

      You are correct, you need to downgrade Cmake to version 3.20.5. The latest version of Cmake adds a Byte Order Mark (BOM) to the beginning of the file (those funny ASCII symbols you saw). The compiler also added BOM support in its latest version, but apparently not in all cases.

  • @scottinharwood
    @scottinharwood 3 года назад

    Sorry, Developer Command Prompt does not come up in Start Menu, what am I missing??? Now I am stuck

  • @dindafadhya8028
    @dindafadhya8028 2 года назад

    thankyou for the video, but i have a question. what's the python for?

  • @princebanini
    @princebanini 3 года назад

    Hello there....i set up everything as stated in the video and my rp2040 board led blinks. However the VS code part of the video doesn't build.
    This is the error i get.
    [main] 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.

    • @princebanini
      @princebanini 3 года назад

      Please note that i put the "NMake Makefiles" in the prefered generator json file as stated in the video

    • @princebanini
      @princebanini 3 года назад

      I found the solution and it is...Don't open VS Code from the start menu/desktop icon...
      Rather open developer command prompt for visual studio, type "code" and press enter
      The VS Code opened this way loads with all the settings and configs of the pico....so there's no longer errors.

  • @nick60444
    @nick60444 Месяц назад

    Anyone know why the build could be taking so long? Both in Visual Studio Code and on the cmd, it takes me > 30 minutes to build the project. My laptop is old but it's running windows 10.
    Laptop details:
    HP ENVY Notebook (from around 2015ish?)
    Processor: Intel Core i5
    RAM: 8GB

  • @jugnu361
    @jugnu361 3 года назад +2

    Please make a video to demo how to debug pico
    Either by picoprobe or using ST Link
    Thank You

    • @JonathanvanRijn
      @JonathanvanRijn 3 года назад +1

      I agree!, would really like to see that on Windows, if possible =)

  • @aminafoxdye
    @aminafoxdye 3 года назад +2

    Hi- thanks for the video! I'm having issues with building the Pico examples with Cmake after having configured the environment and preferred generator settings for Cmake Tools in VSCode. I get "Unable to determine what CMake generator to use." Configure environment has been set to PICO_SDK_PATH and ..\..\pico-sdk and the preferred generator has been set to "NMake Makefiles"... is there something else I'm missing?

    • @kbobiller
      @kbobiller 3 года назад +3

      I had this; what fixed it for me was closing VS Code (I'd opened it from the taskbar) and opening it from the VS Developer prompt by typing "code"; then it worked and I could build from VS Code;
      also check
      Jonathan van Rijn's solution below ref adding the location of nmake.exe to the path, then VS Code can be launched from outside the developer prompt.

    • @aminafoxdye
      @aminafoxdye 3 года назад

      @@kbobiller Ah, I see- I also opened VS Code from the taskbar and didn't realize that opening it from the command prompt would make a difference. That seemed to work, thanks. :) However, I'm now getting a syntax error while trying to build pico-examples: "[build] blink\CMakeFiles\blink.dir\compiler_depend.make(4) : fatal error U1033: syntax error : ':' unexpected". Looking in that file, there's a comment in it that says "DO NOT EDIT!", and I'm not sure where I'd start even if I were to edit it. Perhaps I configured the extension settings incorrectly...?

    • @antoniojohnson7693
      @antoniojohnson7693 3 года назад

      @@aminafoxdye I have this same error. No clue what it is talking about.

    • @daviddoidge1252
      @daviddoidge1252 3 года назад

      @@aminafoxdye Not sure if it will work for you but I deleted the folders from the "build" folder that were created in terminal earlier i.e. "blink" "clocks" "cmake" "divider" ..... "watchdog" etc but left all other files/folders inside the "build" folder alone ("CMakeFiles" "elf2uf2" etc) clicked on build and it ran with no errors

    • @aminafoxdye
      @aminafoxdye 3 года назад

      @@daviddoidge1252 That worked for me during the initial build in VSC- however subsequent builds beyond that produce the same syntax error I was getting before.

  • @danman32
    @danman32 Год назад

    SDK install now takes care of a lot of the install process for you, including shortcuts in the Start menu to initialize the development environment and launch VSC
    But then having everything done automatically for you has you miss the underlying details of how it is put together, so you can customize, fix issues when things go wrong, etc.

  • @nikolatotev
    @nikolatotev 3 года назад

    Does anyone know how to resolve the include errors? They pop up when you try to edit / make new code. The autocomplete fails to detect the headers from the sdk.

  • @AzamFahmy
    @AzamFahmy 3 года назад

    If you get the error "blink\CMakeFiles\blink.dir\compiler_depend.make(4) : fatal error U1033: syntax error : ':' unexpected" Installing Cmake 19 instead of Cmake 20 worked for me. I also uninstalled and re-installed Visual Studio. Not sure if that had an effect.

  • @petersen285
    @petersen285 3 года назад

    So my build chain works and I can build the pico examples without an issue. Copied the blink code to my pico and it works. The issue I'm having is in visual studio code, I've set up the preferred generators and added the PICO_SDK_PATH, but I keep getting the following error: "Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json". Any assistance will be much appreciated. Thanks

  • @nathvandyk5213
    @nathvandyk5213 2 года назад

    how do import library's

  • @marknehrkorn2523
    @marknehrkorn2523 3 года назад +1

    Unfortunitly this did not work for me...as usual at many steps it's different and there were items that didn't work right or look the same...struggled but no luck. No UF2 files were in the example directory, then setting up the VS the CMake settings were not the same, then lastly the ARM compliler is no where to be found under the No Kit Selected.

  • @di4241
    @di4241 3 года назад

    Thank you for making this very easy to follow video.

  • @DonaldSleightholme
    @DonaldSleightholme 2 года назад

    theres a mistake in the description git submodule update -init only has one dash instead to two --init

  • @kamfora97
    @kamfora97 2 года назад

    On Win11, after hit "cmake -G "NMake Makefiles" .. " I have getting an error:
    CMake Error at pico_sdk_import.cmake:44 (message):
    SDK location was not specified. Please set PICO_SDK_PATH or set
    PICO_SDK_FETCH_FROM_GIT to on to fetch from git.
    Call Stack (most recent call first):
    CMakeLists.txt:4 (include)
    Does anyone know the reason? :(

  • @javiers.8274
    @javiers.8274 4 года назад +2

    Same Problem "nmake" does nothing: 'nmake' is not recognized as an internal or external command. Very frustrating after one hour following the tutorial..

    • @dave_dennis
      @dave_dennis 4 года назад +1

      I'm having the same issue. I have added it to my PATH environment, but still no joy.

    • @kalidgomez7988
      @kalidgomez7988 3 года назад +2

      Found any solutions? also tried adding it to PATH but got fatal error U1077: return code '0x2'

    • @PTExtremePlays
      @PTExtremePlays 3 года назад

      @@kalidgomez7988 I had the same problem, but solved it. I reinstalled python, on custom instalation, aplying it to all users. Then i installed notepad++ and used it on the git installation. And now it's all solved.

  • @xiaoqunyu218
    @xiaoqunyu218 3 года назад +1

    Hi, I do some issues when I follow with your excellent tutorial. I loaded the code from VS2017 develop environment and all the things went okay. However, when I hit the Build button, there was a error message:
    [build] blink\CMakeFiles\blink.dir\compiler_depend.make(4) : fatal error U1033: syntax error : ':' unexpected;
    [build]NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86
    make.exe"' : return code '0x2'.
    I really have no ideas about this error.

  • @BetelgeuseX800
    @BetelgeuseX800 2 года назад

    Hello,
    Working with CMD don't work.
    I had to download load manuały from GitHub.
    Because repository don't exist.
    And also VSC from CMD also don't work. Do someone know how to configure this?

  • @hf10cam
    @hf10cam 3 года назад +1

    SUCCESSFUL compilation after a month..first it is very important to use vsc command prompt not cmd or powershell, if nmake is used. however it was not possible for me to use it within the visual studio code editor (rare). this uses the normal cmd or powershell neither of these two compiles with cl always says cl.exe broken.
    For this reason and thanks to the internet I found that it was possible to use MinGW and not VC. with the command inside the build folder "cmake -G '' MinGW Makefiles .." "and then use nmake and voila !!!.
    and this works in cmd powersell and visual studio code just remember to install the GCC and G ++ tools and register your environment variable.
    Another tip for usb support use "git submodule update --init" from the git console to complement the SDK that is downloaded by default which does not have this support.
    I hope this helps someone else since for me it was quite painful.

  • @_ak.sol_
    @_ak.sol_ Год назад +1

    Hi..After loading pico-example as a workspace to VS code, I'm facing an issue. can you let me know what I'm doing wrong here, I tried many options available to overcome the error but still cannot able to solve this, FYI;
    [proc] Executing command: cmake --version
    [proc] Executing command: cmake -E capabilities
    [variant] Loaded new set of variants
    [kit] Successfully loaded 6 kits from C:\Users\Akshay\AppData\Local\CMakeTools\cmake-tools-kits.json
    [proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --version
    [proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" -E capabilities
    [proc] Executing command: "C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\bin\arm-none-eabi-gcc.exe" -v
    [proc] The command: nmake /? failed with error: Error: spawn nmake ENOENT
    [cmakefileapi-driver] Removing c:/Pico/pico-examples/build/CMakeCache.txt
    [main] 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.
    [main] Configuring project: pico-examples
    [proc] Executing command: "C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\bin\arm-none-eabi-gcc.exe" -v
    [proc] The command: nmake /? failed with error: Error: spawn nmake ENOENT
    [main] 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.
    [proc] Executing command: "C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\bin\arm-none-eabi-gcc.exe" -v
    [proc] The command: nmake /? failed with error: Error: spawn nmake ENOENT
    [main] 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.

    • @cakeezz
      @cakeezz 8 месяцев назад

      I get the same. Did you solve this?

  • @tugbagoncu4056
    @tugbagoncu4056 3 года назад

    CMake Error: Generator: execution of make failed. Make command was: nmake -f Makefile /nologo all && help me

  • @antoniojohnson7693
    @antoniojohnson7693 3 года назад

    I receive the following error when I attempt to build with the build button in VS Code: blink\CMakeFiles\blink.dir\compiler_depend.make(4) : fatal error U1033: syntax error : ':' unexpected"

    • @RogerioMB
      @RogerioMB 3 года назад

      The same here :(

  • @bladefreakers1297
    @bladefreakers1297 2 года назад

    how do i type set x?

  • @CyberRRoland
    @CyberRRoland Год назад

    Does this work with other languages or do I have to do something else for python?

  • @kanax2424
    @kanax2424 3 года назад

    the makefiles command does not work for me, can somebody help me with that?

  • @jonathancliffordrabe68
    @jonathancliffordrabe68 3 года назад

    I had some issues when running cmake. After trying a bunch of things, it turns out my antivirus was trying to "protect" the files, and denied permission to cmake. If you have similar issues, try disabling the antivirus for a few minutes, or allowing cmake to do whatever it wants

  • @bengamedev1872
    @bengamedev1872 Год назад

    Thabks for the vid. Still waiting for my first pico kit to arrive but thid is helpful to know it can be done. A lot of the tools I'm familiar with and makes sense given how they plug together. Feels like a decent sh or bar script could automate much of this and technically VSCode could provably be made to do all of this for us given admin privileges. Embedded is a far cry from my area of expertise but might give automating all this chaos a shot if I find a chance!

  • @angelgcu
    @angelgcu 3 года назад

    Hello,
    Nice tutorial, but I getting the following error : cmake -G "NMake Makefiles" ..
    Using PICO_SDK_PATH from environment ('`..\..\pico-sdk`')
    CMake Error at pico_sdk_import.cmake:52 (message):
    Directory 'C:/Pico/pico-examples/build/pico-sdk`' not found
    Call Stack (most recent call first):
    CMakeLists.txt:4 (include)
    -- Configuring incomplete, errors occurred!

    • @DanMV7400
      @DanMV7400 2 года назад

      I have the same. Did you find a solution?

    • @catbeard5752
      @catbeard5752 2 года назад

      I also have the same issue :(

  • @tanguero2k7
    @tanguero2k7 Год назад

    While I successfully configured my laptop, I can't still "understand why is it (still?) depending on 2GB worth of M$ C++ Build Tools to build something with GCC compiler which is not even remotely meant for windows... :-/

    • @SpeccyMan
      @SpeccyMan 4 месяца назад

      Not necessary on a Linux machine. 😁

    • @tanguero2k7
      @tanguero2k7 4 месяца назад

      Yess, I ended up virtualizing a debian for the sake of my mental sanity 🙃... But thanks, anyway, @@SpeccyMan

  • @beelaycomplex6499
    @beelaycomplex6499 2 года назад

    The video is amazing and very helpful; just having one issue, if anyone can help me out, the compiler is not showing up in Visual Studio Code.

  • @JoseGustavoAbreuMurta
    @JoseGustavoAbreuMurta 3 года назад

    Thank You! Helped me a lot
    Reference material to set up - Getting started with Raspberry Pi Pico - C /C++ development wit Raspberry PI Pico (Raspberry Pi site) "8.2. Building on MS Windows"

  • @HexTheMoaf
    @HexTheMoaf 19 дней назад

    C:\Users\Jeff\Downloads\RP\pico-examples\build> cmake -G "NMake Makefiles" ..
    CMake Error at pico_sdk_import.cmake:55 (message):
    SDK location was not specified. Please set PICO_SDK_PATH or set
    PICO_SDK_FETCH_FROM_GIT to on to fetch from git.
    Call Stack (most recent call first):
    CMakeLists.txt:4 (include)
    -- Configuring incomplete, errors occurred!
    Help!

  • @thopham3082
    @thopham3082 4 года назад

    useful video! but I don't find out the Pico directory in C disk? can you help me?

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  4 года назад +1

      Hi, this is a directory you should make to store your projects in, it is not premade. You may call it what you like, I called it Pico in the C drive.

    • @thopham3082
      @thopham3082 4 года назад

      @@LearnEmbeddedSystems sorry, when I use command line: cmake -G "NMAKE Makefiles" .. but error: CMake Error: Could not create named generator NMAKE Makefiles

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  4 года назад

      It might be Caps sensitive, try: cmake -G "NMake Makefiles"

  • @w9ran
    @w9ran Год назад

    Thank you for one of the best tutorials I have seen on RUclips! But I also have the same problem as others have reported - is there no solution or have I missed something? (Running by typing code into the Dev Console produces the same result): [main] 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. Attention to this would be a big help for those who have got this far and can't proceed! Thanks again.

    • @w9ran
      @w9ran Год назад

      And with a red face, I must admit I'd inadvertently typed Nmake instead of NMake in the json editor...problem in chair not in computer ;-) I'll leave this comment for anyone else who might make the same mistake and again say thanks for an excellent tutorial. My only wish is that the screens would have been a bit larger to make it easier to read.

  • @victormironescu
    @victormironescu 3 года назад

    Thank You, impossible without your guidance.

  • @acthings
    @acthings 11 дней назад

    Espetacular!!! Fiz passo-a-passo e única coisa que mudei, foi instalar VS na v. 21. Também, as variáveis de ambiente precisam de atenção... Parabéns e obrigado!!!

  • @limebulls
    @limebulls Год назад +1

    It would be awesome if you could make this video for MacOS

    • @SpeccyMan
      @SpeccyMan 4 месяца назад

      Asking a Windows user to do a tutorial for a Mac? Do you not see the issue here?

  • @nonridiculousadjective6597
    @nonridiculousadjective6597 3 года назад +1

    Hey there, great tutorial and straight to the point, only problem for me is that when I click build, it says ''Unable to determine what CMake generator to use.'' Also I am a bit of beginner so this might be a dumb question, but the outcome is that I can create programs in vscode and then drag and drop them into pico to run them instantly ? In that case would it be possible to for example work with console input and output, or this is mostly for programs where pico only interacts with things soldered on its pins ? Also, this works only for C ?

    • @hilalkeles7832
      @hilalkeles7832 3 года назад

      we have the same problem. If you could handle it, could you help us?

    • @nonridiculousadjective6597
      @nonridiculousadjective6597 3 года назад +1

      @@hilalkeles7832 we firstly need the tutorial creator to answer us

    • @hilalkeles7832
      @hilalkeles7832 3 года назад

      @@nonridiculousadjective6597 then ?

    • @hilalkeles7832
      @hilalkeles7832 3 года назад

      Can you help me ?how can I fix?

    • @nonridiculousadjective6597
      @nonridiculousadjective6597 3 года назад

      @@hilalkeles7832 you misunderstood, i don't know how i can fix it, that's why i wrote the initial comment..

  • @scottieburr
    @scottieburr 2 года назад

    Hi, thanks for taking the time to product this excellent tutorial. I have followed the steps, but it falls over on the build. I can get Cmake to work and produce the makefiles, but when the build process starts I get:
    [build] Starting build
    [proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/pico-examples/build --config Debug --target blink -j 10 --
    [build] Warning: NMake does not support parallel builds. Ignoring parallel build command line option.
    [build] The system cannot find the file specified
    [build] CMake Error: Generator: execution of make failed. Make command was: nmake -f Makefile /nologo blink &&
    [build] Build finished with exit code 1
    Any ideas?

  • @smartinc1397
    @smartinc1397 11 месяцев назад

    Thanks a lot. Good job. I take your example))) Thank you

  • @m3chanist
    @m3chanist 2 года назад

    Really great. Thanks

  • @MeeBilt
    @MeeBilt 3 года назад

    Thanks for a great video

  • @radhaie
    @radhaie 3 года назад

    Helped a lot.subscribed

  • @rubenschaer960
    @rubenschaer960 3 года назад

    Looks like the current version of git for windows does not expose ANY of the options that you modified during setup. Hopefully that won't be an issue as I set things up :\

  • @M0UAW_IO83
    @M0UAW_IO83 4 года назад

    Nice, thank you, still found it a struggle (my machine is 'complex' shall we say) but this gave me most of what I needed.

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  4 года назад

      I'm glad to hear that! It does seem to be a somewhat convoluted workflow.

    • @M0UAW_IO83
      @M0UAW_IO83 4 года назад

      @@LearnEmbeddedSystems Yeah, it's not an easy one to get up and running, Linux was a doddle in comparison.

  • @NickT6630
    @NickT6630 2 года назад

    I would imagine all this will put many people off using C on the Pico, it does for me. There needs to be a simpler all in one install with minimal setup and the feel of using something like Codeblocks or Geany or a "Thonny for ARM GCC" when working on code and a one click compile to .uf2 file without all the Git commands and and CMAKE business.

  • @99dynasty
    @99dynasty Год назад

    VS code is a powerful tool, a bit much for the Pico, I like Thonny, I like its simplicity and efficiency

  • @walter.hrnndz
    @walter.hrnndz 2 года назад

    Buenisimo, al menos por linea de comandos puedo generar los archivos. Justo lo que necesitaba. Gracias!

  • @StevenCookFX
    @StevenCookFX 6 месяцев назад

    in your comments RUclips destroys your text with redirect links. Need to have a link to a file that has the proper commands. :/