Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

where to store firmware version no.

Status
Not open for further replies.

akshada

Member level 3
Joined
Jun 29, 2010
Messages
67
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
india
Activity points
1,746
hello friends,
I have written an customized bootloader which updates my firmware via wifi. every thing is working fine.I only want to keep track of the firmware version numbers.can anybody help me where can i write my firmware version in the flash?

Thanks in advance.
 

Define a string for the version foe example #define Version V1.001
 

yes you are right but in this case i won't be able to read the version when in bootloader.
Thanks for the reply
 

yes i got what i was looking for but have one doubt...we can reserver flash address for a variable at using _attributes_. I am using GCC compiler .But what if i dump the hex code generated to my flash using some utilities at the respective address.will that too be able to store the variable at the decided address.

thanks in advance..
 

How are you planning to use this number? is it for verification at the bootloader? or to send data to another device (like send version number to PC via communication)?

if you plan to verify the version at the bootloader, you NEED to place this number in a known and exact location at the flash memory (say the last addresses of the useful flash memory space... mmmm I will give a look but i think you have to use avr-objcopy to write it in the exact location you need.... (by defining/using a section and setting an address space for it)

If you intend to use it in execution... well, why not a simple function getVersion() that returns the actual version number... to print or send via communication... of course the value returned by this function could be setted by a #define like @klystron suggested
 

I am using STM32f100xx.
FLASH size :128K
RAM size :15K
and i am writing a custom bootloader to load my application from server using wifi.
my bootloader address is 0x08000000 and my application address is 0x08009000.
bootloader size is 15KB and application is of 60K

So, i wanted a variable to store the currrent firmware version. which will be common for both bootloader and application.For that i used compiler directives to store reserve a fixed location but it is written at 0x0800FC00 which comes between bootloader code area and application area.
I am able to write a value at fixed location in flash using compiler directive.but my doubt is if suppose instead of compiling all the time for each new hardware. if i dump only the hex image of the bootloader and application at their respective addresses using ST-link utility, will the variable be written in the flash in this way as the location is out of the bootloader or application size..

thanks.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top