cancel
Showing results for 
Search instead for 
Did you mean: 

Constant Data at Fixed Flash Address.

johnsotack9
Associate II
Posted on February 12, 2013 at 22:33

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
3 REPLIES 3
Posted on February 12, 2013 at 22:52

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.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
johnsotack9
Associate II
Posted on February 13, 2013 at 16:40

Thanks.  If I make one section just for the version, that should work.

John

johnsotack9
Associate II
Posted on February 13, 2013 at 22:29

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