platform-gd32
platform-gd32 copied to clipboard
Uploading and Debugging for e505 fails with OpenOCD
Hiya, am getting an issue where i can't seem to get opencd to work on a gd32e505re.
This is the error message:
Building in release mode
Checking size .pio\build\genericGD32E505RE\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 0.0% (used 36 bytes from 131072 bytes)
Flash: [ ] 0.2% (used 976 bytes from 524288 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, gdlinkcli, jlink, serial, sipeed-rv-debugger, stlink
CURRENT: upload_protocol = cmsis-dap
Uploading .pio\build\genericGD32E505RE\firmware.elf
xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2021-12-07-17:33)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
swd
0
embedded:startup.tcl:26: Error: Can't find target/gd32e50x.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 26
*** [upload] Error 1
I tried manually adding the gd32e50x.cfg from here but that gives me this error message:
Building in release mode
Checking size .pio\build\genericGD32E505RE\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 0.0% (used 36 bytes from 131072 bytes)
Flash: [ ] 0.2% (used 976 bytes from 524288 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, gdlinkcli, jlink, serial, sipeed-rv-debugger, stlink
CURRENT: upload_protocol = cmsis-dap
Uploading .pio\build\genericGD32E505RE\firmware.elf
xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2021-12-07-17:33)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
swd
0
target halted due to debug-request, current mode: Thread
xPSR: 0xf9000000 pc: 0x080001e0 msp: 0x20020000
** Programming Started **
Error: Cannot identify target as a stm32x
Error: auto_probe failed
embedded:startup.tcl:1136: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 1201
at file "embedded:startup.tcl", line 1136
*** [upload] Error 1
For reference, this is what my env looks like:
[env:genericGD32E505RE]
board = genericGD32E505RE
framework = spl
upload_protocol = cmsis-dap
debug_tool = cmsis-dap
Any input on what i'm doing wrong?