LocationType Fixup overflow

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

LocationType Fixup overflow

Jump to solution
748 Views
cab
Contributor III

HC9S08GW, small model, CW 10.2

Get these build errors


Fixup overflow in MCU_init, to _ICSC1 type 1, at offset 0x17  
Fixup overflow in MCU_init, to _ICSC2 type 1, at offset 0x19  

Looking at MCU_init()  I expect these are at the offsets noted:

  ...
  ICSC1 = 0x04;                        /* Initialization of the ICS control register 1 */
  ICSC2 = 0x00; 

  ...

 

This does not seem to fit the JSR/BSR type problem, anyway I disabled all optimizations to no avail.  This is an uncomplicated project--just trying to get some sample I2C code running.  My title says Location Type because I saw it listed like that once, I don't see that now.

 

=========================

I'm new to CW, but prm-file doesn't seem to have anything discontiguous? unless it is PPAGE2 (which I don't understand)

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

SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */
    Z_RAM                    =  READ_WRITE   0x00C0 TO 0x00FF;
    RAM                        =  READ_WRITE   0x0100 TO 0x08BF;
        /* unbanked FLASH ROM */
    ROM                        =  READ_ONLY    0xC000 TO 0xFF95;
    STANDBYRAM       =  NO_INIT      0x18C0 TO 0x18DF;
         /* INTVECTS             =  READ_ONLY    0xFF96 TO 0xFFFF; Reserved for Interrupt Vectors */
        /* banked FLASH ROM */
    PPAGE_2               =  READ_ONLY    0x028000 TO 0x02BFFF;
        /* 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;

    PAGED_ROM                       /* routines which can be banked */
             INTO  PPAGE_2;

    _DATA_ZEROPAGE,            /* zero page variables */
    MY_ZEROPAGE   INTO  Z_RAM;
    STANDBY_RAM                    /* battery backed standby RAM */
             INTO  STANDBYRAM;
END

Labels (1)
Tags (1)
0 Kudos
1 Solution
466 Views
CrasyCat
Specialist III

Hello

 

  You need to add the file msc9s08gw32.c or msc9s08gw64.c to your project (depending on the MCU you are targeting).

 

  This file is automatically added to projects created with the wizard.

  Is there any good reason you decided to remove it?

 

  If you do not link that file to your project, the I/O registers will not be allocated in the appropriate location and you

  will get into some trouble.

 

CrasyCat

View solution in original post

0 Kudos
4 Replies
466 Views
cab
Contributor III

Never mind! I stole MCUinit.c from sample code.  It had the wrong include: MC9S08QG8.h but the project was for MC9S08LG32.  

0 Kudos
466 Views
CompilerGuru
NXP Employee
NXP Employee

Maybe you could attach that project.

 

From the info given I guess the compiler thinks _ICSC1 is allocated in the zero page but it ends up allocated outside.

You can check the map file and see where it is supposed to end up.

Could also be some issue with a some #pragma DATA_SEG SHORT MY_ZEROPAGE section which is not ended in a header file.


Daniel

0 Kudos
467 Views
CrasyCat
Specialist III

Hello

 

  You need to add the file msc9s08gw32.c or msc9s08gw64.c to your project (depending on the MCU you are targeting).

 

  This file is automatically added to projects created with the wizard.

  Is there any good reason you decided to remove it?

 

  If you do not link that file to your project, the I/O registers will not be allocated in the appropriate location and you

  will get into some trouble.

 

CrasyCat

0 Kudos
466 Views
cab
Contributor III

Thanks Crasy Cat--right on the button.  I didn't see that you and Daniel had replied before I replied--that would have saved me some time--(I didn't get the emails).  Like I said I borrowed the file from another project without noticing--thanks for the lesson.   I really appreciate you experts on this Forum.

0 Kudos