Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


[resolved] Failing debug on a Nucleo-F103RB

Hi everyone,

I have an issue trying to debug my project. I use sw4stm32 (2.3) on a windows 10. My board is a Nucleo-F103RB configured thanks to stm32cubemx (4.23).

Configuring, compiling, running the project on the board works fine, but there’s an issue when I try to debug it, as you can see on the report downstairs. Afterwards, the programming led turns orange.

The weird thing is that it used to work couple of weeks ago. I have tried different configurations using another computer (windows 7) and another board (Nucleo-L053R8), but the problem remains the same.

I updated the stlink firmwork, tried couple of things I found on other threads, but I can’t solve my problem.

Do you see what I’m doing wrong?

Regards,

Cedric.

=====
OpenOCD child process termination

Reason:
Unplugged target during debug session

- Details -

Unplugged target during debug session
Open On-Chip Debugger 0.10.0-dev-00005-g4030e1c-dirty (2017-10-24-08:00)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.htmlQuestion
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter_nsrst_delay: 100
adapter speed: 950 kHz
Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v29 API v2 M v18 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 58.019050
Info : Stlink adapter speed set to 950 kHz
Info : STM32F103RBTx.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting ‘gdb’ connection on tcp/3333
Info : Stlink adapter speed set to 950 kHz
adapter speed: 950 kHz
STM32F103RBTx.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080012f0 msp: 0x20005000
Info : Stlink adapter speed set to 4000 kHz
adapter speed: 4000 kHz
Info : device id = 0x20036410
Info : flash size = 128kbytes
Info : Stlink adapter speed set to 950 kHz
adapter speed: 950 kHz
STM32F103RBTx.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080012f0 msp: 0x20005000
Info : Stlink adapter speed set to 950 kHz
adapter speed: 950 kHz
STM32F103RBTx.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080012f0 msp: 0x20005000
Info : Stlink adapter speed set to 4000 kHz
adapter speed: 4000 kHz
STM32F103RBTx.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000003a msp: 0x20005000
Info : Stlink adapter speed set to 950 kHz
adapter speed: 950 kHz
STM32F103RBTx.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080012f0 msp: 0x20005000
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: JTAG failure -4
Error: jtag status contains invalid mode value - communication failure
Polling target STM32F103RBTx.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 100ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target STM32F103RBTx.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 300ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target STM32F103RBTx.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 700ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target STM32F103RBTx.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 1500ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target STM32F103RBTx.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 3100ms
shutdown command invoked


Info : dropped ‘gdb’ connection

Hi,

There was an issue on F1 projects with CubeMx, by default, i think the SWD was disabled.

To enable SWD debug on STM32F1 devices, you need to configure in the cubeMx the “Pinout -> SYS -> Debug -> Serial Wire”.
Have you done that ?

And then try again to debug.

Rgds,
Laurent

That’s it!

You were right, the ‘SYS Debug option’ on CubeMX is off by default. It seems to work so far, thanks a lot Laurent.

Regards,

Cedric.