I’m trying to debug the HelloWorld project using vsCode. The build seems to complete successfully, but whenever I click the debug icon (on the bottom bar), I get the following error:
[main] Problem getting debug configuration from cache. Error: Unable to find GDB in default search path and gdb.
Any ideas?
Here is the full output:
[build] Starting build
[driver] Start build Onethinx_HelloWorld.elf
[driver] Runnnig pre-configure checks and steps
[proc] Executing command: “C:/Program Files/CMake/bin/cmake.exe” --build “c:/Users/Paul Gyurkikiss/Documents/VSCode/Onethinx_HelloWorld/build” --config DEBUG --target Onethinx_HelloWorld.elf – -j 6
[build] [100%] Built target Onethinx_HelloWorld.elf
[driver] Run _refreshExpansions
[cms-driver] Run doRefreshExpansions
[driver] Run _refreshExpansions cb
[build] Build finished with exit code 0
[cache] Reading CMake cache file c:/Users/Paul Gyurkikiss/Documents/VSCode/Onethinx_HelloWorld/build/CMakeCache.txt
[cache] Parsing CMake cache string
[proc] Executing command: “C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gdb.exe” --version
[cache] Reading CMake cache file c:/Users/Paul Gyurkikiss/Documents/VSCode/Onethinx_HelloWorld/build/CMakeCache.txt
[cache] Parsing CMake cache string
[proc] Executing command: gdb --version
[main] Problem getting debug configuration from cache. Error: Unable to find GDB in default search path and gdb.
[extension] [2124] cmake.debugTarget finished (returned null)
Rolf,
Using the extension, I don’t see any error message, but when I start the debugging, I get a traveling blue bar at the top (see screenshot) that goes on forever. Nothing else appears to happen.
For some reason GDB or OpenOCD is not starting. It should fail after about 20 seconds automatically, not sure why it hangs. Which operating system are you using?
If that doesn’t help, maybe the prelaunch task is failing. Can you comment (//) this line from your selected launch (CM4 Kitprog): //"preLaunchTask": "Check build", // Set this to run a task from tasks.json before starting a debug session
I gave up on this for a while and worked on other things. Now, I’m trying again to get this thing running.
I completely uninstalled Modus Toolbox and VSCode. I then installed VSCode and the VSCode Onethinx Pack for Windows per the instructions on this GitHub repository:
It now appears that I have to have Modus Toolbox installed, even if I am using VSCode, so I will install it. What I need to know is, with the current VSCode version of HelloWorld on GitHub, what version of Modus Toolbox should I install? Any guidance would be appreciated.
Thanks for the info. What made me think I needed Modus Toolbox was the following error I got when trying to clean the project:
[cmake] CMake Error at CMakeLists.txt:142 (add_executable):
[cmake] Cannot find source file:
[cmake]
[cmake] C:/ModusToolbox_1.0/libraries/psoc6sw-1.0/components/psoc6pdl/devices/psoc6/startup/system_psoc6_cm4.c
I now realize that the error comes from the following line in the file CMakeLists.txt:
set(CY_MODUS_DIR C:/ModusToolbox_1.0)
Searching through the VSCode Onethinx Pack directory tree, I can only find two files named system_psoc6_cm4.c. They are in the following directories:
C:\VSCode_OnethinxPack_Windows\PDL_1.3.1.1499\devices\bsp\COMPONENT_MBED\startup
C:\VSCode_OnethinxPack_Windows\PDL_1.3.1.1499\devices\bsp\COMPONENT_MTB\startup
There appears to be a problem setting correct paths in some of the variable assignments, as shown here:
It appears that my installation of VSCode works fine with the HelloWorld project. The problem of wrong paths in CMakeLists variables exists in the VSCodeLightSensor project. I can use VSCode_HelloWorld as an example to correct VSCodeLightSensor.