unintialize of variable at diffirent segments

cancel
Showing results for 
Search instead for 
Did you mean: 

unintialize of variable at diffirent segments

1,401 Views
Contributor III

Hi,

I need to locate the variables in different segments of the memory (ROM or RAM ) without initialization (not initialization to 0 at the start up time). 

 

in IAR IDE , we can use no_init syntax to the variables. 

 

ex: 

#pragma segment = "ABC"  

__no_init int varaible1; 

__no_init int varaible2; 

 

I just to know what is the syntax for gcc compiler to for not to initialize the variable. 

below code is to locate the variable to paricular segment but it is initialized to 0. 

__attribute__((section(".ABC"))) int varaible1; 

 

Kindly help me in this. 

 

Regards, 

Ambarish

Labels (1)
1 Reply

7 Views
NXP Employee
NXP Employee

Hello,

maybe this is the point you are looking for GNU Linker, can you NOT Initialize my Variable? | MCU on Eclipse . Please check and eventually let me know.

Regards,

Martin