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.

TMS320F28377S: Software not running from flash.

Part Number: TMS320F28377S
Other Parts Discussed in Thread: C2000WARE

Hello,

I have upgraded my computer and deciced (maybe not a wise decision...) to upgrade my project to the new tools provided by TI.

My old tools where: CCS v7.4.0.00015 Compiler v16.9.4.LTS C2000Ware 1.00.3.00

The new set of tools is: CCS v10.2.0.00009 Compiler v20.2.4.LTS C2000Ware 3.4.0.00

I started by creating an "empty project with main.c" and replaces with my main.cpp and added all my .cpp and .h files.

After adding the relevant "includes" in the "C2000 Compiler" -> "Include Options" section, I got my project to compile.

 

I am using XDS100V2  as my debug probe.

Now the project compiles and runs while the debugger is connected.

However, after a power cycle, the software dose not run.

Pasted below is the linker file.

Please help

Thanks


MEMORY
{
PAGE 0 : /* Program Memory */
/* Memory (RAM/FLASH) blocks can be moved to PAGE1 for data allocation */
/* BEGIN is used for the "boot to Flash" bootloader mode */

BEGIN : origin = 0x080000, length = 0x000002
RAMM0 : origin = 0x000122, length = 0x0002DE
RAMD0 : origin = 0x00B000, length = 0x000800
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
RAMGS14 : origin = 0x01A000, length = 0x001000
RAMGS15 : origin = 0x01B000, length = 0x001000
RESET : origin = 0x3FFFC0, length = 0x000002

/* Flash sectors */
FLASHA : origin = 0x080002, length = 0x001FFE /* on-chip Flash */
FLASHB : origin = 0x082000, length = 0x002000 /* on-chip Flash */
FLASHC : origin = 0x084000, length = 0x002000 /* on-chip Flash */
FLASHD : origin = 0x086000, length = 0x002000 /* on-chip Flash */
FLASHE : origin = 0x088000, length = 0x008000 /* on-chip Flash */
FLASHF : origin = 0x090000, length = 0x008000 /* on-chip Flash */
FLASHG : origin = 0x098000, length = 0x008000 /* on-chip Flash */
FLASHH : origin = 0x0A0000, length = 0x008000 /* on-chip Flash */
FLASHI : origin = 0x0A8000, length = 0x008000 /* on-chip Flash */
FLASHJ : origin = 0x0B0000, length = 0x008000 /* on-chip Flash */
FLASHK : origin = 0x0B8000, length = 0x002000 /* on-chip Flash */
FLASHL : origin = 0x0BA000, length = 0x002000 /* on-chip Flash */
FLASHM : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */
FLASHN : origin = 0x0BE000, length = 0x002000 /* on-chip Flash */
FLASHO : origin = 0x0C0000, length = 0x002000 /* on-chip Flash */
FLASHP : origin = 0x0C2000, length = 0x002000 /* on-chip Flash */
FLASHQ : origin = 0x0C4000, length = 0x002000 /* on-chip Flash */
FLASHR : origin = 0x0C6000, length = 0x002000 /* on-chip Flash */
FLASHS : origin = 0x0C8000, length = 0x008000 /* on-chip Flash */
FLASHT : origin = 0x0D0000, length = 0x008000 /* on-chip Flash */
FLASHU : origin = 0x0D8000, length = 0x008000 /* on-chip Flash */
FLASHV : origin = 0x0E0000, length = 0x008000 /* on-chip Flash */
FLASHW : origin = 0x0E8000, length = 0x008000 /* on-chip Flash */
FLASHX : origin = 0x0F0000, length = 0x008000 /* on-chip Flash */
FLASHY : origin = 0x0F8000, length = 0x002000 /* on-chip Flash */
FLASHZ : origin = 0x0FA000, length = 0x002000 /* on-chip Flash */
FLASHAA : origin = 0x0FC000, length = 0x002000 /* on-chip Flash */
FLASHAB : origin = 0x0FE000, length = 0x002000 /* on-chip Flash */

PAGE 1 : /* Data Memory */
/* Memory (RAM/FLASH) blocks can be moved to PAGE0 for program allocation */

BOOT_RSVD : origin = 0x000002, length = 0x000120 /* Part of M0, BOOT rom will use this for stack */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAMD1 : origin = 0x00B800, length = 0x000800

RAMLS5 : origin = 0x00A800, length = 0x000800

RAMGS0 : origin = 0x00C000, length = 0x001000
RAMGS1 : origin = 0x00D000, length = 0x001000
RAMGS2 : origin = 0x00E000, length = 0x001000
RAMGS3 : origin = 0x00F000, length = 0x001000
RAMGS4 : origin = 0x010000, length = 0x001000
RAMGS5 : origin = 0x011000, length = 0x001000
RAMGS6 : origin = 0x012000, length = 0x001000
RAMGS7 : origin = 0x013000, length = 0x001000
RAMGS8 : origin = 0x014000, length = 0x001000
RAMGS9 : origin = 0x015000, length = 0x001000
RAMGS10 : origin = 0x016000, length = 0x001000
RAMGS11 : origin = 0x017000, length = 0x001000
RAMGS12 : origin = 0x018000, length = 0x001000
RAMGS13 : origin = 0x019000, length = 0x001000

}


SECTIONS
{
/* Allocate program areas: */
.cinit : > FLASHB PAGE = 0, ALIGN(4)
.pinit : > FLASHB, PAGE = 0, ALIGN(4)
.text : >> FLASHB | FLASHC | FLASHD | FLASHE PAGE = 0, ALIGN(4)
codestart : > BEGIN PAGE = 0, ALIGN(4)

#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} LOAD = FLASHD,
RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
PAGE = 0, ALIGN(4)
#else
ramfuncs : LOAD = FLASHD,
RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
PAGE = 0, ALIGN(4)
#endif
#endif

/* Allocate uninitalized data sections: */
.stack : > RAMM1 PAGE = 1
.ebss : >> RAMLS5 | RAMGS0 | RAMGS1 PAGE = 1
.esysmem : > RAMLS5 PAGE = 1

/* Initalized sections go in Flash */
.econst : >> FLASHF | FLASHG | FLASHH PAGE = 0, ALIGN(4)
.switch : > FLASHB PAGE = 0, ALIGN(4)

.reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */

}

/*
//===========================================================================
// End of file.
//===========================================================================
*/

  • Hi,

    Can you check if the BEGIN section is populated with the code_start function? You can either check the map file or check the memory contents in the disassembly view after loading the .out

    Are you using a ControlCard?

    Regards,

    Veena

  • HI,

    I am using my custom hardware.

    Here is everything in the map file regarding the BEGIN and code_start:

    Including a few lines above and bellow...

    RAMD0 0000b000 00000800 00000000 00000800 RWIX
    RAMGS14 0001a000 00001000 00000aa9 00000557 RWIX
    RAMGS15 0001b000 00001000 00000000 00001000 RWIX
    BEGIN 00080000 00000002 00000002 00000000 RWIX
    FLASHA 00080002 00001ffe 00000000 00001ffe RWIX
    FLASHB 00082000 00002000 00001ffd 00000003 RWIX
    FLASHC 00084000 00002000 00002000 00000000 RWIX
    FLASHD 00086000 00002000 00001fff 00000001 RWIX

    section page origin length input sections
    -------- ---- ---------- ---------- ----------------
    codestart
    * 0 00080000 00000002
    00080000 00000002 F2837xS_CodeStartBranch.obj (codestart)

    .cinit 0 00082000 00000a05

    abs ffffffff binit
    0 00082000 cinit
    0 00080000 code_start
    abs ffffffff etext
    0 00082c18 pinit

    0 0001aa97 _FlashOff_Bank1
    0 0001aaa5 _F28x_usDelay
    0 00080000 code_start
    0 00082000 ___cinit__
    0 00082000 cinit
    0 00082c18 ___pinit__

  • HI,

    Do you have watchdog disabled in the code_start?

    WD_DISABLE .set 0 ;set to 1 to disable WD, else set to 0

    If not, can you set WD_DISABLE as 1 and try?

    Regards,

    Veena

  • Thanks for the fast replay.

    see below the entire F2837xS_CodeStartBranch.asm file.

    WD_DISABLE .set 1 ;set to 1 to disable WD, else set to 0

    .ref _c_int00
    .global code_start

    ***********************************************************************
    * Function: codestart section
    *
    * Description: Branch to code starting point
    ***********************************************************************

    .sect "codestart"

    code_start:
    .if WD_DISABLE == 1
    LB wd_disable ;Branch to watchdog disable code
    .else
    LB _c_int00 ;Branch to start of boot._asm in RTS library
    .endif

    ;end codestart section

    ***********************************************************************
    * Function: wd_disable
    *
    * Description: Disables the watchdog timer
    ***********************************************************************
    .if WD_DISABLE == 1

    .text
    wd_disable:
    SETC OBJMODE ;Set OBJMODE for 28x object code
    EALLOW ;Enable EALLOW protected register access
    MOVZ DP, #7029h>>6 ;Set data page for WDCR register
    MOV @7029h, #0068h ;Set WDDIS bit in WDCR to disable WD
    EDIS ;Disable EALLOW protected register access
    LB _c_int00 ;Branch to start of boot._asm in RTS library

    .endif

    ;end wd_disable

    .end

    ;//===========================================================================
    ;// End of file.
    ;//===========================================================================

  • Hi,

    I am not able to think of any reason why it is not running standalone.

    Are you saying the exact same application code worked with the older compiler and C2000ware version?

    One check you can do is to try out an example in C2000ware and check it it is running standalone? If you have an LED on the custom hardware, you try running the led_blinky example which is easy to validate standalone

    Regards,

    Veena

  • Hi,

    A project from the C2000Ware dose run stand alone.

    I decided to take a new approach. 

    I created a new project for the target, and copy only the source and header files to the new project.

    I Spent a lot of time linking everything together.

    eventually, after the compilation is successful, I get the fallowing warnings:

    <Linking>
    warning #10247-D: creating output section "ramfuncs" without a SECTIONS specification
    warning #10247-D: creating output section "BufferDataSection" without a SECTIONS specification
    warning #10247-D: creating output section "AdcaResultRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "AdcbResultRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "AdccResultRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "AdcdResultRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Clb1LogicCfgRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Clb2LogicCfgRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Clb3LogicCfgRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Clb4LogicCfgRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Clb1LogicCtrlRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Clb2LogicCtrlRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Clb3LogicCtrlRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Clb4LogicCtrlRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Clb1DataExchRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Clb2DataExchRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Clb3DataExchRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Clb4DataExchRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "CanaRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "CanbRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section ".cio" without a SECTIONS specification
    warning #10210-D: creating ".esysmem" section with default size of 0x400; use the -heap option to change the default size
    Finished building target: "Trion Dual V1.out"

    Any Ideas?

  • The linker command file needs to be updated with the sections being mapped to the correct memory regions. The *RegsFile sections are created for the peripheral register structs. These are mapped in the F2837xS_Headers_nonBIOS.cmd file. You can add this file to resolve those issues.

    For other sections, you need to map them to a memory block. You can find reference cmd files in the common\cmd folder. You can use 2837xS_Generic_FLASH_lnk.cmd as reference.

    esysmem is used for allocating heap. Looks like you have not configured the heap option in the project setting. hence, it uses the default value, 0x400. You can update the heap size in Project Properties->C2000 Linker->Basic Options

    Regards,

    Veena

  • Hi,

    I forgot to update on this issue.

    The problem was a missing _FLASH definition in the project.

    Thanks