How to place a group of variables into specified RAM section

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to place a group of variables into specified RAM section

858件の閲覧回数
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 件の賞賛
返信
1 返信

745件の閲覧回数
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 件の賞賛
返信