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.