Link Error MC9S12C64

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

Link Error MC9S12C64

Jump to solution
1,954 Views
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
Labels (1)
Tags (1)
0 Kudos
1 Solution
588 Views
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

 

View solution in original post

0 Kudos
3 Replies
588 Views
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 Kudos
589 Views
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 Kudos
588 Views
Greeny
Contributor I
Thanks stanish. i corrected the pragmas and is seems to work.
0 Kudos