Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Unable to debug STM32F4103T6U7A with larger binary size

Hello all,

I am using the STM32 Workbench Version: 2.0.1.201705161428 on Ubuntu 14.04.5 LTS with OpenOCD version 0.10.0-dev-00278-ga53935e-dirty from the same version of the debugging tools.

If my binary size is smaller than 10164 bytes I can debug my project if it is larger I cannot.

Here is the -d2 output of the small binary (successful) debugging:

code
Open On-Chip Debugger 0.10.0-dev-00278-ga53935e-dirty (2017-05-09-09:16)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_assert_srst
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : clock speed 1000 kHz
Info : STLINK v2 JTAG v28 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.218823
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : STM32F103T6Ux.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting ‘gdb’ connection on tcp/3333
STM32F103T6Ux.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
Info : device id = 0x10006412
Info : flash size = 32kbytes
Error: address + size wrapped(0xfffffffe, 0x00000004)
STM32F103T6Ux.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
STM32F103T6Ux.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
STM32F103T6Ux.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000003a msp: 0xfffffffc
STM32F103T6Ux.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080026c4 msp: 0x20001800
/code

And here is with a larger binary (failing) debugging:
code
Open On-Chip Debugger 0.10.0-dev-00278-ga53935e-dirty (2017-05-09-09:16)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_assert_srst
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : clock speed 1000 kHz
Info : STLINK v2 JTAG v28 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.217255
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : STM32F103T6Ux.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting ‘gdb’ connection on tcp/3333
STM32F103T6Ux.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
Info : device id = 0x10006412
Info : flash size = 32kbytes
Error: address + size wrapped(0xfffffffe, 0x00000004)
STM32F103T6Ux.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
STM32F103T6Ux.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
Error: timed out while waiting for target halted
STM32F103T6Ux.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x20000006 msp: 0xfffffffc
Error: error waiting for target flash write algorithm
Error: error writing to flash at address 0x08000000 at offset 0x00000000
STM32F103T6Ux.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
Error: address + size wrapped(0xffffffff, 0x00000004)
Error: address + size wrapped(0xffffffff, 0x00000002)
Error: address + size wrapped(0xffffffff, 0x00000004)
Error: address + size wrapped(0xffffffff, 0x00000002)
Info : dropped ‘gdb’ connection

/code


If I increase the debug level to -d3 I see the following output before the termination:
code
Debug: 1341 733 stlink_usb.c:514 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x1
Debug: 1342 733 target.c:2314 target_write_u32(): address: 0x2000003c, value: 0x00000000
Debug: 1343 733 hla_target.c:766 adapter_write_memory(): adapter_write_memory 0x2000003c 4 1
Debug: 1344 735 stlink_usb.c:475 stlink_usb_error_check(): SWD_AP_FAULT
Debug: 1345 735 target.c:2788 target_wait_state(): waiting for target halted...
/code

 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs