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.

More data -- Any way to set ethernet parameters other than in EMACSnow?

Ashish:


I finally found out why I had undefined symbols when I tried your suggestion to put EMACSnow.c and EMACSnow.h in my project.  For some reason, we had set up "ccs" as a globally defined preprocessor symbol.

Here is what you get:

Description    Resource    Path    Location    Type
#20 identifier "tEMACWakeUpFrameFilter" is undefined    .ccsproject    /SAB_BSP    line 1008, external location: C:\ti\tirtos_tivac_2_00_01_23\products\TivaWare_C_Series-2.1.0.12573c\driverlib\emac.h    C/C++ Problem
Description    Resource    Path    Location    Type
#66 expected a ";"    .ccsproject    /SAB_BSP    line 864, external location: C:\ti\tirtos_tivac_2_00_01_23\products\TivaWare_C_Series-2.1.0.12573c\driverlib\emac.h    C/C++ Problem
Description    Resource    Path    Location    Type
#80 expected a type specifier    .ccsproject    /SAB_BSP    line 864, external location: C:\ti\tirtos_tivac_2_00_01_23\products\TivaWare_C_Series-2.1.0.12573c\driverlib\emac.h    C/C++ Problem

This comes comes from this definition:

    //
    //! Determines the byte offset within the frame at which the filter starts
    //! examining bytes.  The minimum value for each offset is 12.  The first
    //! byte of a frame is offset 0.
    //
    uint8_t pui8Offset[4];

    //
    //! The CRC16 value that is expected for each filter if it passes.  The
    //! CRC is calculated using all bytes indicated by the filter's mask.
    //
    uint16_t pui16CRC[4];
}
#if defined(ccs) ||             \
    defined(codered) ||         \
    defined(gcc) ||             \
    defined(rvmdk) ||           \
    defined(__ARMCC_VERSION) || \
    defined(sourcerygxx)
__attribute__ ((packed)) tEMACWakeUpFrameFilter;
#else
tEMACWakeUpFrameFilter;
#endif

Obviously the compiler is different between building the driver library from the command line and building in the IDE.  Not sure why defining that we are working under CCS would cause the compiler to barf on "__attribute__ ((packed))", but it does.  So, do not do that!

Ray

  • Hi Ray,

    Raymond Mack said:

    I finally found out why I had undefined symbols when I tried your suggestion to put EMACSnow.c and EMACSnow.h in my project.  For some reason, we had set up "ccs" as a globally defined preprocessor symbol.

    If you are importing the TI-RTOS example from TI Resource Explorer, you will note it already has a "--define=ccs" in the compiler options. Did you have to remove this define or was there some other one that was added to your project ?

    Best,

    Ashish

  • Asish:

    We talked among ourselves as to the source. We think we probably saw something like the string you describe in perhaps the UDP ping example. From that initial "see if we can make the network work" exercise, we probably set "ccs" as a define in the project settings under Predefined Symbols for the compiler and have been propagating it forward since then. The Tiva driver stuff under the IDE for sure does not like that symbol to be defined!

    We absolutely had to remove "ccs" from our Predefined Symbols list in order to use a custom EMACSnow.c

    Ray