Hello,
I am working with a MSP430F5438A and CCS Version: 5.5.0.00077 and TI compiler version 4.2.4
I declared 2 memory sections in the linkerfile because I want to place some data there.
MEMORY
{
...
DATA_A : origin = 0x45800,length = 0x200
DATA_B : origin = 0x45A00,length = 0x200
...
}
In the sections file I have placed:
SECTIONS
{
...
.dataA : START(dataA_start), SIZE(dataA_size)
{} > DATA_A /* storage area for data Page A */
.dataB : START(dataB_start), SIZE(dataB_size)
{} > DATA_B /* storage area for data Page B */
...
}
and in source code:
...
#define DATA_A_STARTADDRESS (const unsigned int *) _symval(&dataA_start)
#define DATA_A_SIZE _symval(&dataA_size)
#define DATA_B_STARTADDRESS (const unsigned int *) _symval(&dataB_start)
#define DATA_B_SIZE _symval(&dataB_size)
extern char dataA_start, dataA_size; /* the type does not matter! It is a linker file variable, it has no address only a value. */
extern char dataB_start, dataB_size; /* the type does not matter! It is a linker file variable, it has no address only a value. */
...
The defines I use in the source code. The startaddress is working and returning the first address of the reserved memory part. but the size stays 0.
I have also tried:
- RUN_SIZE()
- LOAD_SIZE()
- END()
but they all return 0. It seems now that only the START() function is working. Is there something I do wrong? I would like to let the RUN() and END() also work.
Best regards,
Jeroen