This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Writing version number to software

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 memory
    You 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.

  • 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.

    Thanks 

    abby

  • abhishek Sabnis said:
    Please 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.

**Attention** This is a public forum