Skip to main content
N Sornakumar
Associate III
November 10, 2021
Solved

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

  • November 10, 2021
  • 1 reply
  • 961 views

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

This topic has been closed for replies.
Best answer by TDK

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.

1 reply

TDK
TDKBest answer
November 10, 2021

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""."