cancel
Showing results for 
Search instead for 
Did you mean: 

Flashing application into STM32H747

sosopina
Visitor

 

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:

  1. 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.

  2. 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 :))


Click to collapse STM32 MCUs category

3 REPLIES 3
liaifat85
Senior III

In your CM7 project, ensure you have code to release CM4 from its reset. This usually looks like:

HAL_RCCEx_EnableBootCore(RCC_BOOT_CM4);  // Enable boot for CM4

 

SofLit
ST Employee

Hello @sosopina and welcome to the community,


@sosopina wrote:

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.

Click to collapse STM32 MCUs category


Not sure I understood the problem here.  Are you toggling two LEDs each one from one Core? If yes, does they toggle only when CM7 Flash is at 0x08040000 ? which one is failing the one of CM4 or the one of CM7?

And if you use the STM32CubeProgrammer tool to upload your application, do you get the same behavior?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

https://store-usa.arduino.cc/products/nicla-vision

Probably relates to an Arduino Boot Loader, loaded and protected at 0x08000000, and what it's criterion for running whatever you've built/placed at 0x08040000.

You'll likely need to get involved in the specific details of the implementation.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..