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

Поділитися
Вставка
  • Опубліковано 26 сер 2024
  • 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!
    Follow up to this video discussing creating your first project in Visual Studio Code: • How to Set Up a Projec...
    The links for the required software is here:
    Arm GCC Compiler: developer.arm....
    CMake: cmake.org/down...
    Build Tools for Visual Studio 2019: visualstudio.m...
    Python 3: www.python.org...
    Git: git-scm.com/do...
    Visual Studio Code: code.visualstu...
    The commands to download the pico SDK and example projects are:
    git clone -b master github.com/ras...
    git submodule update -init
    git clone -b master github.com/ras...
    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!
    You can find more embedded systems tutorials and projects on my website learnembeddeds...
    -- 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.
    Budget Soldering Iron: UK: amzn.to/3pQpvUu US: amzn.to/3bBawIJ
    Breadboards: UK: amzn.to/3solZCe US: amzn.to/3dGsHiS
    Jumper Cables: UK: amzn.to/37JfToi US: amzn.to/3r384S9
    Camera: UK: amzn.to/3qKLwFr US: amzn.to/3pK0V7C
    Lens: UK: amzn.to/380lQxp US: amzn.to/3knH3WL
    Tripod: UK: amzn.to/37H0Nzw US: amzn.to/3byKHsV
    All videos and tutorials on this channel and mentioned websites are for educational purposes only.

КОМЕНТАРІ • 278

  • @VisualBRON
    @VisualBRON 3 роки тому +48

    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  3 роки тому +20

      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 3 роки тому +21

    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  3 роки тому

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

    • @digi533
      @digi533 3 роки тому

      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 3 роки тому +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 3 роки тому +1

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

    • @dave_dennis
      @dave_dennis 3 роки тому

      @@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 3 роки тому +9

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

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  3 роки тому

      Thank you! Glad I could be of help :)

    • @cthoadmin7458
      @cthoadmin7458 3 роки тому

      @@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  3 роки тому

      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__ Рік тому

      you got your revenge haha

  • @eternaldoorman5228
    @eternaldoorman5228 Рік тому +2

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

  • @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.

  • @dj1encore
    @dj1encore 2 роки тому

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

  • @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.

  • @depressedyouth
    @depressedyouth 3 роки тому +34

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

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  3 роки тому +7

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

    • @mezmerizer0266
      @mezmerizer0266 Рік тому

      @@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 Рік тому

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

    • @1257HANK
      @1257HANK 5 місяців тому

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

  • @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 !!!

  • @shadabmozaffar2996
    @shadabmozaffar2996 11 місяців тому

    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 7 місяців тому

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

  • @vbrucehunt8617
    @vbrucehunt8617 Рік тому +2

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

  • @kenwallace6493
    @kenwallace6493 3 роки тому +4

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

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  3 роки тому +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!

  • @sebastienschille5546
    @sebastienschille5546 3 роки тому +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  3 роки тому +2

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

    • @TuncayAyhan
      @TuncayAyhan 3 роки тому

      @@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

  • @Malcrom1967
    @Malcrom1967 9 місяців тому

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

  • @zbugi8537
    @zbugi8537 13 днів тому

    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.

  • @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.

  • @benmorris9925
    @benmorris9925 2 роки тому

    This is an awesome resource for getting up and running

  • @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?

  • @hisamezero3388
    @hisamezero3388 2 роки тому

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

  • @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.

  • @di4241
    @di4241 3 роки тому

    Thank you for making this very easy to follow video.

  • @jerryschull2122
    @jerryschull2122 3 роки тому

    Very good. Really appreciate the detailed approach.

  • @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"

  • @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.

  • @limebulls
    @limebulls Рік тому +1

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

  • @danman32
    @danman32 7 місяців тому

    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.

  • @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

  • @victormironescu
    @victormironescu 3 роки тому

    Thank You, impossible without your guidance.

  • @arkaloz
    @arkaloz 2 місяці тому

    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.

  • @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.

  • @marknehrkorn2523
    @marknehrkorn2523 2 роки тому +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.

  • @bengamedev1872
    @bengamedev1872 7 місяців тому

    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!

  • @paulspark7287
    @paulspark7287 10 місяців тому +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 10 місяців тому +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",

  • @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 =)

  • @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.

  • @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. :-(

  • @M0UAW_IO83
    @M0UAW_IO83 3 роки тому

    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  3 роки тому

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

    • @M0UAW_IO83
      @M0UAW_IO83 3 роки тому

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

  • @hounandanr9319
    @hounandanr9319 9 місяців тому

    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?

  • @jearlblah5169
    @jearlblah5169 3 роки тому +3

    what would you do differently to setup on mac?

  • @StevenCookFX
    @StevenCookFX Місяць тому

    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. :/

  • @smartinc1397
    @smartinc1397 6 місяців тому

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

  • @ExtantFrodo2
    @ExtantFrodo2 Рік тому +1

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

  • @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

  • @MatthewBendyna
    @MatthewBendyna 5 місяців тому

    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.

  • @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.

  • @rizwanmadni2805
    @rizwanmadni2805 7 місяців тому

    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?

  • @99dynasty
    @99dynasty Рік тому

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

  • @vizionthing
    @vizionthing Рік тому

    Confirmed still works in October 2022
    one cavate: you will need to close and open the dev console again before opening code else you'll get not found error

  • @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?

  • @radhaie
    @radhaie 3 роки тому

    Helped a lot.subscribed

  • @banalestorchid5814
    @banalestorchid5814 3 роки тому +1

    If you get the error:
    [build] blink\CMakeFiles\blink.dir\compiler_depend.make(4) : fatal error U1033: syntax error : ':' unexpected
    Then the problem is probably the version of CMake you are using. Go back to 3.19 DO NOT USE 3.20

  • @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... :-/

  • @MeeBilt
    @MeeBilt 2 роки тому

    Thanks for a great video

  • @w9ran
    @w9ran Рік тому

    Thank you for one of the best tutorials I have seen on UA-cam! 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.

  • @walter.hrnndz
    @walter.hrnndz 2 роки тому

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

  • @m3chanist
    @m3chanist Рік тому

    Really great. Thanks

  • @wouchang
    @wouchang Рік тому

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

  • @mohammadrezamaulana28
    @mohammadrezamaulana28 7 місяців тому

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

  • @javiers.8274
    @javiers.8274 3 роки тому +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 3 роки тому +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.

  • @BetelgeuseX800
    @BetelgeuseX800 Рік тому

    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?

  • @jnkmal9519
    @jnkmal9519 3 роки тому +1

    this worked great for a while, but today visual studio stopped generating uf2 files. any ideas?

  • @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.

  • @thomassui4879
    @thomassui4879 Рік тому

    Hello everyone, I know some of you may have the issue with > cmake -G "NMake Makefiles" .. failed. I had it too, just find another video which very helped. If you cannot do it from you command prompt window. then open your VS code. Setup the "Setting-> cmake" and make sure the "cmake : configure environment" and "cmake generator" have the information you need, then click the "build" on the bottom of the VS code, choose "GCC version(13.2) xxxxxxx". The VS code will install the cmake for you. if you still have question, you can looking for this video, "RASPBERRY PI PICO ON WINDOWS! | Step by Step Tutorial on How to Configure your PICO on Windows." it has everything you need. I made it happen with this guide.

  • @Art9240
    @Art9240 10 місяців тому

    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  10 місяців тому +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

  • @andrewgrant788
    @andrewgrant788 2 роки тому +2

    It would be interesting to see tutorials for alternative development environments. MacOS and /or Linux and for IDEs Visual Studio instead of VisualStudio code and CLion.

  • @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?

  • @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.

  • @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..

  • @DonaldSleightholme
    @DonaldSleightholme 2 роки тому

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

  • @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.

  • @markbratcher9095
    @markbratcher9095 Рік тому

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

  • @captaincrunchcam5478
    @captaincrunchcam5478 10 місяців тому

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

  • @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 ?

  • @scottinharwood
    @scottinharwood 2 роки тому

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

  • @nito8066
    @nito8066 7 місяців тому

    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 5 місяців тому

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

    • @nito8066
      @nito8066 5 місяців тому

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

  • @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.

  • @tanishphopalkar5864
    @tanishphopalkar5864 2 роки тому

    ver nice tutorial

  • @nextlifeonearth
    @nextlifeonearth 3 роки тому +1

    Seems like this tutorial could use the magic of wsl instead of vs build tools.

  • @_ak.sol_
    @_ak.sol_ 8 місяців тому +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 3 місяці тому

      I get the same. Did you solve this?

  • @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.

  • @akhilajith9669
    @akhilajith9669 Рік тому

    thanku so much!!!!

  • @arnolduk123
    @arnolduk123 Рік тому

    why is it not possible to downlaod all these packages and tool chains from within VCODE extensions ?

  • @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

  • @dindafadhya8028
    @dindafadhya8028 Рік тому

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

  • @john_hind
    @john_hind 3 роки тому +3

    This is much too complicated and way too fragile. The Pi Foundation docs seem to assume you'll dedicate a machine to the development environment for the Pico and not do anything else with it, which is well and good if you use a Pi 4 but hardly practical with a Windows or Mac. I think the way to go is a Docker container with the compiler and build tools using VS Code as the IDE. On Windows, the container can run in WSL2 controlled by VS Code on the Windows side. On the other platforms the same container should run natively (I think). I'm on a huge learning curve with Docker and VS Code, but this is the sort of thing a devops expert can set up once and everyone can benefit from.

  • @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?

  • @nathvandyk5213
    @nathvandyk5213 Рік тому

    how do import library's

  • @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? :(

  • @gautombose4172
    @gautombose4172 2 роки тому

    Helpful video. However, if your Display was larger, with bigger Font size, then, your viewers could see what you are typing on the screen, better.

  • @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.

  • @richardturnnidge
    @richardturnnidge 3 роки тому

    Please do the equivalent for installation on the Raspberry Pi, that would be very useful.

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  3 роки тому +3

      Thanks for the suggestion Richard, I will add this to my list of video topics to cover!

    • @richardturnnidge
      @richardturnnidge 3 роки тому +1

      @@LearnEmbeddedSystems I have tried on Raspberry PI, and failed. It just seems such a convoluted process to set it up just to program in C. It would be nice to see a way to use the VS IDE with C/C++ and a smooth testing cycle like it is with Thonny and Micropython.

  • @CyberRRoland
    @CyberRRoland Рік тому

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

  • @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 2 роки тому +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.

  • @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

  • @tugbagoncu4056
    @tugbagoncu4056 3 роки тому

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

  • @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.

  • @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)

  • @sansdomicileconnu
    @sansdomicileconnu 3 роки тому

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