I am using windows 10 wishing to setup mbed debugging for st boards. My platformio.ini is:
[env:nucleo_f767zi]
platform = ststm32
framework = mbed
board = nucleo_f767zi
upload_port = COM[8]
upload_protocol = stlink
debug_tool = custom
debug_server =
$PLATFORMIO_CORE_DIR/?????/openocd
-f
$PLATFORMIO_CORE_DIR/?????/tool-openocd/scripts/board/st_nucleo_f7.cfg
When I run debugging in vscode I get the following
Reading symbols from nucleo_f767zi/firmware.elf...
done.
PlatformIO Unified Debugger -> ly/pio-debug
PlatformIO: Initializing remote target...
GNU MCU Eclipse OpenOCD, 64-bitOpen On-Chip Debugger 0.10.0+dev-00593-g23ad80df4 (2019-04-22-20:25)
Licensed under GNU GPL v2
For bug reports, read
openocd.bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 2000 kHz
Info : STLINK V2J29M18 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.269404
Info : stm32f7x.cpu: hardware has 8 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection from pipe
target halted due to debug-request, current mode: Thread
xPSR: 0x81000000 pc: 0x08000764 msp: 0x2007ffc0
Info : device id = 0x10016451
Info : flash size = 2048 kbytes
Info : Single Bank 2048 kiB STM32F76x/77x found
Info : flash size = 1024 bytes
initialize (ticker=ticker@entry=0x8009858 <us_data>) at mbed_ticker_api.c:33
33 if (ticker->queue->initialized) {
Temporary breakpoint 1 at 0x80038b0: file src\main.cpp, line 6.
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
Unable to match requested speed 2000 kHz, using 1800 kHz
Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800161c msp: 0x20080000
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800161c msp: 0x20080000
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800161c msp: 0x20080000
Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1012). Workaround: increase "set remotetimeout" in GDB
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
adapter speed: 4000 kHz
Loading section .text, size 0xa33c lma 0x8000000
Loading section .ARM.exidx, size 0x8 lma 0x800a33c
Loading section .data, size 0xad0 lma 0x800a344
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800161c msp: 0x20080000
Start address 0x800161c, load size 44564
Transfer rate: 16 KB/sec, 8912 bytes/write.
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
Unable to match requested speed 2000 kHz, using 1800 kHz
Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800161c msp: 0x20080000
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800161c msp: 0x20080000
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = tbreak main`
PlatformIO: More configuration options -> pio-debug
Note: automatically using hardware breakpoints for read-only addresses.
Temporary breakpoint 1, main () at src\main.cpp:6
6 int main() {
Breakpoint 2, main () at src\main.cpp:9
9 wait(0.5);
Please advise how I may improve my platformio.ini file?
Many thanks,
Kevin