Hi Robert,
You tried to allocate three variables to 0xC9000-0xC9004 .
However with your code, I don’t think this can work.
There are two solutions:
Solution 1:
volatile const UINT16 CalParameterA @ 0xC9000 = 1458;
volatile const UINT16 CalParameterB @ 0xC9002 = 6533;
volatile const UINT16 CalParameterC @ 0xC9004 = 12;
You don’t need put above code under #pragma CONST_SEG PAGE_0C. Because you already use @ defining variables to specific address, there is no sense to put it under PAGE_0C segment.
Solution 2:
In prm, define a section from 0xC9000
PAGE_0C_9000 = READ_ONLY 0x0C9000 TO 0x0C93FF;
...
USER_CONST_C9000 INTO PAGE_ PAGE_0C_9000;
In C code,
#pragma CONST_SEG USER_CONST_C9000
volatile const UINT16 CalParameterA = 1458;
volatile const UINT16 CalParameterB = 6533;
volatile const UINT16 CalParameterC = 12;
#pragma CODE_SEG DEFAULT
Hope this helps.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------