Link Error: L1102: Out of allocation space in segment ROM at adress 0x7CC4

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

Link Error: L1102: Out of allocation space in segment ROM at adress 0x7CC4

1,370 Views
taolee
Contributor I

从DZ60移植到DZ128提示上述错误,但在DZ60上编译没有问题,尝试加ROM1,ROM2: To use "ROM1,ROM2" as well, pass the option -OnB=b 也没有效果,不太清楚哪里出问题了?

/* This is a linker parameter file for the mc9s08dz128 */

NAMES END /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your own files too. */

SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */
Z_RAM = READ_WRITE 0x0080 TO 0x00FF;
RAM = READ_WRITE 0x0100 TO 0x17FF;
RAM1 = READ_WRITE 0x1900 TO 0x217F;
/* unbanked FLASH ROM */
ROM = READ_ONLY 0x4000 TO 0x7FFF; 
ROM1 = READ_ONLY 0x2180 TO 0x3BFF; 
ROM2 = READ_ONLY 0xC000 TO 0xFF7F; 
EEPROM = READ_ONLY 0x3C00 TO 0x3FFF;
/* INTVECTS = READ_ONLY 0xFF80 TO 0xFFFF; Reserved for Interrupt Vectors */
/* banked FLASH ROM */
PPAGE_0 = READ_ONLY 0x008000 TO 0x00A17F; /* PAGE partially contained in ROM segment */
PPAGE_0_1 = READ_ONLY 0x00BC00 TO 0x00BFFF;
PPAGE_2 = READ_ONLY 0x028000 TO 0x02BFFF;
PPAGE_4 = READ_ONLY 0x048000 TO 0x04BFFF;
PPAGE_5 = READ_ONLY 0x058000 TO 0x05BFFF;
PPAGE_6 = READ_ONLY 0x068000 TO 0x06BFFF;
PPAGE_7 = READ_ONLY 0x078000 TO 0x07BFFF;
/* PPAGE_1 = READ_ONLY 0x018000 TO 0x01BFFF; PAGE already contained in segment at 0x4000-0x7FFF */
/* PPAGE_3 = READ_ONLY 0x038000 TO 0x03BFFF; PAGE already contained in segment at 0xC000-0xFFFF */
END

PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */
DEFAULT_RAM, /* non-zero page variables */
INTO RAM,RAM1;

_PRESTART, /* startup code */
STARTUP, /* startup data structures */
ROM_VAR, /* constant variables */
STRINGS, /* string literals */
VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */
NON_BANKED, /* runtime routines which must not be banked */
DEFAULT_ROM,
COPY /* copy down information: how to initialize variables */
INTO ROM; /* ,ROM1,ROM2: To use "ROM1,ROM2" as well, pass the option -OnB=b to the compiler */

PAGED_ROM /* routines which can be banked */
INTO PPAGE_0,PPAGE_0_1,PPAGE_2,PPAGE_4,PPAGE_5,PPAGE_6,PPAGE_7,ROM1,ROM2;

_DATA_ZEROPAGE, /* zero page variables */
MY_ZEROPAGE INTO Z_RAM;
END

STACKSIZE 0x400

//VECTOR 0 _Startup /* Reset vector: this is the default entry point for an application. */

Labels (1)
0 Kudos
2 Replies

934 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

In addition, you can find more tips in help

pastedImage_1.png


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

934 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

The error means ROM section is not big enough to load code. normally add other ROM1,ROM2 with -OnB=b enabled can solve the problem, But you say not.

Thus please send me your demo project, I will check it directly from my side.

If you don't like to share project to public, create a private case, I can also test it.

Best Regards

Jennie Zhang

0 Kudos