Hello all!
I am very new in microcontrollers...i searched long time through the forum, but I couldn't find something similar to my problem.
I trying to programm a HC9S08QE8 with USBDM and CodeWarrior for Eclipse. I got some sample code from freescale with my sensor toolbox. Now I am having the following problem:
ERROR L1102: Out of allocation space in segment RAM at address 0x1C8
Most of the variables are stored according #pragma DATA_SEG __SHORT_SEG _DATA_ZEROPAGE.
The prm file is like that:
SEGMENTS
Z_RAM = READ_WRITE 0x0060 TO 0x00FF;
RAM = READ_WRITE 0x0100 TO 0x025F;
ROM = READ_ONLY 0xE000 TO 0xFFAD;
ROM1 = READ_ONLY 0xFFC0 TO 0xFFCD;
For the project I am using the memory model SMALL.
Can you help me to fix that problem, please.
br
max
Solved! Go to Solution.
Hello
According to your ,map file you have following objects which will be allocated in RAM:
fifo_data (size 0xC0), BufferTx (size 0xC8) and stack (size 0x40).
This makes a total of 0x1c8 bytes, which does not fit into the RAM area (0x0100 TO 0x025F).
Try to define smaller fifo_data and/or BufferTx.
CrasyCat
Hello
Apparently the area RAM (0x0100 TO 0x025F) is not big enough to hold all data you want to allocate there.
Check the generated .map file. It should indicate which variable could not be allocated.
CrasyCat
Hello CrasyCat
Thank you for your fast response.
Most of the variables are indicated as error. Is it possible, that I missed some settings for the linker in codewarrior. Thats the original AN3922 code for the sensor toolbox, and I supposed that I won`t have problem to compile it again. I am very confused...I tried to compile that with several settings, but without luck.
Maybe the attached .map file can tell you (the expert) what I am doing wrong.
Hello,
I'd suspect this might be caused by the size of the stack.
Could you doble check stack fits the RAM?
RAM includes 200 bytes variable BufferTX so the remaining space for stack < 0x98 (152 Bytes)
Stanish
Hello!
At the project.prm there is the size of the stack defined as followed:
STACKSIZE 0x40
should be ok
I checked the rest of the prm file in relation to the memory map. Should be no problem.
Is it possible that I missed a linker or compiler setting ?
Hello
According to your ,map file you have following objects which will be allocated in RAM:
fifo_data (size 0xC0), BufferTx (size 0xC8) and stack (size 0x40).
This makes a total of 0x1c8 bytes, which does not fit into the RAM area (0x0100 TO 0x025F).
Try to define smaller fifo_data and/or BufferTx.
CrasyCat
Hey!
Ah...I am so stupid.
Thank you....it is working now!!
Thank you for this great support