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.

Exosite IOT on EK-TM4C1294XL (tStat) cause undefined errors during CCS compile.

Guru 55913 points

After separating calling functions polling 1 second tick; asserting (bool) switch (g_bPrintingData = true) normally invokes (PrintAllData()) printing all the (Type Def Struct) defined as (tStat).  All CCS compiler versions claim (tStat) is undefined.  

Areas of contention when CCS compiler proofs the following statements:

bool g_bPrintingData = false;

bool SyncWithExosite(tStat **psStats);

if (SyncWithExosite(g_psDeviceStatistics) == true)

Review using F3 traces all defined (tStat) to a correct path in module (stats.c) where exists the (typedef strut) table holding several defines in a pointer named (tStat).

If we move all the external prototypes (tStat) into (stats.c) the compiler builds without error. However asserting (bool) switch triggering PrintAllData() to the UART driven terminal fails.

Also a failure of asserting (bool) switch Sync with Exosite appears to be problematic, apparently corrupting the stack. A resulting and perceived MPU Reset then occurs.

 

  • The main problem encountered is the declaration: (bool SyncWithExosite(tStat **psStats);

    When this deceleration is placed atop the header (module.h) where the (bool) switch call asserts, the compiler Builds the application without error but the Boolean switch will (not assert) when triggered.

    The function invoked when the (bool) switch asserts : if(SyncWithExosite(g_psDeviceStatistics) == true)

    Should that (bool) declaration be place atop (module.c) where it was originally found working in the IOT project, the CCS compiler throws a single deceleration error and the Build fails.

    CCS compilers mandate the calling (bool) deceleration in (module.c) is last place in ordered list of #includes "my module.h"; ,,, is the very last include.