2020-05-04 07:02 PM
I have an application built in CubeIDE that utilizes both cores on the H747I-Disc1 board. The M4 core collects data and uses HSEM to notify the M7 core to process it.
In debug mode I can run this just fine by first launching the M7, letting it run and then launching the M4 core and stepping through it, (Similar to this guide https://www.st.com/resource/en/application_note/dm00629855-getting-started-with-projects-based-on-dualcore-stm32h7-microcontrollers-in-stm32cubeide-stmicroelectronics.pdf)
However when I want to run the release build I typically use the CubeProgrammer to download the bin file to the MCU. The issue is I have no idea how to download both bin files (CM4.bin and CM7.bin) correctly. Do I need to change an offset somewhere in flash? Can I combine the bin files into one?
In general I have found the documentation regarding dual core applications for this chip to be pathetic. Even the github examples (https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H747I-DISCO/Examples/HSEM) only discuss basic semaphores. Any links to more in-depth/helpful examples for this use-case would be greatly appreciated.
2020-05-04 07:20 PM
The code typically resides at different addresses within the dual port Flash. The CM7 at 0x08000000 and the CM4 at 0x08100000. Look at your Linker Script.
People typically use .HEX files for sparse memory images, but you could make a 2MB monolithic binary too.
2020-05-05 12:24 AM
Debugger of CubeIDE can load several files for debug session. Have you tried this?
-- pa
2020-05-05 06:28 AM
Clive,
Thanks for the response.
Just to clarify, the process you suggest would be to compile the CM4 and CM7 cores as separate .HEX files. Then flash CM7.HEX to 0x08000000 followed by flashing CM4.HEX to 0x08100000 in CubeProgrammer? For me the start address in CubeProgrammer is only an option if I am using a .bin file? For hex files that option is greyed out. Is there some other step I am missing.
How would one go about making a monolithic bin file with both core?
Thanks
2020-05-05 06:30 AM
Pavel,
As I noted in my original post the debugging is working fine in CubeIDE with multiple cores. I am interested in flashing the release version of the code. Can one do this in CubeIDE as well? If so can you elaborate?
Thanks
2020-05-05 11:14 AM
> I am interested in flashing the release version of the code.
From the IDE view, flashing is similar to debugging. You just stop after flashing and do not proceed with debugging. Configuration is like for debugging.
Or, use other tools: Cube Programmer GUI or command line, ST-Link utility...
-- pa