Flashing application into STM32H747
Hi everyone,
I’ve recently started exploring embedded software development, and I’m really eager to learn more, especially with STM32CubeIDE, which I began using about a month ago. Currently, I’m working with the Nicla Vision board that features an STM32H747AII6 microcontroller with dual cores: Cortex-M7 (CM7) and Cortex-M4 (CM4).
What I’ve Done So Far:
-
Arduino IDE Success:
I managed to create a simple LED blink project using the Arduino IDE, controlling LEDs from both CM7 and CM4 without any issues. The LEDs blink as expected. -
STM32CubeIDE Attempt:
To deepen my understanding, I tried replicating the project in STM32CubeIDE. Here’s my approach:- I enabled GPIOs, set up the RCC HSE ceramic resonator, and configured the clocks.
- In the generated code, I added the necessary toggle logic in the main.c files for both CM7 and CM4 projects.
- After building, I obtained two .elf files which I converted into .hex files using:
arm-none-eabi-objcopy -O ihex ledblink_CM7.elf ledblink_CM7.hex
arm-none-eabi-objcopy -O ihex ledblink_CM4.elf ledblink_CM4.hex
I then flashed the hex files using dfu-util with the following commands:
dfu-util.exe -d 2001:0344 -a 0 --dfuse-address 0x08040000:leave -D ledblink_CM7.hex
dfu-util.exe -d 2001:0344 -a 0 --dfuse-address 0x08100000:leave -D ledblink_CM4.hex
The Problem:
- The flashing process seems to go smoothly with no errors, but the LEDs do not blink as expected.
- I noticed that when trying to flash, the addresses 0x80000000 (CM7) and 0x81000000 (CM4) were not writable, but using 0x08040000 for CM7 and 0x08100000 for CM4 allowed flashing.
I’m still new to STM32CubeIDE, so I might be missing something basic. I’d really appreciate any guidance or suggestions on what I might be doing wrong or how I can troubleshoot further.
Thanks in advance for your help :))

