ERROR L1102 when migrating source code built by CW 6.3 to CW 10.2 project

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

ERROR L1102 when migrating source code built by CW 6.3 to CW 10.2 project

804 Views
JohnHomer
Contributor I

Chip is MC9S08QG8. I'm a newbie of CW and try to build a bunch of C code files with CW10.2.

The like error message is:

   ERROR L1102: Out of allocation space in segment ROM_HWTEST at address 0xE3E1

 

The content of *.prm file is:

 

NAMES

END

SECTIONS

Z_RAM =

READ_WRITE 0x0060 TO0x00FF;

RAM =

READ_WRITE 0x0100 TO0x025F;

ROM =

READ_ONLY 0xE400 TO0xFDBF;

ROM_HWTEST =

READ_ONLY 0xE200 TO 0xE3FF;

END

PLACEMENT

DEFAULT_RAM,

/* non-zero page variables */INTORAM;

 

DEFAULT_ROM, ROM_VAR, STRINGS

INTOROM,ROM_HWTEST;

_DATA_ZEROPAGE,

/* zero page variables */

MY_ZEROPAGE

INTO Z_RAM;

END

INIT

_EntryPoint /* The entry point of the application. This function is generated into the CPU module. */

STACKSIZE

0x0040 /* Size of the system stack. Value can be changed on the "Build options" tab */

 

Could anybody have any clue about this problem, or how can I compare the configurations, arguments, etc. of the new project and old project?

 

Thanks a lot!

-Hong

Labels (1)
Tags (1)
0 Kudos
3 Replies

479 Views
bigmac
Specialist III

Hello Hong, and welcome to the forum.

 

It would seem that your compiled code size  has reached the limit for the combined ROM and ROM_HWTEST sections.  However, the memory range 0xE000 to 0xE1FF is currently unused by the application.

 

You could gain an extra 512 bytes of flash by altering the PRM file so that ROM_HWTEST section covers the range 0xE000 to 0xE1FF, and the ROM section from 0xE200 to 0xFDBF.

 

It is possible that the later compiler may generate a different code size from the earlier compiler, perhaps because of different optimization settings.  Compare the map files for the project, to see where compiled size differences may have occurred.

 

Regards,

Mac

 

0 Kudos

479 Views
JohnHomer
Contributor I

Hi, all,

 

      Thanks for your answers. Finally, I figured out the problem.

      1. As theo said, the project was built in 6.2, and then built in 6.3 without any probklem. Now when I use the importer for classic CodeWarrior project, the code can be imported, but the ProcessorExpert files were not imported. Because I have several configurations in the project, some worked and some not, I can't switch to another configurations.

          I solved this problem by generate a new PE file in the 10.2 project, and use the PE file in the old 6.3 project to overwrite it.

 

      2. Mac, Although I didn't try your idea, I belive your are right!

 

          I found, if I set -OnB=b in Compiler settings, the problem can also be solved.

 

          Another method is changing the PLACEMENT in prm file to:

PLACEMENT
    DEFAULT_RAM                         /* non-zero page variables */
                                        INTO  RAM;

    DEFAULT_ROM, ROM_VAR, STRINGS       INTO  ROM;
    _DATA_ZEROPAGE,                     /* zero page variables */
    MY_ZEROPAGE                         INTO  Z_RAM;
    TEST_ROM                            INTO  ROM_HWTEST;
END

 

        Now the problem is: each time I run "Generate Processor Expert Code", this change is overwritten.

        Does anyone know how to configure in CW10 GUI so that the generated prm file looks like above?

 

Thanks and best regards,

--Hong

       

 

       

 

0 Kudos

479 Views
theo
NXP Employee
NXP Employee

Hello,

 

First of all, did you use the Project Importer feature to migrate your CW 6.2 project to 10.2? If not, you shold consider using it. In order to do so, go to: File > Import > CodeWarrior > CodeWarrior Classic Project Importer.

 

Things should work as expected if you use the importer _and_ the project used to build successfully on 6.3. If it still does not build, we can take it from there.

 

Regards,

theo

0 Kudos