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
  • This linker error "Error: L6220E: Execution region RW_IRAM2 size (280 bytes) exceeds limit (256 bytes)" has nothing to do with NoInit or zero_init. It simply tells you your RW_IRAM2 execution region has the size of 256 bytes. But the linker tries putting 280 bytes into it, which is beyond the size limit. 

    Thus, you can either increase the size of RW_IRAM2 or intentionally put less data into it.

Reply
  • This linker error "Error: L6220E: Execution region RW_IRAM2 size (280 bytes) exceeds limit (256 bytes)" has nothing to do with NoInit or zero_init. It simply tells you your RW_IRAM2 execution region has the size of 256 bytes. But the linker tries putting 280 bytes into it, which is beyond the size limit. 

    Thus, you can either increase the size of RW_IRAM2 or intentionally put less data into it.

Children