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.

CCS/TMS320F28379D: App no start from Flash dependend on amount of objects instantiated (C++)

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hello there,

i´m observing the effect that my programm doens´t start depended on how many objects are instatiated at compile time.
In abstract the structure is that class A has an array of classes type B.

Observation:
When I start the programm by flashing using the debugger and press start, the programm works.
If i reset or power cycle the device, the programm doesn´t start.

When i decrease the array of class B  (even without reaching length of zero), the programm also works when reseted or power cycled.

In both cases i dont get a warning of an error that the programm or anything else doesn´t fit to the memory.
I also tried creating a dummy array to simulate a higher memory usage which didn´t change the observed effect.
It also has nothing to do specifically with class B, when i change amount of aother classes owned by "A", the effect is the same.

Conclusion:
My conclusion is, that a non starting programm has at least nothing to do with wrong selected boot pins or OTP key, since the programm DOES start, when the arrays of the objects are made shorter.

Never the less something in the boot process must be different when eigther using the debugger or when power cycled.
Has someone an idea what the root can be?


I don´t know if it helps, i attach a .map file - one which is the output when the program starts, and one when it doesn´t.
In the source code i have changed the amount of class "RmsClass".

best regards!

DOES START

blinky_dc_cpu01__START.txt

 

DOES NOT START

blinky_dc_cpu01__NO_START.txt

  • Hello

    Yes, debugger versus other resets are different. Depending on how you are resetting in CCS, you may not be running through boot at all.
    See more details on boot in TRM: www.ti.com/.../spruhm8

    In C2000Ware, you can load the boot symbols and report back where you are getting stuck when you say it doesn't boot. If know the address, you can look at the wait points chapter in TRM to see also.

    Best regards
    Chris
  • Hello, 

    hm, i can´t figure out, what is causing the effect. 
    I have made up an example Project based on the C2000 Ware example "blinky_dc" where i have made a few changes:

    - changed the main.c file to main.cpp
    - added a class "PointlessClass"
    - added an Array of PointlessClass to main.cpp

    PointlessClass has a static Uint32 variable, a Uint32 member variable and a method which can get the member Variable.
    In the constructor the static variable is incremented and written to the member variable.

    - on every cycle the blink Loop inblinky_dc_cpu01.zip mains reads out the "next" member value from the PointlessClass Array. 

    With an Array size of 226 it works, with an Array size of 227 it does not - means that the Programm runs in stand alone. (See #define AMT_OF_PONTLSS_CLSS)
    Both time it was compiled with the Project configuration "CPU1_FLASH_STANDALONE".
    I left everything else as out of the box like the .cmd file. 
    I also checked the used RAM and FLASH where none is even Close to it´s Limit. 
    Find attached the exportet Project.

    best regards!


  • I ran the application and saw what you observed. It looks like the watchdog is timing out causing the device to reset before reaching application when array is 227. The constructors get called before main where the watchdog gets disabled. You can edit CodeStartBranch.asm to disable the watchdog before it runs the pre-app items.

    Best regards

    Chris

  • Thanks a lot, that resolved the Problem.
    I found the discription in this PDF with the search word "WD_DISABLE"
    www.ti.com/.../spra958l.pdf