cancel
Showing results for 
Search instead for 
Did you mean: 

Custom External Loader for STM32H730 with MX25LM51245GXDI00 Flash

HispaEmo
Associate III

Hello ST Community,

I’m working on a project where I initially developed software on the STM32H735 evaluation board. Now, I need to port this project to a custom board using the STM32H730 microcontroller. The external flash memory is the same as the one on the H735 (MX25LM51245GXDI00), with the only difference being three pins: DIO2, DIO4, and DIO6.

In my project, I use FATFS to load a .bin file into the external memory and then jump to execute it. I’ve also tested the external flash memory and confirmed that it works correctly on the custom STM32H730 board. This gives me confidence that the external memory is correctly wired and functional.

I’ve followed several tutorials, meticulously implementing all steps to create an external loader, including adding the required .c and .h files, linker scripts, and StorageInfo. However, I’m still stuck, and the loader does not work. Along the way, I’ve solved several compilation issues, such as:

  • Adding #define KeepInCompilation __attribute__((used))
  • Including static int SystemClock_Config(void)
  • Verifying that StorageInfo is exactly 200 bytes in size.

Issue with .stldr Generation

One peculiar issue I’ve noticed is with the .stldr file. If I generate it using a Linux post-build command like:

arm-none-eabi-objcopy -O binary PlacaBoot.elf PlacaBoot.bin && cp PlacaBoot.bin PlacaBoot.stldr

The .stldr file is created (~200KB), but STM32CubeProgrammer does not recognize it.

 

On the other hand, if I rename the .elf file directly to .stldr (e.g., PlacaBoot.elf to PlacaBoot.stldr), CubeProgrammer recognizes it, but the file is around 2MB in size, significantly larger than the .stldr generated by the Linux command.

Could this size difference indicate an issue? I’ve also tried using:

cmd.exe /C copy /Y “${BuildArtifactFileBaseName}.elf” “${BuildArtifactFileBaseName}.stldr”

But since I’m on a Linux environment, the command fails because cmd.exe is not available.

 

Theoretical Assumption

Theoretically, if I modify the pin definitions in the external loader for the STM32H730 custom board to match the STM32H735G-DK board, the loader should work. However, I encounter the same issue on the STM32H735G-DK.

Logs and Additional Context

I’ve attached logs from STM32CubeProgrammer and my project files for review. I believe these might help pinpoint the issue. A working external loader project for the STM32H735 would also help as a reference, but it needs to be modifiable (not in .stldr format) so I can adjust the pin configuration.

Request for Help

I’ve been stuck on this issue for days now, and I would deeply appreciate any advice or guidance. If there’s any glaring mistake in my setup or approach that I might have missed, please let me know.

Thank you so much for your time and support!

0 REPLIES 0