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


Connect to target without reset to debug already-running FW

Is it possible to connect the ST-Link SWD debugger to an already-running target to debug FW without resetting the target?

I found a similar question on electronics.stackexchangeQuestion but there weren’t any definite answers.

Things I’ve tried:

  • Different Eclipse debug configurations on the Startup tab. All options I’ve tried will connect but result in a target reset.
  • IAR’s ‘Attach To Running Target’ but it always resets the target. IAR said that other JTAG interfaces (I-Jet debugger) will do this.
  • The OpenOCD that comes with OpenStm32 but it also seems to reset the target. OpenOCD connects and I can issue commands to read memory via the telnet port but OpenOCD always resets the target. It’s possible that a .cfg file might need to be configured to NOT reset - I just haven’t figured out which .cfg to change and how to change it.
  • I tried the texane/stlink on GitHub on Windows and when it connects, it’ll reset unlesss I use the --no-reset option. This implies that the ST-Link/SWD hardware interface can connect without a reset.
  • I can use the ST-LINK_CLI.exe command line utility to connect to a running target and read RAM without a reset. I need the HOTPLUG parameter. For example, to read a 32-bit value at a particular address, I can use ST-LINK_CLI -c HOTPLUG -r32 0x20000450 1. This can repeatedly read the value without a reset which indicates that the ST-Link/SWD hardware interface can connect without a reset.


Why I want to do this:

  • I’m attempting to debug a condition that appears somewhat randomly on roughly 6 targets running in a lab environment. When the error condition occurs on one of the targets, I’d like to attach the debugger and inspect about 6 variables. Full debug capabilities would allow much quicker resolution of the problem. A reset causes the error condition to be erased.
  • It would be nice to implement a GUI, similar to STM-Studio, T.I.’s GUI Composer or IAR’s live-watch window used to talk via SWD/JTAG to display data as mentioned hereQuestion and hereQuestion.
Tunisia

Hello jimfred,

Yes it is possible biggrin

I have done some tests with STM32F429I-DISC1 and finally it works !

I have created a custom board config

custom.cfg
source [find interface/stlink-v2-1.cfg]
transport select "hla_swd"

source [find stm32f4x.cfg]

reset_config none


and modifed the stm32f4x.cfg, I have removed all reset parts (see atached file)

I have placed these files within project folder (beside the .cproject)

and finally I have created an Ac6 debug configuration as following
- Debugger TAB : use local script : custom.cfg
- Startup TAB :
- unchecked the “Reset and Delay” checkbox
- unchecked the “Halt” checkbox
- unchecked the “Load image” checkbox
- unchecked the “set breakpoint at” checkbox
- unchecked the “Resume” checkbox
- used the following initialization commands : monitor halt, stepi

Hotplug

Best Regards,
Tarek

Tunisia

To be noted that while connecting the core is halted (due to monitor halt)
and only one machine instruction is excuted (due to stepi) in order to refresh gdb debug context (refresh the GUI)