2021-11-09 08:20 PM
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
Solved! Go to Solution.
2021-11-09 08:53 PM
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.
2021-11-09 08:53 PM
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.