cancel
Showing results for 
Search instead for 
Did you mean: 

How can i read Hex file from STM32

simoBen47
Associate III

hey everyone,

I need to get access to device of STM32 board to read Hex file. any idea please ?

I am using STM32F401RE.

Simo

15 REPLIES 15

If you need to debug, either have an option to debug without the CRC / Signing, or write something to post-process the ELF, expanding the right sections so you can add the CRC / Signing at the end, or refactoring the ELF to consolidate sections, and add the CRC / Signing to the larger monolithic section.

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

OK but we have scripts that post process the binary into hex files, using objcopy. This produces a hex file (useful for production later in the development stages) with a CRC32 in the final FLASH section

With the old STM IDE I used to be able to download the binary image from the hex file and the symbols from the elf. The new GUI does not seem to give the option of reading a hex file.

That way I could debug with a pre calculated CRC32 (and make sure the CRC32 parameters were producing the correct CRC32 variant b[byte-reversed, xor's with 0xFFFFFFFF are two examples of variants]).

@rclar.6 In which CubeIDE version you cannot specify a hex file for download? (in debug startup tab)

 

STM32CubeIDE

Version: 1.13.2
Build: 18220_20230914_1601 (UTC)

(C) 2023 STMicroelectronics ALL RIGHTS RESERVED

 

 

The debug window (pic attached) only seems to offer elf or axf. I have even made the compiler produce .hex but this made no difference.

elf_only_verkligen.png

Thanks I tried this thinking that if there was a hex output from project properties it

would allow this in the debug window. After compiling successfully and creating a hex file

It does not seem to make any difference to the debug selector

though, only axf or elf files are offered.

 

In earlier version of the IDE this was possible.

 

 

After compiling for the hex output and then exiting the IDE and restarting it, I can now hand edit the source file in the GUI.