I am using Codewarrior on an MC13234 (HCS08) and have run out of space for my code in segment "ROM". I need to modify the Project.prm to allow the code to ROM1 or one of the paged segments but how to do so is not obvious. Can someone provide an example?

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

I am using Codewarrior on an MC13234 (HCS08) and have run out of space for my code in segment "ROM". I need to modify the Project.prm to allow the code to ROM1 or one of the paged segments but how to do so is not obvious. Can someone provide an example?

434 Views
ricklewczyk
Contributor I

The MC13234 is an HCS08 core part.

Labels (1)
0 Kudos
1 Reply

288 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Rick,

Here is an example:

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

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 0x147F;

    /* unbanked FLASH ROM */

    ROM                      =  READ_ONLY    0x2080 TO 0x7FFF;

    ROM1                     =  READ_ONLY    0xC000 TO 0xFFAD;

    ROM2                     =  READ_ONLY    0xFFC0 TO 0xFFCB;

/* INTVECTS                 =  READ_ONLY    0xFFCC TO 0xFFFF; Reserved for Interrupt Vectors */

    /* banked FLASH ROM */

    PPAGE_0                  =  READ_ONLY    0x008000 TO 0x00A07F; /* PAGE partially contained in ROM segment */

    PPAGE_2                  =  READ_ONLY    0x028000 TO 0x02BFFF;

    PPAGE_4                  =  READ_ONLY    0x048000 TO 0x04BFFF;

/* 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;

    _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_2,PPAGE_4,ROM1,ROM2;

    _DATA_ZEROPAGE,                     /* zero page variables */

    MY_ZEROPAGE                         INTO  Z_RAM;

END

STACKSIZE 0x100

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

The line 33 was modified to use the ROM1 and ROM2 sections, don't forget to pass the option -OnB=b  to the compiler.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos