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.
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.
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.
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.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.