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.

TMS320F28374S: outside of program code

Part Number: TMS320F28374S
Other Parts Discussed in Thread: C2000WARE

Tool/software:

LS05SARAM:  origin = 0x008000, length = 0x008000

.ebss : > LS05SARAM    PAGE = 1

it shows LS05SARAM has been used 0x4e5d

But after adding an array, the compilation is passed. we use the XDS2XX debugger emulator  to flash it, when the loading program is completed, and it does not jump to the main function, but jump to the following

the code begin at 0X86000, it has been written. but has not jump to there.

We change the position of the array where we define it,eg move it form rrr.c file to aaa.c file, it works ok. we check the array is still in LS05SARAM, but changed the postion. the  LS05SARAM is still used 0x4e5d.

So, what cause that?

  • Hello,

    The address 0x3FE493 seems like the program jumped to an ITRAP ISR:

    This means you may have tried executing an illegal instruction:

    To clarify, have you modified the linker command file? If yes, what modifications were made?

    Are you using DCSM at all?

    Best Regards,

    Allison

  • thanks for reply

    DCSM is not used. the  cmd is located as follows:

    MEMORY
    {
    PAGE 0 :
    D01SARAM : origin = 0x00CE00, length = 0x000100
    M01SARAM0 : origin = 0x000122, length = 0x0002DE 
    BEGIN : origin = 0x086000, length = 0x000002

    FLASHD : origin = 0x086002, length = 0x001FFE /* on-chip Flash */
    FLASHE : origin = 0x088000, length = 0x023000 /* on-chip Flash */

    FLASHI : origin = 0x0AB000, length = 0x008000 /* on-chip Flash */

    RESET : origin = 0x3FFFC0, length = 0x000002
    RAMGS0 : origin = 0x010000, length = 0x006000

    PAGE 1 : 

    BOOT_RSVD : origin = 0x000002, length = 0x000120
    M01SARAM : origin = 0x000400, length = 0x000400 /* on-chip RAM */
    LS05SARAM : origin = 0x008000, length = 0x008000 /* on-chip RAM */
    RAMGS2 : origin = 0x016000, length = 0x002000
    }

    SECTIONS
    {
    /* Allocate program areas: */
    .cinit : > FLASHE PAGE = 0, ALIGN(4)
    .binit : > FLASHE PAGE = 0, ALIGN(4)
    .pinit : > FLASHE PAGE = 0, ALIGN(4)
    .text : > FLASHE PAGE = 0
    codestart : > BEGIN PAGE = 0
    ramfuncs : LOAD = FLASHE PAGE = 0
    RUN = RAMGS0 //PAGE = 1
    LOAD_START(_RamfuncsLoadStart),
    LOAD_SIZE(_RamfuncsLoadSize),
    LOAD_END(_RamfuncsLoadEnd),
    RUN_START(_RamfuncsRunStart),
    RUN_SIZE(_RamfuncsRunSize),
    RUN_END(_RamfuncsRunEnd)

    CtrFileRamFuncs : LOAD = FLASHE,
    RUN = RAMGS0,
    LOAD_START(_BoostCtrFileRamFuncs_loadstart),
    LOAD_END(_BoostCtrFileRamFuncs_loadend),
    RUN_START(_BoostCtrFileRamFuncs_runstart)
    PAGE = 0, ALIGN(4)
    .stack : > M01SARAM PAGE = 1
    .ebss : > LS05SARAM PAGE = 1
    .esysmem : > RAMGS2 PAGE = 1
    .cio : > RAMGS2 PAGE = 1

    .econst : > FLASHD | FLASHI PAGE = 0
    .switch : > FLASHD | FLASHI PAGE = 0
    .args : > FLASHD | FLASHI PAGE = 0
    .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */
    }

  • Hi Jane,

    Did you use a C2000ware example as a starting point? If so, can you summarize the changes made to the linker cmd file from the example and the purposes for making these changes, and I will try to provide some assistance? It is generally not recommended to edit the linker cmd files unless completely necessary as this has to be done carefully.

    You can also view the .map file to make sure that your program is being allocated to the expected portion of memory.

    Best Regards,

    Delaney

  • the array we add is mapped in the LS05SARAM  section, 0x008000, but why that cant jump to main()

  • Hi Jane,

    Are you trying using a flash or RAM build when getting this error? If this array has been added to the LSRAM0-5 block correctly, there should be no issue with the device boot up and branch to main. Can you summarize all changes made to the linker cmd file and which file you used as a starting point so we can pinpoint the issue?

    Best Regards,

    Delaney