Does anybody has nice scheme for writing firmware version for the firmware. I am using a variable with constant integer (const int) for time being
for eg const int version number 0x V1. but problem with this is the memory block for const int keeps changing if i change any line in the code. so how can i have a fixed memory block dedicated to version number. do i need to write this version number as we write flash.
Thanks
Abby
If the firmware version number is reported by the firmware itself, then it doesn't matter where it is stored.
For data that must be persistent across firmware changes, or needs to be at a known position for production tools, you can use the INFO memory that every MSP has.
It is a separate, second flash block with smaller segment size. It is (except for the segment size) handled like the main memoryYou can define variables that reside in info memory, by manually assigning them to either a fixed memory location inside INFO memory are, or by manually placing them into the INFO segment (with a pragma or such - the procedure is compiler-specific)
Additionally, you can put the firmware revision number into an unused part of the vector table. So it will be flashed there like it were a normal interrupt vector (but rather is an INT with the version number) and therefore always at the same position. Check your compiler/linker manual about how to place variables at a fixed memory address.
_____________________________________Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.
Thanks jens.
I am using TI's code composer studio. Do you know where can i get information about INFO memory. Please tell me if you know any samples examples about usage of info commands in C.
abby
abhishek SabnisPlease tell me if you know any samples examples about usage of info commands in C.
INFO memory is just another chunk of flash that can be programmed and accessed like main flash. No special commands.
See the memory map sectopn and the flash controller section of users guide and device datasheet.Also, there is an applicaiton note about programming the flash at runtime, it should be available from the MSP product page.