Storing hex file in particular address of flash memory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Labels:
-
STM32L0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-01 12:47 PM
There is a simple project for starting you can use this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-01 1:45 PM
Thank you. I will try this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-01 1:45 PM
Thank you.I am looking at it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-02 2:47 AM
