chintan mathia

Please help.... malloc is creating prob......

Discussion created by chintan mathia on Mar 4, 2009
Latest reply on Mar 9, 2009 by chintan mathia

Hello all,

 

I am using mc9s08ac60 and CW v6.1. 

 

Following is my prm file:

 

 

/***************************************************************************

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

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   0x0070 TO 0x00FF;
    RAM                      =  READ_WRITE   0x0100 TO 0x086F;
    ROM                      =  READ_ONLY    0x1860 TO 0xFFAF;
    ROM1                     =  READ_ONLY    0x0870 TO 0x17FF;
    ROM2                     =  READ_ONLY    0xFFC0 TO 0xFFC5;
 /* INTVECTS                 =  READ_ONLY    0xFFC6 TO 0xFFFF; Reserved for Interrupt Vectors */
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 */
    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 */

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


STACKSIZE 0x50

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

****************************************************************************/

 

now when i try to use malloc it gives a link error: L1102

saying out of allocation space in segment RAM at address 0x106.

 

Please suggest me the prob?

Thanks.

Outcomes