Skip to main content
Curtis B.
Associate III
March 28, 2020
Question

Debugging STM32H7 dual core

  • March 28, 2020
  • 5 replies
  • 4278 views

Hello everybody,

I got myself the Nucleo H755 to try the STM32 dual core processeros. I set up a project with the cubeMX configurator in Cube IDE. I wrote a short "Hello Wolrd" application in which both cores are running and blinking some LEDs. The programm is working so far as intended when I flash both MCUs, both cores are running.

However, when I try to debug the project, only the M7 core is running, the M4 core is not running. I set up the debug configurations for the cores according to the application note AN5361 "Getting started with projects based on dual-core STM32H7 microcontrollers

in STM32CubeIDE"

I use STLINK GDB Sever for debugging. When I launch the M7 Debug configuration, the M7 core is running and the M4 core is not running. When I start the M4 debug configuration while the M7 configuration is running as stated on page 19 in the application note, the core is not in running mode, but in halt mode. If I press the play button, the debug session crashes.

Has anyone experience in debugging dual core projects? Am I missing something?

Best regards,

Daniel

This topic has been closed for replies.

5 replies

Tesla DeLorean
Guru
March 28, 2020

I guess the real trick is not to need to single step your own code to know how it acts/behaves. Real time interaction and flow is much better seen with telemetry. Add instrumentation or side-channel displays as necessary.

With the professional tools (Keil, IAR) the approach is to have two instances running, one for each core with the source for each, and sharing the debug pod

https://www.st.com/resource/en/application_note/dm00597308-stm32h7x5x7-dualcore-microcontroller-debugging-stmicroelectronics.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
EZamo.1
Associate III
March 28, 2020

For starting out, is there a way to keep the M4 in reset, but still be able to use all the peripherals via the M7 alone? Or will some resources be unavailable?

We need the extended temperature range of the h745, but would prefer the simplicity of a single core like the h743!

TDK
March 28, 2020

There are debugger settings to halt the other cores while one is in debug. It's in the debug configuration. I know I had this working in STM32CubeIDE at one point.

Yes, you can use all peripherals with the M7 core.

You can keep the M4 core from booting by programming BOOT_CM4=0 in the option bytes. STM32CubeProgrammer can do this, among others.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Curtis B.
Curtis B.Author
Associate III
April 2, 2020

I finally got it working. I don't know why it works this way but here's how I did it:

I selected connect under reset for the CM4, too. I first start the CM7 debugging session, second, I start the CM4 debugging session. In the CM7 session I press the Play-Button to set the M7 core running. In the CM4 session I need to single step through the code until I reach the main loop. Then, I can press the play button for the M4 core and both cores are running.