How to place a group of variables into specified RAM section

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to place a group of variables into specified RAM section

1,065 次查看
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 回复

952 次查看
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 项奖励
回复