2024-01-15 05:41 AM
I am trying to flash the STM32H753I-EVAL-2 board with a .hex file generated from STM cube IDE version 1.14.0.
The code is build without error, but while loading it using the STMCube Programmer, I am getting the following errors:
Error: Failed to download Segment [1]
These are the options that I have selected while starting the programming :
External Loader selected: M29W128GL_STM32H743I_EVAL
KIndly help.
2024-01-15 09:22 AM - edited 2024-01-15 09:22 AM
Hello @Anupurba and welcome to the Community :)
Did you select the proper external loader in the STM32CubeProgrammer?
You can follow this link, it may help you on your setup.
You have also to add properly the M29W128GL to your repository. In CubeIDE, click on the "Run" options and go to the "Debug Configurations" or "Run Configurations" Menu.
Check the external loader used in the" Debugger" tab and select the appropriate version.
Hope this helped you.
2024-01-15 04:25 PM - edited 2024-01-15 04:27 PM
Size 2.23 MB? Hmm. There are only 2.0 MB available. Is the external flash used in the program too?
2024-01-15 05:04 PM
Might be the size of the .HEX, not the content. As ASCII probably about 2.5x larger than the binary data
2024-01-17 01:15 AM
Thanks for the suggestion, Actually I downloaded the STM Cube Programmer version from 2.15 to 2.14 and it worked.
2024-01-17 01:22 AM
I actually was following a video of touch gfx graphics from the ST microelectronics YouTube channel and followed the steps from there (I am an absolute newbie with using MCU boards, let alone STM 32). I wanted to use the binary file generated for flashing the MCU, but when I built the code from the STM32Cube IDE, the binary file did not get generated. Only .hex and .elf files got generated.
Is there any option that I need to select to generate the binary file (.bin)?
2024-01-17 01:23 AM
actually was following a video of touch gfx graphics from the ST microelectronics YouTube channel and followed the steps from there (I am an absolute newbie with using MCU boards, let alone STM 32). I wanted to use the binary file generated for flashing the MCU, but when I built the code from the STM32Cube IDE, the binary file did not get generated. Only .hex and .elf files got generated.
Is there any option that I need to select to generate the binary file (.bin)?
2024-01-17 01:27 AM
Hi, Thanks for the reply above, how do I know which is the correct external loader for my board. I am using STM32H753i-EVAL2 board, with 640 X 480 TFT color LCD screen.
2024-01-17 01:55 AM - edited 2024-01-17 02:08 AM
I advise you to follow the following guide to develop and add your own external loader to manage external memories:
2024-01-17 09:23 AM - edited 2024-01-17 09:51 AM
> Is there any option that I need to select to generate the binary file (.bin)?
@Anupurba If the program has data or code in both internal and external flash, you don't want to generate a .bin file. It will be huge. Instead, either keep using elf or hex (not very optimal formats....) or split the program to two binaries: internal flash part and external (may be several parts if the data in external flash is not contiguous). IAR and Keil have tools for this, or use objcopy to pick the needed data ranges. Then program these binaries one by one.