Zeyphr West Embedded Project Debug Error
I am following the official CLion + Zephyr tutorial documented here:
https://www.jetbrains.com/help/clion/zephyr.html
I successfully created a Zephyr project using CLion’s built-in Zephyr support. The project builds correctly, and pressing the Run button flashes the firmware to my board without any issues.
However, when I press the Debug button, CLion fails immediately with the following error:
Error running 'West'
Cannot run program "west.exe"
(in directory "C:\Users\umut\zephyrproject\zephyr\samples\basic\blinky"):
CreateProcess error=2, The system cannot find the file specified.It seems CLion cannot locate west.exe when starting the debug session, even though:
- I can run west from a terminal without problems.
- Building and flashing via Run works correctly.
- The toolchain and Zephyr environment variables appear to be configured properly for building.
My environment details:
- Board: NUCLEO-WB55RG
- OS: Windows 11
- Zephyr version: sdk-0.17.4
- CLion version: 2025.3
Any guidance or recommended configuration steps would be appreciated.
Additional Information
When I run the following command from a regular terminal (PowerShell):
west debugthe debug session starts successfully. OpenOCD runs, GDB connects, symbols load, and I can debug in terminal without any issues.
Example output:
-- west debug: rebuilding
ninja: no work to do.
-- west debug: using runner openocd
-- runners.openocd: OpenOCD GDB server running on port 3333; no thread info available
GNU gdb (Zephyr SDK 0.17.4) 12.1
...
--Type <RET> for more, q to quit, c to continue without paging--
请先登录再写评论。
The workaround is to set an absolute path to
west.exein File | Settings | Build, Execution, Deployment | Embedded Development | West > West executable.