How to place a group of variables into specified RAM section

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to place a group of variables into specified RAM section

435 Views
yizhou
Contributor I

Dear,

My target is to place a group of variables into specified RAM section.

 

I updated the LCF file like:

    internal_ram:          org = 0x40000000,   len = 0x00013000

   calcram:      org = 0x40013000,   len = 0x00001000

 

and add section:

 

/calbiration section/

.calc_symbols(NOLOAD) : {

   . = ALIGN(4);

   *(.calc_symbols)

   . = ALIGN(4);

} > calcram

 

 

the global varible is declared as:

__attribute__ ((section(".calc_symbols"))) uint16_t  TaskTick;

but the CodeWarrior always reports an error:

section '.calc_symbols' must have an uninitialized data section for object 'TaskTick'

In fact, I prefer to use #pragma command to specify data section or code secton for some variables or functions.

I believe codeWarrior can support it, but how to use it? And where to find a helpful document on NXP website?

 

Thanks and BR

Zhou Yi

CellPhone: +86 189 51964529

CT DD DS AA CN NJ

 

 

 

Original Attachment has been moved to: OldCCP.zip

0 Kudos
1 Reply

322 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

please check the example in the post attachment. Check mainly linker file and main.c file.

If you have any other questions, please feel free to write me back.

Regards,

Martin

0 Kudos