This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMS570LS0432: Linker command file configuration for new image after downloading UART bootloader .

Part Number: TMS570LS0432


Tool/software: TI C/C++ Compiler

Hi , I have loaded UART bootloader into TMS570ls0432 lower flash memory . I have attached memory configuration also . 

But I have confusion about linker command file for other new images to be loaded . 

Here is linker.cmd for bootloader 

MEMORY
{
VECTORS (X) : origin=0x00000000 length=0x00000200
BOOT_LOAD (RX) : origin=0x00000200 length=0x00001000
FLASH_API (RX) : origin=0x00001200 length=0x00001000
FLASH0 (RX) : origin=0x00002200 length=0x00050000
SRAM (RW) : origin=0x08002000 length=0x0005c000
STACK (RW) : origin=0x08000000 length=0x00001FF0
}

And this here is new application  project linker,cmd file 

MEMORY
{
VECTORS (X) : origin=0x00002000 length=0x00000200
FLASH0 (RX) : origin=0x00002200 length=0x0005FFE0
STACKS (RW) : origin=0x08000000 length=0x00001500
RAM (RW) : origin=0x08001500 length=0x00006B00

}

But it is not working . 

I have not clear idea of how to configure new linker command file .

Does i need to add again VECTORS (X) in new project ? (Reset vector must be same for both )

when I am loading new project with above configuration using ccs to test it is erasing my bootloader .

Thank you . 

Indrajit .

  • Hello Indrajit,

    The linker.cmd for the application looks ok. You want to place your application to the flash at 0x2000. What is the code size of your bootloader? Is the sector 0 (0x00~0x1FFF) big enough for your bootloader?

    Yes, you need to place the VECTOR to the start address of the application (0x2000 in your setting). You also need to modify the sys_intvecs.asm of your bootloader project to rout the interrupt correctly to your application:

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

    //sys_intvecs.asm of the bootloader

    .sect ".intvecs"

    .ref _c_int00

    ; interrupt vectors
    b _c_int00 ;0x00

    b #0x1FF8;  ;0x1FF8 = your application start address - 0x8 (0x2000-0x8)
    b #0x1FF8   ; Software interrupt
    b #0x1FF8   ; Abort (prefetch)
    b #0x1FF8   ; Abort (data)
    reservedEntry
    b reservedEntry ;0x14
    ldr pc,[pc, #-0x1b0] ;0x18
    ldr pc,[pc, #-0x1b0] ;0x1C

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

    When you load your project to the flash in CCS, CCS flash utility will erase the flash first. So the bootloader is erased by the CCS.