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: No Symbols after Reset, program fails

Part Number: TMS320F28388D

Hello everyone,

I currently have trouble getting my code working after a normal reset (pressing S1 on the TMS320F28388D control card) or after a power cycle.

When I reload the program via CCS (RAM or FLASH) everything is working fine. After a normal reset, the program won't work anymore (RAM or FLASH). And after a power cycle, it won't run either (only FLASH)

When I'm connecting with the debugger after a reset or if I stay connected during a reset, I can see that some variables are randomly changing. This lets me think, that some code is running, but somehow the execution is branching to a random location in memory and not to my written code. I have no idea how I am supposed to debug the problem because the execution never reaches main().

What could be the cause of such behavior? Why is the boot process different when loading the program via CCS / after any reset?

Thanks and regards,

Marcel Kummer.

  • Hi Marcel,

    There are couple of things to check here -

    1. Boot mode pins setting - Please make sure the boot mode is set to flash boot. If not then program will not run to flash when not connected to CCS. 
    2. With CCS connected, device boots as per emulation boot after any reset hence you need to set proper emulation boot. With CCS, program entry point is forced by CCS after loading the code hence it works fine after loading the code but not when you issue reset. Please refer device TRM for detail about emulation boot.
    3. CMD file - Please check that nothing is loaded in RAM because RAM content get cleared after power-up.

    Regards,

    Vivek Singh

  • Hello Vivek,

    reset while being connected to CCS is not that important for me. I just want to be able to let the code run independend to CCS.

    I now set both pins of the S2-Switch to off. In SPRUIL8B it's stated that this should be the boot to flash option. But the application still won't boot to flash after a reset (CCS not connected).

    I also checked my FLASH cmd file, but couldn't find any memory that's wrongly placed in RAM instead of FLASH. Just to make sure, could you please verify this? (Maybe I understood a SECTION wrong and did a mistake there).


    MEMORY
    {
       /* BEGIN is used for the "boot to Flash" bootloader mode   */
       BEGIN            : origin = 0x080000, length = 0x000002
       BOOT_RSVD        : origin = 0x000002, length = 0x0001AE     /* Part of M0, BOOT rom will use this for stack */
       RAMM0            : origin = 0x0001B0, length = 0x000250
       RAMM1            : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
       RAMD0            : origin = 0x00C000, length = 0x000800
       RAMD1            : origin = 0x00C800, length = 0x000800
       RAMLS0_to_LS7    : origin = 0x008000, length = 0x004000
    /*   RAMLS0           : origin = 0x008000, length = 0x000800 */
    /*   RAMLS1           : origin = 0x008800, length = 0x000800 */
    /*   RAMLS2           : origin = 0x009000, length = 0x000800 */
    /*   RAMLS3           : origin = 0x009800, length = 0x000800 */
    /*   RAMLS4           : origin = 0x00A000, length = 0x000800 */
    /*   RAMLS5           : origin = 0x00A800, length = 0x000800 */
    /*   RAMLS6           : origin = 0x00B000, length = 0x000800 */
    /*   RAMLS7           : origin = 0x00B800, length = 0x000800 */
       RAMGS0           : origin = 0x00D000, length = 0x001000
       RAMGS1           : origin = 0x00E000, length = 0x001000
       RAMGS2           : origin = 0x00F000, length = 0x001000
       RAMGS3           : origin = 0x010000, length = 0x001000
       RAMGS4           : origin = 0x011000, length = 0x001000
       RAMGS5           : origin = 0x012000, length = 0x001000
       RAMGS6           : origin = 0x013000, length = 0x001000
       RAMGS7           : origin = 0x014000, length = 0x001000
       RAMGS8           : origin = 0x015000, length = 0x001000
       RAMGS9           : origin = 0x016000, length = 0x001000
       RAMGS10          : origin = 0x017000, length = 0x001000
       RAMGS11          : origin = 0x018000, length = 0x001000
       RAMGS12          : origin = 0x019000, length = 0x001000
       RAMGS13          : origin = 0x01A000, length = 0x001000
       RAMGS14          : origin = 0x01B000, length = 0x001000
       RAMGS15          : origin = 0x01C000, length = 0x001000
    
       /* Flash sectors */
       FLASH0           : origin = 0x080002, length = 0x001FFE  /* on-chip Flash */
       FLASH1           : origin = 0x082000, length = 0x002000  /* on-chip Flash */
       FLASH2           : origin = 0x084000, length = 0x002000  /* on-chip Flash */
       FLASH3           : origin = 0x086000, length = 0x002000  /* on-chip Flash */
       FLASH4           : origin = 0x088000, length = 0x008000  /* on-chip Flash */
       FLASH5           : origin = 0x090000, length = 0x008000  /* on-chip Flash */
       FLASH6           : origin = 0x098000, length = 0x008000  /* on-chip Flash */
       FLASH7           : origin = 0x0A0000, length = 0x008000  /* on-chip Flash */
       FLASH8           : origin = 0x0A8000, length = 0x008000  /* on-chip Flash */
       FLASH9           : origin = 0x0B0000, length = 0x008000  /* on-chip Flash */
       FLASH10          : origin = 0x0B8000, length = 0x002000  /* on-chip Flash */
       FLASH11          : origin = 0x0BA000, length = 0x002000  /* on-chip Flash */
       FLASH12          : origin = 0x0BC000, length = 0x002000  /* on-chip Flash */
       FLASH13          : origin = 0x0BE000, length = 0x002000  /* on-chip Flash */
       
       CPU1TOCPU2RAM    : origin = 0x03A000, length = 0x000800
       CPU2TOCPU1RAM    : origin = 0x03B000, length = 0x000800
    
       CPUTOCMRAM0      : origin = 0x039000, length = 0x000200
       CPUTOCMRAM0_ECAT : origin = 0x039200, length = 0x000200
       CPUTOCMRAM1      : origin = 0x039400, length = 0x000400
    
       CMTOCPURAM0      : origin = 0x038000, length = 0x000200
       CMTOCPURAM0_ECAT : origin = 0x038200, length = 0x000200
       CMTOCPURAM1      : origin = 0x038400, length = 0x000400
    
       CANA_MSG_RAM     : origin = 0x049000, length = 0x000800
       CANB_MSG_RAM     : origin = 0x04B000, length = 0x000800
       RESET            : origin = 0x3FFFC0, length = 0x000002
    }
    
    SECTIONS
    {
       codestart           : > BEGIN, ALIGN(4)
       .text               : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(4)
       .cinit              : > FLASH1 | FLASH2 | FLASH3, ALIGN(4)
       .switch             : > FLASH1, ALIGN(4)
       .reset              : > RESET, TYPE = DSECT /* not used, */
       .stack              : > RAMGS0
    
    #if defined(__TI_EABI__)
       .init_array      : > FLASH1, ALIGN(4)
       .bss             : > RAMLS0_to_LS7
       .bss:output      : > RAMLS0_to_LS7
       .bss:cio         : > RAMLS0_to_LS7
       .data            : > RAMLS0_to_LS7
       .sysmem          : > RAMLS0_to_LS7
       /* Initalized sections go in Flash */
       .const           : > FLASH5, ALIGN(4)
    #else
       .pinit           : > FLASH1, ALIGN(4)
       .ebss            : > RAMLS0_to_LS7
       .esysmem         : > RAMLS0_to_LS7
       .cio             : > RAMLS0_to_LS7
       /* Initalized sections go in Flash */
       .econst          : >> FLASH4 | FLASH5, ALIGN(4)
    #endif
    
       ramgs0 : > RAMGS0, type=NOINIT
       ramgs1 : > RAMGS1, type=NOINIT
       
       MSGRAM_CPU1_TO_CPU2 : > CPU1TOCPU2RAM, type=NOINIT
       MSGRAM_CPU2_TO_CPU1 : > CPU2TOCPU1RAM, type=NOINIT
    
       MSGRAM_CPU_TO_CM    : > CPUTOCMRAM0, type=NOINIT
       MSGRAM_CPU1_TO_CM_ECAT : > CPUTOCMRAM0_ECAT, type=NOINIT
    
       MSGRAM_CM_TO_CPU    : > CMTOCPURAM0, type=NOINIT
       MSGRAM_CM_TO_CPU1_ECAT : > CMTOCPURAM0_ECAT, type=NOINIT
    
       /* The following section definition are for SDFM examples */
       Filter_RegsFile  : > RAMGS0
       Filter1_RegsFile : > RAMGS1, fill=0x1111
       Filter2_RegsFile : > RAMGS2, fill=0x2222
       Filter3_RegsFile : > RAMGS3, fill=0x3333
       Filter4_RegsFile : > RAMGS4, fill=0x4444
       Difference_RegsFile : >RAMGS5, fill=0x3333
    
       #if defined(__TI_EABI__)
           .TI.ramfunc : {} LOAD = FLASH3,
                            RUN = RAMLS0_to_LS7,
                            LOAD_START(RamfuncsLoadStart),
                            LOAD_SIZE(RamfuncsLoadSize),
                            LOAD_END(RamfuncsLoadEnd),
                            RUN_START(RamfuncsRunStart),
                            RUN_SIZE(RamfuncsRunSize),
                            RUN_END(RamfuncsRunEnd),
                            ALIGN(4)
       #else
           .TI.ramfunc : {} LOAD = FLASH3,
                            RUN = RAMLS0_to_LS7,
                            LOAD_START(_RamfuncsLoadStart),
                            LOAD_SIZE(_RamfuncsLoadSize),
                            LOAD_END(_RamfuncsLoadEnd),
                            RUN_START(_RamfuncsRunStart),
                            RUN_SIZE(_RamfuncsRunSize),
                            RUN_END(_RamfuncsRunEnd),
                            ALIGN(4)
       #endif
    
    }
    
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */
    


    Thanks and regards,

    Marcel.

  • Hi Marcel,

    cmd file look fine to me. After connecting to CCS, can you follow below step and see if it works fine -

    • Issue reset from CCS
    • In memory watch window, write 0x5AFF at address 0xD00
    • Click on "Run"

    See if this runs your application. If not then you can halt the CPU and debug the code.

    Regards,

    Vivek Singh

  • Hello Vivek,

    I came back to work today, powered up my board, and to my surprise, it booted the application.

    I tried a few things now and could find out that, after I load the application with CSS, start all Cores, stop the debugging (which means disconnecting CCS) a normal Reset with the button S1 on the Control Card fails.

    But after a power cycle, the application boots correct, and then a reset with S1 is working too.

    So I assume, that CCS is making some settings in RAM which prevent the application to boot. After a power cycle, the RAM is zeroed which lets the application boot correctly again.

    With this behaviour I am happy. At the moment I don't need the reset to work when I am connected with CCS.

    Thanks and regards,

    Marcel.