RTC_DATA_ATTR shows strange offset
Posted: Thu Jun 27, 2019 3:32 pm
First post here.
I have written an ULP program (which works 100%) using the macro assembler. I want to be able to access shared data between the ULP program and the main program. My understanding that this is done using the RTC_DATA_ATTR.
If I declare a structure using this method (shown below):
The address of the structure (`ulpvars`) shows at address 0x50000200, instead of 0x50000000 as I would expect.
This means, if I have a ULP program which exceeds 512 bytes (128 instructions), it would collide with this data area?
This is confirmed.
Places 0xFFFF at instruction 127 in RTC memory.
Do I have to force my assembly past this point to accommodate this offset?
ULP memory isn't so big that losing 128 instructions is acceptable to me.
I have checked all the libraries for other variable marked with this attribute and I cannot find any, my original thought was another library was storing data using this attribute and therefore pushing my declaration higher in memory.
I have written an ULP program (which works 100%) using the macro assembler. I want to be able to access shared data between the ULP program and the main program. My understanding that this is done using the RTC_DATA_ATTR.
If I declare a structure using this method (shown below):
Code: Select all
struct ulpvars_t {
int32_t counter;
};
RTC_DATA_ATTR ulpvars_t ulpvars;
This means, if I have a ULP program which exceeds 512 bytes (128 instructions), it would collide with this data area?
This is confirmed.
Code: Select all
ulpvars.counter = 0xFFFF;
Do I have to force my assembly past this point to accommodate this offset?
ULP memory isn't so big that losing 128 instructions is acceptable to me.
I have checked all the libraries for other variable marked with this attribute and I cannot find any, my original thought was another library was storing data using this attribute and therefore pushing my declaration higher in memory.