2018-08-03 05:42 AM
hey everyone,
I need to get access to device of STM32 board to read Hex file. any idea please ?
I am using STM32F401RE.
Simo
2018-08-03 06:07 AM
Use the ST-LINK Utilities, read memory, save as a .HEX file.
Use Keil Debugger, and SAVE command at console.
Use the System Loader, pull data with protocol and save to file.
2018-08-03 07:00 AM
Thank you for your reply.
What I need exactly, is to be able to manipulate in real time the firmware after having programmed STM32.
For example read it and check its integrity...
Simo
2024-02-12 08:38 AM
Exactly what I am trying to do. I have read in the binary modified it to contain a CRC32
and now want to read my modified hex file in, with the symbols coming from the
'elf' file. But the only file types I seem to be offered are elf and something called 'axf'.
I want to be able to use the hex file because that is what production get
2024-02-12 08:40 AM
me too. I know it used to read the hex file for the flash data and the lef file for the symbols. so you could debug the actual hex file that had , say, a CRC32 checksum in it.
2024-02-12 08:46 AM
@rclar.6 wrote:the only file types I seem to be offered are elf and something called 'axf'.
I want to be able to use the hex file because that is what production get
Tools are available to convert from AXF or ELF to HEX; eg, objcopy
https://ftp.gnu.org/old-gnu/Manuals/binutils-2.12/html_node/binutils_5.html
https://stackoverflow.com/questions/19458031/how-to-create-a-executable-hex-from-elf-file-format
2024-02-12 08:48 AM
It used to offer hex images, but now it only seems to offer the elf file
2024-02-12 08:57 AM
IDE -> project -> properties ->
in debug -> hex file
2024-02-12 09:33 AM
AXF files are ELF files, they are usually coming from Keil / Realview
Binary files might be easier to output. Generating HEX files shouldn't be that hard, Intel/Motorola have been using these forms since the 1970's, they are well documented, and well within the scope of an average programmer. Perhaps looks at SRECORDs project if you need source to work from.
.HEX and .BIN won't provide symbols, but you could derive lengths of file, or use vectors or unknown locations with size. The .MAP would have symbols.
One could also just process .ELF to .BIN or .HEX whilst adding CRC, SHA or SEC signing, and then exporting.
2024-02-12 09:34 AM
That's for INPUT to the DEBUGGER, you need options of OUTPUT from the LINKER
Could use OBJCOPY or FROMELF