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.

Compiler/EK-TM4C1294XL: Request for the Alternative Function Migration.

Part Number: EK-TM4C1294XL

Tool/software: TI C/C++ Compiler

Dear All, 

I'm migrating from LM3S9B92 MCU to TM4C1294NCPNDT MCU devices. I have come across some difficulties.

1) Could someone suggest the alternative function for FlashUsecGet() in TivaWare for TM4C1294NCPNDT.

2) What does mean by undefined symbol " g_psCmdTable "  first referenced in the file " ./cmdline.obj ".

Looking forward to hearing from you all. 

 

Thanks,

Sai  

  • On the TM4C1294 device you don't typically need FlashUsecGet() because you do not need to set the flash clock with FlashUsecSet(). If you need to determine the speed of the system clock, it is recommended that you store the return value of the function SysCtlClockFreqSet() in a global variable like shown below:

        //
        // Run from the PLL at 120 MHz.
        //
        g_ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
                                           SYSCTL_OSC_MAIN |
                                           SYSCTL_USE_PLL |
                                           SYSCTL_CFG_VCO_480), 120000000);
    

    The variable g_ui32SysClock will contain the number of system clock cycles per second. To get system clocks per uS, divide by 1000000.

    The "undefined symbol" error means that somewhere in the file "cmdline.c" (assuming it is C code) it references what should be (by naming convention) a global symbol "g_psCmdTable". But that symbol is not defined, or at least not defined at a global scope.

  • Dear Bob, 

    I have a question. How to mention the g_ui32SysClock as a Global variable so that it can be shared with other source file? Please let me know. 

    I have declared in one source file as 

    uint32_t g_ui32SysClock;

    int main(){

    // Run from the PLL at 120 MHz.
    //
    g_ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
                                       SYSCTL_OSC_MAIN |
                                       SYSCTL_USE_PLL |
                                       SYSCTL_CFG_VCO_480), 120000000);
    return 0;
    }
    Could you please let me know, How to share the g_ui32SysClock variable in other source files as well? Since I'm using same variable in other source file and compile error generates as well "" Identifier  g_ui32SysClock  is undefined in this file ""
     
    Thanks,
    Sai 
  • In all the files that reference g_ui32SysClock, you should declare it as extern:

    extern uint32_t g_ui32SysClock;

    This is often done in a .h file that is then included in each of the C files.