This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Link Problem

Hi
I need to put some function in the first 8k
area of my program.
The function that i will put there is.
START_MXB.asm
Interrupt
and my bootloader.
This area should not be optmized and i don't
want any library function in this area.

My function main should start at 0x2000.
And here I want to optimize.

How should i set up my linker to solve this?

Parents
  • OK
    I now have done this in my code.

    pragma userclass (code = IAP)    // Generates CODE_IAP class

    And under Project - Options for Target - LX51 Locate - User Class i put
    CODE_IAP (C:0x2000 - C:0xFFFF)

    but when i take a look i my .map file i can see that the linker puts a lot of code in the area 0-0x1FFF.
    Like this.
    800FC9H   800FD1H   000009H   BYTE   UNIT     CODE           ?L?COM023F

    How can I tell the linker that i don't want any code except start_mx and my interrupt routines?

Reply
  • OK
    I now have done this in my code.

    pragma userclass (code = IAP)    // Generates CODE_IAP class

    And under Project - Options for Target - LX51 Locate - User Class i put
    CODE_IAP (C:0x2000 - C:0xFFFF)

    but when i take a look i my .map file i can see that the linker puts a lot of code in the area 0-0x1FFF.
    Like this.
    800FC9H   800FD1H   000009H   BYTE   UNIT     CODE           ?L?COM023F

    How can I tell the linker that i don't want any code except start_mx and my interrupt routines?

Children