Hi there,
I would like to store a 32-bit serial number at a fixed location in Flash, preferably just after the interrupt vector table, so that it is easy for an automation script to modify the HEX file and insert a new serial number for each device.
In GCC I would declare the serial number like this:
/// Device address stored in fixed location 0x080000c0 (After Vector Table) const uint32_t serial_nr __attribute__ ((section (".fixed"))) = 0xaabbccdd;
And then I would modify the linker script like this:
SECTIONS { /* ISR_VECTOR section contains the ARM vector table */ .isr_vector : { KEEP (*(.isr_vector)) . = ALIGN(4); } > FLASH /* Constants stored at a fixed location; after ISR vector table */ .fixed : { KEEP(*(.fixed)) . = ALIGN(4); } > FLASH
I'm using CCS 11.0.0.00012 and Simple Link CC13x0 SDK 4.20.01.03 and it is a NoRTOS app.
Thanks in advance,
Pieter