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 problem unresolved

Other Parts Discussed in Thread: TM4C123GH6PGE

I have a project that ran on a PC we moved it to Stelaris and now to TIVA.

This product is a machine sensor ( reading an array of button and updating displays) that is connected to a PC via an USB.

When I configured this code I copy 3 files from the USB library into my project so can make changes to them (altering BUFFER_SIZE only) and keep them safe from USB library updates.  Because of this issue these files are not touched.

The files are:  usb_device_serial.c 

                          usb_serial_structs.c 

                          usb_serial_structs.h

The compiler error I get it s the following:


>> Compilation failure
gmake: *** [EPGMain.obj] Error 1
'Building file: ../EPGPackets.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/arm_5.1.8/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.9/include" --include_path="c:/ti/TivaWare_C_series-2.1.0.12573" -g --gcc --define=ccs="ccs" --define=PART_TM4C123GH6PGE --display_error_number --diag_warning=225 --diag_wrap=off --gen_func_subsections=on --ual --preproc_with_compile --preproc_dependency="EPGPackets.pp"  "../EPGPackets.c"
"..\USB/usb_serial_structs.h", line 65: error #20: identifier "tUSBDCDCDevice" is undefined
1 error detected in the compilation of "../EPGPackets.c".

>> Compilation failure
gmake: *** [EPGPackets.obj] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

Any suggestions as to where to look?

  • george 55616 said:
    "..\USB/usb_serial_structs.h", line 65: error #20: identifier "tUSBDCDCDevice" is undefined
    1 error detected in the compilation of "../EPGPackets.c".

    tUSBDCDCDevice is defined in the TivaWare usblib/device/usbdcdc.h include file.

    I.e. try adding the following to EPGPackets.c before the include of usb_serial_structs.h:

    #include "usblib/device/usbdcdc.h"

  • Thank You for your help.

    Inserting that line

    #include "usblib/device/usbdcdc.h"  in EPGPackets.c caused a new error message to appear along with the original error message.

    -----------------------------------------------------

    >> Compilation failure
    gmake: *** [EPGMain.obj] Error 1
    'Building file: ../EPGPackets.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/arm_5.1.8/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.9/include" --include_path="c:/ti/TivaWare_C_series-2.1.0.12573" -g --gcc --define=ccs="ccs" --define=PART_TM4C123GH6PGE --display_error_number --diag_warning=225 --diag_wrap=off --gen_func_subsections=on --ual --preproc_with_compile --preproc_dependency="EPGPackets.pp"  "../EPGPackets.c"
    "..\USB/usb_serial_structs.h", line 65: error #20: identifier "tUSBDCDCDevice" is undefined
    "c:/ti/TivaWare_C_series-2.1.0.12573/usblib/device/usbdcdc.h", line 165: error #20: identifier "tLineCoding" is undefined
    2 errors detected in the compilation of "../EPGPackets.c".

    ----------------------------------------------------------

    Another file EPGMain.c has that same original error message.  I also tried inserting you suggested include line in EPGMain.c with the same results

    That line might be necessary but not sufficient.  Id does not remove the original error message.

  • No luck but thatks.
     
    George F. Martin
    The Revolver Supply Company, LLC 
    PO Box 400  
    Mimbres, NM 88049                   FEMA Region VI
    860-395-3643 (C)                     Mountain Time Zone Same as Denver CO,  EST-2 hours

    Supplies for the Revolver Enthusiast:  http://www.revolversupply.com           Sign up for the newsletter LINK
    Associate Producer No Agenda Show   Check it out  LINK

    "Quality means doing it right when no one is looking" Henry Ford



  • george 55616 said:
    "..\USB/usb_serial_structs.h", line 65: error #20: identifier "tUSBDCDCDevice" is undefined
    "c:/ti/TivaWare_C_series-2.1.0.12573/usblib/device/usbdcdc.h", line 165: error #20: identifier "tLineCoding" is undefined
    2 errors detected in the compilation of "../EPGPackets.c".

    tLineCoding is defined in usblib/usbcdc.h

    The #includes need to be arranged in the correct order so that tLineCoding and tUSBDCDCDevice are defined before they are used.

    This is an example of the includes from a usb_serial_structs.c file which compiles:

    #include <stdint.h>
    #include <stdbool.h>
    #include <usblib/usblib.h>
    #include <usblib/usbcdc.h>
    #include <usblib/usb-ids.h>
    #include <usblib/device/usbdevice.h>
    #include <usblib/device/usbdcdc.h>
    
    #include "usb_serial_structs.h"

  • Progress...........................!!

    Ordering the includes resolved the problem in EPGPackets.c

    It did not however resolve that same error in EPGMain.c


    Here is the include file ordering in EPGMain.c

    ---------------------------------------------------------------


    #include <stdint.h>
    #include <stdbool.h>
    #include <usblib/usblib.h>
    #include <usblib/usbcdc.h>
    #include <usblib/usb-ids.h>
    #include <usblib/device/usbdevice.h>
    #include <usblib/device/usbdcdc.h>

    #include "USB/usb_serial_structs.h"


    //#include <stdint.h>
    //#include <stdbool.h>

    #include "inc/hw_nvic.h"
    #include "inc/hw_types.h"

    //#include "USB/usb_serial_structs.h"

    //#include "driverlib/debug.h"
    //#include "usblib/usblib.h"
    //#include "usblib/usblibpriv.h"

    //#include "usblib/device/usbdcdc.h"

    #include "EPGConsts.h"
    #include "EPGPackets.h"

    #include "ICS/ICSLIO.H"

    -------------------------------------

    All the EPGxxxx and ICS/xxxxxx and USB/xxxxx reference files in my project.

    Same error report

    **** Build of configuration Debug for project PPortRepl ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../EPGMain.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/arm_5.1.8/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.9/include" --include_path="c:/ti/TivaWare_C_series-2.1.0.12573" -g --gcc --define=ccs="ccs" --define=PART_TM4C123GH6PGE --display_error_number --diag_warning=225 --diag_wrap=off --gen_func_subsections=on --ual --preproc_with_compile --preproc_dependency="EPGMain.pp"  "../EPGMain.c"
    "..\USB/usb_serial_structs.h", line 65: error #20: identifier "tUSBDCDCDevice" is undefined
    1 error detected in the compilation of "../EPGMain.c".

  • george 55616 said:
    When I configured this code I copy 3 files from the USB library into my project so can make changes to them (altering BUFFER_SIZE only) and keep them safe from USB library updates.  Because of this issue these files are not touched.

    That is, almost certainly, a bad idea. It has every possibility of turning into a nightmare.

    It would be far better would be to create a project specific version of the library.  Probably in a sub-directory with notes on the configuration changes made.

    You should also ask why, if buffer size commonly varies, there is no mechanism to vary it w/o modifying the library. Is it an oversight on the part of the library builders (it is vendor supplied so that would not be unbelievable) or is the problem you are addressing better solved in a different fashion.

    george 55616 said:

    The compiler error I get it s the following:


    >> Compilation failure
    gmake: *** [EPGMain.obj] Error 1
    'Building file: ../EPGPackets.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/arm_5.1.8/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.9/include" --include_path="c:/ti/TivaWare_C_series-2.1.0.12573" -g --gcc --define=ccs="ccs" --define=PART_TM4C123GH6PGE --display_error_number --diag_warning=225 --diag_wrap=off --gen_func_subsections=on --ual --preproc_with_compile --preproc_dependency="EPGPackets.pp"  "../EPGPackets.c"
    "..\USB/usb_serial_structs.h", line 65: error #20: identifier "tUSBDCDCDevice" is undefined
    1 error detected in the compilation of "../EPGPackets.c".

    >> Compilation failure
    gmake: *** [EPGPackets.obj] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

    That's where the nightmare starts.

    george 55616 said:
    Any suggestions as to where to look?

    I'm going to be a little blunt here.  Have you tried searching? You should be able to find all the references (including the definition) with a grep search or your editor.  And if your current tools don't support this kind of search you are in need of ones that do. 

    It's possible the identifier is built up using concatenation operators but that's a little obscure and not often justifiable.

    Robert

  • Pure blasphemy here - have you considered - and/or tried - using Rev 9453 StellarisWare? That & earlier versions escaped much of the change & difficulty arising under the "rebrand."

    Our small tech firm continues to use 9453 - with past LX4F (which vendor assures is TM4C equiv.) - and has escaped (thus far) any/all issues brought about by the, "rebrand."