L1102 Out of allocation space in segment Z_RAM at address 0x8B

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

L1102 Out of allocation space in segment Z_RAM at address 0x8B

2,378 Views
Sunil_Reddy
Contributor I

Hi, I am porting uc/OS to MC9S08DZ60 MCU. The source code available is for MC9S08QE128. I got this project and complied and make using CW6.3. Everything is OK for QE128 MCU. But when I changed the device to DZ60 (using standard settings) Im gettign 2 link errors 1. L1102: Out of allocation space in segment Z_RAM at address 0x8B 2. L1119: Vector allocated at absolute address 0xFFFE overlaps with sections placed in segment. absseg0. for the second Link error L1119: I commented out few ISRs and 2 Link error disappeared. Is it correct way of doing? Before the above two errors I got compiler error like this "A13206: This instruction is available for derivatives with MMU "" For this, using standard setting I enabled MMU support and this error disappeared. Is it OK to do like this? after disappearing MMU support error and L1119 error, I tried for the 1st error by changing .prm file but do not have any luck so far. Can any one help me? Thanks in advance Sunil

Labels (1)
0 Kudos
9 Replies

837 Views
Lundin
Senior Contributor IV

It is impossible to answer these questions without looking at the source and the .prm file.

 

Did you import the .prm file from the old project? What register map did the old project use? What vector table did the old project use?

 

 

0 Kudos

837 Views
Sunil_Reddy
Contributor I

I used the old project's .prm file in new project (DZ60) but getting same error. Even I tried to match the setting of .prm file of DZ60 (new project) to Old project, when I did this I am getting Fixup overflow. I observed one thing in old project. There are some source and header files in the project directory but they are not included in the project for compilation and linking. How to do this one? Pls find the source code and .prm files (for old and new projects) as attachment. Hope to get some solution.

 

Inside the attachment there are two folders one is for .prm files and other is source code. 

0 Kudos

837 Views
kef
Specialist I

When you were switching from QE128 to DZ60, what memory model did you choose? It looks like you are using tiny memory model, which tries to put all variables and stack to ~128 bytes of available zero page RAM (Z_RAM segment in CW prm files). Try switching to non-tiny memory models.

0 Kudos

837 Views
bigmac
Specialist III

Hello,

 

I would also be very cautious about the error message with reference to a MMU requirement.  This indicates that the code may be making use of paged memory.  The 'QE128 does have a MMU and paged memory, whereas the 'DZ60 device does not.  Perhaps you will require a version of the code that does not make use of paged memory.

 

Regards,

Mac

 

0 Kudos

837 Views
kef
Specialist I

I think MMU is about linear address pointer usage, which of course is not available on DZ60.

0 Kudos

837 Views
bigmac
Specialist III

Hello,

 

The Memory Management Unit appears to encompass control of both extended program space and extended data space.  From the 'QE128 Reference Manual:

 

4.4.1 Features

Key features of the MMU module are:

• Memory Management Unit extends the HCS08 memory space

— up to 4 MB for program and data space

• Extended program space using paging scheme

— PPAGE register used for page selection

— fixed 16K byte memory window

— architecture supports up to 256, 16K pages

• Extended data space using linear address pointer

— up to 22-bit linear address pointer

— linear address pointer and data register provided in direct page allows access of complete flash

memory map using direct page instructions

— optional auto increment of pointer when data accessed

— supports an 2s compliment addition/subtraction to address pointer without using any math

instructions or memory resources

— supports word accesses to any address specified by the linear address pointer when using

LDHX, STHX instructions

 

And neither feature is available on the 'DZ60.

 

Regards,

Mac

 

0 Kudos

837 Views
kef
Specialist I

Yes, I know what MMU. I was wrong assuming that banked memory model (-Mb switch) should be enough to enable paged memory calls in CW. If it would be so, then -MMU switch could be used to enable linear address pointer usage. Indeed, compiler (V6.3) doesn't like and complains when -Mb is used without -MMU switch. It's weird a bit.

0 Kudos

837 Views
Sunil_Reddy
Contributor I
Hi all, thank you all for your replies. the reason for getting out of segmentation error is "QE128 can support upto 8K RAM memory, where as DZ60 supports 4K RAM only. So, I reduced some of buffer size so that it can fix within 4K RAM" About MMU. I shifted to work in CW 10.0 on Win 7 and was getting same error( This instruction is available for derivatives with MMU). I enabled the MMU support using project seetings and the error disappeared. Is it OK to do like this?
0 Kudos

837 Views
JimDon
Senior Contributor III

I would think that enabling MMU support for a device that does not have an MMU will not work.

Just because you have no build errors does not mean it will work.

You need to leave the settings for the DZ60 alone. The IDE creates them in a way that will work for that chip.

Then you need to un-segment the program, if there are pragmas to force segmentation.

I also see that Micrium does not have an HCS08 port other that QE, so to some degree you will have to probably tweak it.

 

0 Kudos