Here are the ten steps I took to get hello_freertos built and debugged in VSCode USING the PicoSDK Extension:
0. Cmake .. from a pico-examples/build folder. NOT necessary?
1. You may need to have set the FREERTOS_KERNEL_PATH in a terminal:2. Ensure that pico-examples/freertos/hello_freertos/CMakeLists.cmake contains:3. Remove the multiple executable lines in CMakeLists.cmake leaving only freertos1 and set a constant (non-variable) project name4. Clean (toss the old build if existed) Cmake .. from a new pico-examples/freertos/hello_freertos/build folder
5. make -j4 from that build folder
6. Open VSCode and use the PicoSDK Extension import project on the pico-examples/freertos/hello_freertos folder.
7. DO NOT switch to the CMakeTools Extension. DO NOT change the settings.json lines:8. Compile and debug using the PicoSDK Extension functions.
9. Have a drink.
10. Have another.
0. Cmake .. from a pico-examples/build folder. NOT necessary?
1. You may need to have set the FREERTOS_KERNEL_PATH in a terminal:
Code:
export FREERTOS_KERNEL_PATH=/home/...path/to/the.../freertos/FreeRTOS/FreeRTOS/Source
Code:
# PB addedcmake_minimum_required(VERSION 3.25)set(PICO_BOARD pico_w)set(FREERTOS_KERNEL_PATH "/home/...path/to/the.../freertos/FreeRTOS/FreeRTOS/Source")include(pico_sdk_import.cmake)include(FreeRTOS_Kernel_import.cmake)pico_sdk_init()
Code:
# PB fixed to satisfy https://github.com/raspberrypi/pico-vscode/issues/48#set(TARGET_NAME hello_freertos1)project(hello_freertos1 C CXX ASM)add_executable(hello_freertos1 hello_freertos.c ) . .(a bunch of other lines only about freertos1 but NOT freertos2) .
5. make -j4 from that build folder
6. Open VSCode and use the PicoSDK Extension import project on the pico-examples/freertos/hello_freertos folder.
7. DO NOT switch to the CMakeTools Extension. DO NOT change the settings.json lines:
Code:
"raspberry-pi-pico.cmakeAutoConfigure": true, "raspberry-pi-pico.useCmakeTools": false,
9. Have a drink.
10. Have another.
Statistics: Posted by paulbjork — Fri Oct 11, 2024 10:09 pm