2020-05-01 11:58 AM
Hello, I want to store a hex file in the particular address of flash memory . I am using the stm32L083cz which has 192 kb flash memory.
Flash starts at : 0x0800 0000
Want to store hex file at the address : 0x0801 50001
Please guide me through this. I am developing over the air firmware upgrade application for this microcontroller.
Thank you In advance.
2020-05-01 12:08 PM
Are you trying to build a firmware file that has the file at that location? Or are you trying to write to that location within your program?
2020-05-01 12:23 PM
It is just data, put it where ever you want.
The .HEX file encoding isn't that efficient, you might want to unpack it or use binary.
The Intel HEX format has several decades of usage, should be some material you can reference, or copy
2020-05-01 12:45 PM
At first I wanted to store the hex file at the particular address location. so I can afterwards copies it to the start of flash so I can run the hex file.
2020-05-01 12:47 PM
There is a simple project for starting you can use this.
2020-05-01 12:47 PM
So I have to change the hex file into binary and then store into the location ?
Is it right?
2020-05-01 12:57 PM
It is just data (collection of bytes), you can just store, it or process it, your call.
Perhaps if you're unfamiliar, you could write some PC side software, using basic File IO and process and digest the data until you are comfortable with managing it and manipulating it, and then migrate the working understanding into your embedded platform.
Once you've staged the data in the holding location (0x08015000) you can move it elsewhere to replace the code at 0x08000000
.HEX files will typically be about 2.5x larger than the binary data they are describing. So inefficient to transmit over the network, and to stage on the device.
2020-05-01 01:45 PM
Thank you. I will try this
2020-05-01 01:45 PM
Thank you.I am looking at it
2020-05-02 02:47 AM