I am porting a large working C language project from the STM32 architecture on an Eclipse-based IDE over to the pico series using the VSCode IDE. The project requires FreeRTOS and so I am fairly familiar with FreeRTOS configuration. In familiarizing myself with the new pico architecture, I have built and tested a couple of the basic pico-sdk example projects in VSCode, and now am attempting to test a FreeRTOS example project. I have done so from the command line and generated the appropriate .uf2 and .elf files. But debugging from the command line is not really a viable option, so I want to use VSCode for this.
As I understand, the hello-freertos example project in the Pico SDK won't build and run correctly in the pico VSCode extension because the extension cannot handle CMakeLists.cmake instructions that generate multiple executables (like hello-freertos1 and hello-freertos2) or that use a variable name for a project. Indeed, an attempt to open a "New Project From Example" in the PicoSDK Extension won't even bring up a FreeRTOS-based project.
A workaround has been suggested that uses the Cmake Tools extension instead, by invoking a line of raspberry-pi-pico.useCmakeTools": true and setting cmakeAutoConfigure to false in the settings.json file. This requires using the CMake:Clean Rebuild command, which I assume is from CMakeTools. However, this seems to break the compiler include paths for FreeRTOS include files such as FreeRTOS.h, semphr.h, etc.. And no amount of cajoling the tasks.json file ninja arguments will add a "-I" include path to solve this.
Changes to c_cpp_properties.json IncludePath, of course, only refer to the Intellisense operation. Indeed even these additions still result in a "No such file or directory" "Problem".
Am I on the right track with using this CMakeTools workaround? Will this indeed result in a debugging capability since there are actually multiple executables and variable project names in the CMakeLists file as above?
Is someone working on an addition to the PicoSDK Extension that will automate the build process to make example projects that use FreeRTOS? Without a whole lot of fiddling about with json files, etc?
Paul
As I understand, the hello-freertos example project in the Pico SDK won't build and run correctly in the pico VSCode extension because the extension cannot handle CMakeLists.cmake instructions that generate multiple executables (like hello-freertos1 and hello-freertos2) or that use a variable name for a project. Indeed, an attempt to open a "New Project From Example" in the PicoSDK Extension won't even bring up a FreeRTOS-based project.
A workaround has been suggested that uses the Cmake Tools extension instead, by invoking a line of raspberry-pi-pico.useCmakeTools": true and setting cmakeAutoConfigure to false in the settings.json file. This requires using the CMake:Clean Rebuild command, which I assume is from CMakeTools. However, this seems to break the compiler include paths for FreeRTOS include files such as FreeRTOS.h, semphr.h, etc.. And no amount of cajoling the tasks.json file ninja arguments will add a "-I" include path to solve this.
Changes to c_cpp_properties.json IncludePath, of course, only refer to the Intellisense operation. Indeed even these additions still result in a "No such file or directory" "Problem".
Am I on the right track with using this CMakeTools workaround? Will this indeed result in a debugging capability since there are actually multiple executables and variable project names in the CMakeLists file as above?
Is someone working on an addition to the PicoSDK Extension that will automate the build process to make example projects that use FreeRTOS? Without a whole lot of fiddling about with json files, etc?
Paul
Statistics: Posted by paulbjork — Thu Oct 10, 2024 9:23 pm — Replies 2 — Views 47