Skip to main content
Sm.1
Associate II
November 23, 2023
Question

how to differentiate boot code data and application data in .HEX file

  • November 23, 2023
  • 2 replies
  • 1231 views

hi I'm using stm32f439 ARM controller for my development here im calculating checksum by accessing my code memory starting from 0x08000000 to up to 2Mb data and EXORING for my code checksum. but when i calculate the data from .HEX its not same, so some source get to know that .HEX file contains boot code data too so  how to differentiate boot code data and my code data in .HEX file.

@stm32f439

thank you 

suguresh M

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
November 23, 2023

If you XOR the entire memory space does it matter?

You probably want something more robust.

The HEX file is apt to have void and can potentially be non-linear. To check or sign you need to convert to a binary using the same fill or pad values as the writing tool and Flash default. 

To recover symbols for different data lengths and structures you could use the .ELF object, or store values in recoverable locations like the vector table.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Sm.1
Sm.1Author
Associate II
November 24, 2023

hi Tesla

Sm1_1-1700808628373.png

 

 

DeLorean  actually its for our application requirement I'm doing it. means once i loaded the code means next time  it will calculating 32bit checksum for my requirement. Flash address is 0x08000000 where our application starts storing in flash.

Is .BIN file only holds application information or boot data too?