Toolchain setup for Raspberry Pi Pico step by step
HTML-код
- Опубликовано: 11 сен 2024
- This video is a step by step instruction on setting up the programming environment for the RP2040 processor on the Raspberry Pi Pico used in my videos.
These are the links to webpages used in this video:
- ARM GCC toolchain: developer.arm....
- Raspberry Pi Pico SDK: github.com/ras...
- Python: www.python.org/
- GCC for Windows: winlibs.com/
- make for Windows: sourceforge.ne...
- CMake: cmake.org/
- Visual Studio Code: code.visualstu...
- example source code from my GitHub: github.com/sla...
Some of the above tools are available in winget. Here are the commands for installing them:
- ARM GCC toolchain: "winget install Arm.GnuArmEmbeddedToolchain"
- Python: "winget install python3"
- make for Windows: "winget install Gnuwin32.Make"
- CMake: "winget install Kitware.CMake"
- Visual Studio Code: "winget install Microsoft.VisualStudioCode"
Happy compiling!
What I find to be the hardest part of programing is setting up the toolchain/ environment/ libraries. Also one of the main things that is not taught at all or well in school. I think that is why the arduino IDE is so popular and accessible. Once you can get to the coding screen the problem becomes very focused and the resources for help are clear.
Tell me about it... In particular environments like C or C++ are quite horrible in this regard. Still, not that complicated like some time ago, but yeah - it could be easier. For me the "makefiles" were always a nightmare.
"Cmake" is a great tool nowadays :-)
Thank you, great video
Brilliant tutorial. Thank you.
thanks a lot, it works!
i already downloaded "make" and then again "Cmake"?, whats the difference, i m beginner here, thank you
Hi @hfe1833. "make" is a building tool which calls the compilers (and the linker) appropriately to the contents of a file known as a "Makefile". This is the "instruction" about how to build each of the source file and then create the final executable. You can either write your own Makefile (and use "make" directly), but it requires you to know the (complicated) syntax of a Makefile. It is MUCH easier to get another software to create such a Makefile for you. This is exactly what "Cmake" is for. "Cmake" creates these instructions based on a very simple configuration file ("CMakeLists.txt"). And it can do it for other building tools (other then "make") and different languages.
In this case we use "Cmake" to create the Makefile for the "make" tool which in turns builds all the source files into one executable.
Short answer: they are distinct tools and you need both of them. I understand that the similarity of the names caused you confusion.
Issue I’ve got. So your example works. I wanted to create own project. It builds, so paths are fine, but vs code keeps highlighting the #include lines . Cannot find them. I,copied same .vscode files into mine. So not sure why it cannot find it. I might just stick coding in vim.
As you noticed, it builds, so it's not a major problem. VSCode uses this thing called IntelliSense which looks at your source files constantly in the background in order to highlight future compilation errors without you doing the build explicitly. The highlighted include lines mean that, for some reason, IntelliSense cannot find some of them. You can ignore it, or try to add the paths to your highlighted includes explicitly to the "includePath" array in ".vscode/c_cpp_properties.json" file.
@@SladorSoft I started messing with it more eventually broke it more and fixed it again lol. There was something about initializing the sdk that I did and it worked afterwards. I didn’t want to re-trace my steps to see what it was since now it is fine. The good ‘ol if it ain’t broken, don’t mess with it lol.
RPI Foundation has released "one click" (windows) pico-dk set up. Regrettably, it makes this video redundant. We should really, now, be talking (explaining) the SDK programs and how to debug pico using pico debug tool.
Yes, I'm aware of that, but I still made this video, mainly for two reasons: to complement the other video to setup the ia16-elf toolchain and also because there maybe some people which already have some of the software already installed and may want to just added the missing parts - so I thought to detail all the steps one by one.
I totally agree with you that showing how to debug Pico would be useful (and fun). I'll do my best to do it soon(-ish). Thanks for that!
Still find this useful… walking through these steps as we speak. I only been doing pico with Python thony. Ended up using it as remote website server with pico W to control so,e home stuff remotely. This low level stuff open new box of fun for me. Love it.