Link Error MC9S12C64

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

Link Error MC9S12C64

跳至解决方案
2,715 次查看
Greeny
Contributor I

Hi,

 

i´m trying to implement an ISR to my project in Codewarrior using the MC9S12C64 µC. But when i try to link then i get an allocation error:

 

Link Error : L1102: Out of allocation space in segment RAM at address 0x4000

 

In the map file i found that the Cap1_Data of the ISR is written in to RAM from 3000 to 3FFF.

Its just an empty ISR with no code wirtten yet.

 

i attached my project here, so hopefully you can help me.

 

 

Message Edited by Greeny on 2009-05-12 08:22 AM
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,349 次查看
stanish
NXP Employee
NXP Employee

Hi Greeny,

 

It seems you don't use #pragma to place constants correctly.

I'd suggest you to use:

 

#pragma CONST_SEG ROM_VAR

 

instead of  

 

#pragma ROM_VAR WINKEL_ROM

#pragma ROM_VAR TRIGGER_ZAHN_ROM   

#pragma ROM_VAR DEG_ABS_TOOTH_ROM

 

and 

 

#pragma CONST_SEG DEFAULT

 

instead of 

 

#pragma ROM_VAR DEFAULT

 

 

or you can create separate entry in PLACEMENT section of prm file for each constant if you need to have these constants at specific addresses: e.g. 

 

...

PLACEMENT 

WINKEL  INTO  WINKEL_ROM

...

 

and then you can use:

#pragma CONST_SEG WINKEL

...

 

 

Stanish

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,349 次查看
Lundin
Senior Contributor IV
There is no .prm file in the project. I don't think it is possible for CW to work without one.
0 项奖励
回复
1,350 次查看
stanish
NXP Employee
NXP Employee

Hi Greeny,

 

It seems you don't use #pragma to place constants correctly.

I'd suggest you to use:

 

#pragma CONST_SEG ROM_VAR

 

instead of  

 

#pragma ROM_VAR WINKEL_ROM

#pragma ROM_VAR TRIGGER_ZAHN_ROM   

#pragma ROM_VAR DEG_ABS_TOOTH_ROM

 

and 

 

#pragma CONST_SEG DEFAULT

 

instead of 

 

#pragma ROM_VAR DEFAULT

 

 

or you can create separate entry in PLACEMENT section of prm file for each constant if you need to have these constants at specific addresses: e.g. 

 

...

PLACEMENT 

WINKEL  INTO  WINKEL_ROM

...

 

and then you can use:

#pragma CONST_SEG WINKEL

...

 

 

Stanish

 

0 项奖励
回复
1,349 次查看
Greeny
Contributor I
Thanks stanish. i corrected the pragmas and is seems to work.
0 项奖励
回复