Hi,
I need to define some variables which will not be initialized at start up.
I am defining the following:
1. In the code:
var1 __attribute__( ( section( "NoInit"),zero_init) );
2. In the "options for target" I defined the following:
3. In the relevant file (which is my main.c) I defined in the "options for file" that the "zero initialization data" will be from IRAM2.
When compiling I get the following:
.\_build\nrf52832_xxaa.axf: Error: L6220E: Execution region RW_IRAM2 size (280 bytes) exceeds limit (256 bytes). Region contains 0 bytes of padding and 0 bytes of veneers (total 0 bytes of linker generated content).
I tried changing the definitions to even to 4 bytes and it didn't help, still the same error as above (just claiming 4 bytes not 256 bytes).
Any idea?
Maybe there is a different way to define "no zero" \"no init" variables ?
Thanks,
Shaked.
Hi, thanks for your answer.
Even when changing the size to 4 bytes it is still the same issue...
Maybe I need to define more things?
Thanks, Shaked.
previously you had defined 256 bytes for RW_IRAM2, which is not big enough so that you got linker error L6220E. Now you reduce it to 4 bytes. What do you think...?
Oh ChenTang, you are right, I read the exact opposite of what you wrote ... sorry for that, I had my brain locked on something that I just got stuck on it :(
Now, changed the size to 300 bytes, it seems to be working.
Thank you ChenTang :)