Constant Data at Fixed Flash Address.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-02-12 1:33 PM
I have a boot loader that resides in the first flash block of an STM32F4 family processor which is 16K begining at 0x08000000. I would like the last four byte of the sector at 0x08003ffc to contain constant data representing a version number.
Any suggestions? I am using Atollic tools which are GCC based. I would prefer a C/C++ solution but could use assembler if necessary. My current knowlege of ARM assembly is fairly limited. John- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-02-12 1:52 PM
Any suggestions?
Specify an address, or memory/section in the linker script, and define the ''attributes'' of the variable to direct it's placement. Google some documentation and examples for GNU linker scripts.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
‎2013-02-13 7:40 AM
Thanks. If I make one section just for the version, that should work.
John- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-02-13 1:29 PM
I used the interupt vectors as an example for the linker file (to define a section similar to
.isr_vector
) and the startup.s file (to defined data within the section as is done with the vector table). The defined values showed up in the s-record at the expected address. John