Skip to main content
Visitor II
December 4, 2009
Question

default location vectorjump.o using auto linker

  • December 4, 2009
  • 2 replies
  • 689 views
Posted on December 04, 2009 at 09:58

default location vectorjump.o using auto linker

    This topic has been closed for replies.

    2 replies

    rhoek9Author
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:06

    Hi,

    (second attempt. For some reason the text disappeared when i send the forum post.)

    I need to redirect the interrupt vector table from 0x8000 to 0xA880 to get the custom bootloader working. With the help of the ST forum I found out how to redirect the interrupt vector table.

    With the following command in the linker file I can place the code (vectorjump.o) below at location 0x8000.

    +seg .const -b 0x8000 -k

    Debug\vectorjump.o

    #include ''main.h''

    struct interrupt_vector {

    u32 interrupt_instruction;

    };

    struct interrupt_vector const _jumptab[] = {

    {START_CBL_INTERRUPT_VECTORS}, /* RESET */

    {(START_INTERRUPT_VECTORS + 4)}, /* TRAP - Software interrupt */

    {(START_INTERRUPT_VECTORS + 8)},

    {(START_INTERRUPT_VECTORS + 12)},

    {(START_INTERRUPT_VECTORS + 16)},

    {(START_INTERRUPT_VECTORS + 20)},

    {(START_INTERRUPT_VECTORS + 24)},

    {(START_INTERRUPT_VECTORS + 28)},

    {(START_INTERRUPT_VECTORS + 32)},

    {(START_INTERRUPT_VECTORS + 36)},

    {(START_INTERRUPT_VECTORS + 40)},

    {(START_INTERRUPT_VECTORS + 44)},

    {(START_INTERRUPT_VECTORS + 48)},

    {(START_INTERRUPT_VECTORS + 52)},

    {(START_INTERRUPT_VECTORS + 56)},

    {(START_INTERRUPT_VECTORS + 60)},

    {(START_INTERRUPT_VECTORS + 64)},

    {(START_INTERRUPT_VECTORS + 68)},

    {(START_INTERRUPT_VECTORS + 72)},

    {(START_INTERRUPT_VECTORS + 76)},

    {(START_INTERRUPT_VECTORS + 80)},

    {(START_INTERRUPT_VECTORS + 84)},

    {(START_INTERRUPT_VECTORS + 88)},

    {(START_INTERRUPT_VECTORS + 92)},

    {(START_INTERRUPT_VECTORS + 96)},

    {(START_INTERRUPT_VECTORS + 100)},

    {(START_INTERRUPT_VECTORS + 104)},

    {(START_INTERRUPT_VECTORS + 108)},

    {(START_INTERRUPT_VECTORS + 112)},

    {(START_INTERRUPT_VECTORS + 116)},

    {(START_INTERRUPT_VECTORS + 120)},

    {(START_INTERRUPT_VECTORS + 124)},

    };

    To do this I need to alter manually the linker file.

    Before this I always used the auto linker option

    Project->settings-.linker->input-> auto

    Is there a way to get the same result but with the auto linker?

    [ This message was edited by: r.hoek on 08-12-2009 14:23 ]

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:06

    Hi Hoek,

    Please add more details