GDB gets version error when attempting to debug with the Presense SDK (IDE)

Asked 1 years ago, Updated 1 years ago, 423 views

We are building a new SDK (IDE) environment for Spresense on Windows 10 Home.
The LCP-Link2 on the official page as a debugger appears almost unavailable, so the motivation is to try using the DAP-Link compatible MCU-Link (and then the Akizuki lPC11U35 board...) until you connect to the space with OpenOCD alone.

·What you did
You can install MSYS2 (pacman-Syu after installing installer msys2-x86_64-20220904.exe), Spresense SDK, Visual Studio Code (1.71.2) along with the Spresense official page.
Here are the versions of the VSC extensions that might be relevant.
Spresense VSCode IDE V1.3.200
C/C++ V1.12.4
C/C++ Extension Pack V1.3.0

·What happened
Then we went into Run and Debug and tried to Start Debug, but the following error dialog was displayed and we were unable to enter the debugger.
Error Dialog

Also, the debug console showed:

Cortex-Debug: VSCode debugger extension version 1.6.5 git (ed64786).Usage info: https://github.com/Marus/cortex-debug#usage
Reading symbols from c:/msys64/opt/spresenseenv/usr/bin/arm-none-eabi-objdump.exe -- sys-C-h-w C:/msys64/home/User/spProjMsys1/out/spProjMsys1.nuttx 
Reading symbols from c:/msys64/opt/spresenseenv/usr/bin/arm-none-eabi-nm.exe --defined-only-S-l-C-pc:/msys64/home/User/spProjMsys1/out/spProjMsys1.nuttx 
Launching GDB: "c:\\msys64\\opt\\spresenseenv\\usr\\bin\\arm-none-eabi-gdb.exe" -q --interpreter=mi2-ix.vscode/.gdbinit 
IMPORTANT: Set "showDevDebugOutput": "raw" in "launch.json" to see verbose GDB transactions here. Very helpful to debug issues or report problems 
Launching gdb-server: "c:\\msys64\\opt\\spresenseenv\\usr\\bin\\openocd" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s" C:\\msys64\\home\\User\spresense\\sdk\tools" -f"/users.dsc/users/user/user.mode 
Please check TERMINAL tab(gdb-server) for output from c:\msys64\opt\spresenseenv\usr\bin\openocd 
Finished reading symbols from objdump: Time: 141 ms 
c:\msys64\opt\spresenseenv\usr\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory. 
ERROR: GDB major version should be > = 9, yours is 8 
GDB could not start as expected. Bad installation or version mismatch.See if you can start gdb from a shell prompt and check its version (Must be >=9)

At this time,

arm-none-eabi-gdb-v
GNU gdb (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 8.3.0.20190709-git

That was it.

·What I tried
Now I downloaded and unzipped the new version (Zip) of the ARM toolchain, renamed arm-none-eabi-gdb.exe in /opt/spresenseenv/usr/bin, and then put a symbolic link from the new version of arm-none-eabi-gdb.exe.exe.At this stage,

It is shown that
When I tried to start debugging from this state, I was able to debug the source level for now (I only tried to run steps).

·A little research
If you google 'vscode gdb major version' for similar cases, you'll see
Something like this (2022/8) or This (2022/9) will also get stuck, so I think it means that the VSCode itself or the extension version has increased and the demand for the GDB version has become stricter...

So
·Please investigate the official support and
·For the time being, I would like to ask anyone who knows if there is a symbolic link ahead or if there are any other means.

Thank you for your cooperation.

spresense vscode debugging

2022-10-01 01:00

1 Answers

Hello
I had a similar error, so I lowered the version of Cortex-Debug.
Cortex-Debug version 1.4.4 appears to be able to debug.

Until the official compiler version is updated, it seems necessary to take the same method as thkana, or to lower the Cortex-Debug version.


2022-10-01 01:00

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.