This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NoInit , zero_init issues

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.   

Parents
  • 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 :)

Reply
  • 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 :)

Children
No data