Hi,
To generate code for RPI Pico, VS Code does not work (cannot find Ninja) without a special measure, namely:
Change the bool variables in .vscode/settings.jsonto the opposite (true to false, false to true)
I think I'm overlooking a step in the project creation process—at the moment,
I'm just creating it without any additional configuration steps.
What do I miss?
Martin
------------------------------------------------------------------------------------------------------------------------------
tl; dr: Steps and log.
I start VS Code.
Select the "RPI Pico Project" Icon on the left vertical menu bar / Click it
In the following menu I select "New C/C++ Project".
System thinks a bit and presents the "Raspberry Pi Pico Basic Settings"
I fill in project name "y" ; select "Pico";
Leave "Location" as it is (e:\Documnets\1a_VSCode)
Leave "Pico SKD version" as it is "v2.2.0"
Mark in "Stdio support " "Console over USB"
"Code generation options" as it is "Use project name as entry point"
Debugger as it is Debug Probe (CMSIS-DAP)
CMake Tools as it is "Enable CMake-Tools extension integration"
Create
I get a nice project directory/file set.
c_cpp_properties.json is yellow,
in the file, in "forcedInclude" is marked
"${workspaceFolder}/build/generated/pico_base/pico/config_autogen.h",
if I try compile, it ends with
[proc] Executing command: C:\Users\martin/.pico-sdk/cmake/v3.31.5/bin/cmake --version
[proc] Executing command: C:\Users\martin/.pico-sdk/cmake/v3.31.5/bin/cmake -E capabilities
[kit] Successfully loaded 0 kits from C:\Users\martin\AppData\Local\CMakeTools\cmake-tools-kits.json
[kit] Successfully loaded 1 kits from e:\Documents\1a_VSCode\y\.vscode\cmake-kits.json
[variant] Loaded new set of variants
[main] Configuring project: y
[proc] Executing command: C:\Users\martin\.pico-sdk/cmake/v3.31.5/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\Users\martin\.pico-sdk\toolchain\14_2_Rel1\bin\arm-none-eabi-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\Users\martin\.pico-sdk\toolchain\14_2_Rel1\bin\arm-none-eabi-g++.exe "-DPython3_EXECUTABLE:STRING=c:/Program Files/Python313/python.exe" --no-warn-unused-cli -S E:/Documents/1a_VSCode/y -B e:/Documents/1a_VSCode/y/build -G Ninja
[cmake] Not searching for unused variables given on the command line.
[cmake] PICO_SDK_PATH is C:/Users/martin/.pico-sdk/sdk/2.2.0
[cmake] Target board (PICO_BOARD) is 'pico'.
[cmake] Using board configuration from C:/Users/martin/.pico-sdk/sdk/2.2.0/src/boards/include/boards/pico.h
[cmake] Defaulting platform (PICO_PLATFORM) to 'rp2040' based on PICO_BOARD setting.
[cmake] Defaulting compiler (PICO_COMPILER) to 'pico_arm_cortex_m0plus_gcc' since not specified.
[cmake] Configuring toolchain based on PICO_COMPILER 'pico_arm_cortex_m0plus_gcc'
[cmake] Defaulting PICO_GCC_TRIPLE to 'arm-none-eabi'
[cmake] CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
[cmake] -- Configuring incomplete, errors occurred!
[proc] The command: C:\Users\martin/.pico-sdk/cmake/v3.31.5/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -
DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\Users\martin\.pico-sdk\toolchain\14_2_Rel1\bin\arm-none-eabi-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\Users\martin\.pico-sdk\toolchain\14_2_Rel1\bin\arm-none-eabi-g++.exe "-DPython3_EXECUTABLE:STRING=c:/Program Files/Python313/python.exe" --no-warn-unused-cli -S E:/Documents/1a_VSCode/y -B e:/Documents/1a_VSCode/y/build -G Ninja exited with code: 1
I close VS Code.
I copy a more functional \projectname\.vscode\ settings.json to \y\.vscose\settings
I start VS Code
[proc] Executing command: C:\Users\martin/.pico-sdk/cmake/v3.31.5/bin/cmake --version
[proc] Executing command: C:\Users\martin/.pico-sdk/cmake/v3.31.5/bin/cmake -E capabilities
[kit] Successfully loaded 0 kits from C:\Users\martin\AppData\Local\CMakeTools\cmake-tools-kits.json
[kit] Successfully loaded 1 kits from e:\Documents\1a_VSCode\y\.vscode\cmake-kits.json
[variant] Loaded new set of variants
start compile -> OK
start run -> Ok
To generate code for RPI Pico, VS Code does not work (cannot find Ninja) without a special measure, namely:
Change the bool variables in .vscode/settings.json
Code:
"cmake.configureOnEdit": true, "cmake.automaticReconfigure": true, "cmake.configureOnOpen": true, "raspberry-pi-pico.cmakeAutoConfigure": false, "raspberry-pi-pico.useCmakeTools": true,I think I'm overlooking a step in the project creation process—at the moment,
I'm just creating it without any additional configuration steps.
What do I miss?
Martin
------------------------------------------------------------------------------------------------------------------------------
tl; dr: Steps and log.
I start VS Code.
Select the "RPI Pico Project" Icon on the left vertical menu bar / Click it
In the following menu I select "New C/C++ Project".
System thinks a bit and presents the "Raspberry Pi Pico Basic Settings"
I fill in project name "y" ; select "Pico";
Leave "Location" as it is (e:\Documnets\1a_VSCode)
Leave "Pico SKD version" as it is "v2.2.0"
Mark in "Stdio support " "Console over USB"
"Code generation options" as it is "Use project name as entry point"
Debugger as it is Debug Probe (CMSIS-DAP)
CMake Tools as it is "Enable CMake-Tools extension integration"
Create
I get a nice project directory/file set.
c_cpp_properties.json is yellow,
in the file, in "forcedInclude" is marked
"${workspaceFolder}/build/generated/pico_base/pico/config_autogen.h",
if I try compile, it ends with
[proc] Executing command: C:\Users\martin/.pico-sdk/cmake/v3.31.5/bin/cmake --version
[proc] Executing command: C:\Users\martin/.pico-sdk/cmake/v3.31.5/bin/cmake -E capabilities
[kit] Successfully loaded 0 kits from C:\Users\martin\AppData\Local\CMakeTools\cmake-tools-kits.json
[kit] Successfully loaded 1 kits from e:\Documents\1a_VSCode\y\.vscode\cmake-kits.json
[variant] Loaded new set of variants
[main] Configuring project: y
[proc] Executing command: C:\Users\martin\.pico-sdk/cmake/v3.31.5/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\Users\martin\.pico-sdk\toolchain\14_2_Rel1\bin\arm-none-eabi-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\Users\martin\.pico-sdk\toolchain\14_2_Rel1\bin\arm-none-eabi-g++.exe "-DPython3_EXECUTABLE:STRING=c:/Program Files/Python313/python.exe" --no-warn-unused-cli -S E:/Documents/1a_VSCode/y -B e:/Documents/1a_VSCode/y/build -G Ninja
[cmake] Not searching for unused variables given on the command line.
[cmake] PICO_SDK_PATH is C:/Users/martin/.pico-sdk/sdk/2.2.0
[cmake] Target board (PICO_BOARD) is 'pico'.
[cmake] Using board configuration from C:/Users/martin/.pico-sdk/sdk/2.2.0/src/boards/include/boards/pico.h
[cmake] Defaulting platform (PICO_PLATFORM) to 'rp2040' based on PICO_BOARD setting.
[cmake] Defaulting compiler (PICO_COMPILER) to 'pico_arm_cortex_m0plus_gcc' since not specified.
[cmake] Configuring toolchain based on PICO_COMPILER 'pico_arm_cortex_m0plus_gcc'
[cmake] Defaulting PICO_GCC_TRIPLE to 'arm-none-eabi'
[cmake] CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
[cmake] -- Configuring incomplete, errors occurred!
[proc] The command: C:\Users\martin/.pico-sdk/cmake/v3.31.5/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -
DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\Users\martin\.pico-sdk\toolchain\14_2_Rel1\bin\arm-none-eabi-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\Users\martin\.pico-sdk\toolchain\14_2_Rel1\bin\arm-none-eabi-g++.exe "-DPython3_EXECUTABLE:STRING=c:/Program Files/Python313/python.exe" --no-warn-unused-cli -S E:/Documents/1a_VSCode/y -B e:/Documents/1a_VSCode/y/build -G Ninja exited with code: 1
I close VS Code.
I copy a more functional \projectname\.vscode\ settings.json to \y\.vscose\settings
I start VS Code
[proc] Executing command: C:\Users\martin/.pico-sdk/cmake/v3.31.5/bin/cmake --version
[proc] Executing command: C:\Users\martin/.pico-sdk/cmake/v3.31.5/bin/cmake -E capabilities
[kit] Successfully loaded 0 kits from C:\Users\martin\AppData\Local\CMakeTools\cmake-tools-kits.json
[kit] Successfully loaded 1 kits from e:\Documents\1a_VSCode\y\.vscode\cmake-kits.json
[variant] Loaded new set of variants
start compile -> OK
start run -> Ok
Statistics: Posted by MartinHill — Tue Feb 03, 2026 8:13 pm — Replies 1 — Views 22