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

Named regions with zero_init attribute

Hi,

I've some confusion with named regions and their attributes. In my case, I've a named region as below:

and then in the linker scatter file, I have:

Now, let's say I declare a global variable as below in some .c file:

Now according to the information here, my understanding is that as 'testVariable' is a Read/write variable and as I've 'zero_init' attribute also mentioned, here, 'testVariable' will be zero initialized (i.e. testVariable = 0) and will be placed in this named region 'data_shared_zi'. Please confirm and also, please let me know, how i can verify this. (I know, at the runtime, i can at least check if 'testVariable' is indeed set to zero, but i think, it should be somehow possible to verify the placement of 'testVariable' and it's initial value by some tools before running the program as well.

P.S.
I've some more follow up question on named regions :-)

0