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.

TMS320F28388D: Importance of specifying code_start or resetisr section in linker seperatelty

Part Number: TMS320F28388D


Dear all,

I just want to know why should we always give separate sections for resetisr or code_Start of the program in linker file.

Example

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

This works fine:

 

Defining flash sections as these:

  CMBANK0_Sec8_RESETISR : origin = 0x00250000, length = 0x00000008 /* Boot to Flash Entry

  CMBANK0_SECTOR8  : origin = 0x00250008, length = 0x0000FFF8

//CMBANK0_SECTOR8  : origin = 0x00250000, length = 0x00010000

 

 

 

 

.resetisr        : > CMBANK0_Sec8_RESETISR,ALIGN(16)    //--------------->Giving seperate section defined 

.vftable         : > CMBANK0_SECTOR8,ALIGN(16)   /* Application placed vector table in Flash*/

.vtable          : >> S0RAM | S1RAM            /* Application placed vector table in RAM*/

.text            : >> CMBANK0_SECTOR8 | CMBANK0_SECTOR9,ALIGN(16)

 

 

This wont work:

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

 

 

Defining flash sections as these:

CMBANK0_SECTOR8  : origin = 0x00250000, length = 0x00010000

 

.resetisr        : > CMBANK0_SECTOR8  ,ALIGN(16)

.vftable         : > CMBANK0_SECTOR8,ALIGN(16)   /* Application placed vector table in Flash*/

.vtable          : >> S0RAM | S1RAM            /* Application placed vector table in RAM*/

.text            : >> CMBANK0_SECTOR8 | CMBANK0_SECTOR9,ALIGN(16)

 

 

 

Giving a separate section for resetisr only works otherwise things wont work , why is it so. As per my understanding though we specify the linker code in second way we are allocating spaces in the flash as we did it on first methord. Kindly clear this for me..

Thanks and regards,

Stevin Martin

  • Hi Stevin,

    We want to make sure that the code_start or resetISR section is placed exactly at that address. This is the entry point location after boot.

    In the 2nd code snippet, it is not guaranteed that the resetISR is allocated at address 0x00250000. You can check the allocated address in the .map file.

    Alternatively, you can also do the following -

    CMBANK0_SECTOR8  : origin = 0x00250000, length = 0x00010000

     

    .resetisr        : > 0x00250000

    .vftable         : > CMBANK0_SECTOR8,ALIGN(16)   /* Application placed vector table in Flash*/

    .vtable          : >> S0RAM | S1RAM            /* Application placed vector table in RAM*/

    .text            : >> CMBANK0_SECTOR8 | CMBANK0_SECTOR9,ALIGN(16)

     

    Regards,

    Veena

  • Hello Veena,

    Very thanks for giving a clear cut clarification on the topic. 

    Regards,

    Stevin Martin