Tool/software:
I'm trying too section off some section of Flash specifically for some constants with the MSPM0G3507 and TI Clang compiler.
I have the following lines of code:
#pragma clang section data=".CRC"
uint32_t crc_start_addr = FLASH_ORIGIN_CRC;
uint32_t crc_length = FLASH_LENGTH_CRC;
uint32_t crc_crc = 0;
uint16_t crc_version = 0x1234;
uint16_t crc_part_number = 0x5678;
#pragma clang section data=""
Then in the linker, I have:
MEMORY
{
FLASH (RX) : origin = 0x00000000, length = 0x0001FFF0
FLASH_CRC (RX) : origin = 0x0001FFF0, length = 0x00000010
SRAM (RWX) : origin = 0x20200000, length = 0x00008000
...
}
SECTIONS
{
...
.CRC : > FLASH_CRC
...
}
I see the variables in the right place in memory, but I do not see them with the correct initial values. All the bits are just 1s.