cancel
Showing results for 
Search instead for 
Did you mean: 

How to know which data in hex files is for internal Flash & which is for External QSPI Flash?

N Sornakumar
Associate III

Hello Everyone,

I am working on a project in which we load hex or bin file in USB pendrive and stm32F7 will read this file over USB_FS using Fatfs. Then it will program it self using same hex file(IAP from USB pendrive ). if i am using only internal flash every thing is fine no doubt about hex or bin file, But if i will also use external qspi flash then IDE like cube ide or Keil are generating single hex or bin file for both Memory. Now my question is that how to identifies that which data in file is for internal flash and which one is for external one?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

In a HEX file, both the address and data are listed. So if it goes to flash, it'll be at 0x08000000, or around there. And if in external memory, it'll be listed to go somewhere else. It's not a very complicated format, and you can view it in Notepad.

https://en.wikipedia.org/wiki/Intel_HEX

A BIN file doesn't specify an address, so you need to track that elsewhere when the BIN is generated.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

1 REPLY 1
TDK
Guru

In a HEX file, both the address and data are listed. So if it goes to flash, it'll be at 0x08000000, or around there. And if in external memory, it'll be listed to go somewhere else. It's not a very complicated format, and you can view it in Notepad.

https://en.wikipedia.org/wiki/Intel_HEX

A BIN file doesn't specify an address, so you need to track that elsewhere when the BIN is generated.

If you feel a post has answered your question, please click "Accept as Solution".