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-TM4C123GXL: EK-TM4C123GXL

Part Number: EK-TM4C123GXL

Tool/software: TI C/C++ Compiler

Hello,

We are a group of research students working at Penn State and we are stuck at the moment. 

We're trying upload this code into our microcontroller but kept getting a "driver/rgb.h" error (can not open source) so we added the "driver" folder provided  under the ti examples folder. And this resolved the rgb error but gave us 78 errors revolving around a "declaration incompatible error" ( see picture)

  

Attached is a copy of our code, we're thinking it's a compiler compatibility issue? Please send help.

1157.test.zip

  • Hello Kevin,

    It looks like you are trying to start a fresh project in CCS. I wouldn't recommend that, rather I'd suggest repurposing one of our provided TivaWare examples. There are many compiler configurations and include options needed, and a base project will require a lot of changes to get it to compile right due to that. You'd be running the quickest by just taking a TivaWare example, renaming for your project, and then including the files you need that way.
  • Bravo Ralph.    (suggested "repurpose" (or more clearly, "ATTACH TO")  "Vendor Supplied Project" - rather than the (never explained) unfortunate, "Desire by users" to "Create their own" (most always FLAWED) Projects.)

    Might the fact that this issue arrives here - so frequently - and w/such destructive impact - signal that "BETTER" User Alerting Methods  (i.e. some alerting methods) be  considered & "productively"  promoted & deployed?

  • Thank you Ralph for your swift response. 

    We did what you said and used a TI example but still end up with the error "Cannot open source file for a drivers/rgb.h". 

    below is a picture of our include paths and below that is a picture of our error message.  

    The "${RGB_VAR}/drivers" is a directory to the Tivaware C Series ---> examples -----> boards----> ek-tm4c123gxl----> drivers (where there is the rgb.h file).

    This was created after the include path for the whole Tivaware_C_Series-2.1.4.178 file was added because this resolved in the same error message. 

    Attached is a copy of our project folder. Please send help.

    Project code.zip

  • Hello Kevin,

    Then based on your description, you'd be looking for the file in C:\ti\TivaWare_C_Series-2.1.4.178\examples\boards\ek-tm4c123gxl\drivers\drivers\rgb.h

    If you are doing to #include drivers\rgb.h in your .c file, then you only need to define the following search path:

    "${SW_ROOT}/examples/boards/ek-tm4c123gxl"

    Where SW_ROOT is the TivaWare defined method to get to the base TivaWare folder.

    With you having defined ${RGB_VAR}/drivers as C:\ti\TivaWare_C_Series-2.1.4.178\examples\boards\ek-tm4c123gxl\drivers\, then when you add into the .c file #include drivers\rgb.h, you are telling it to look for ...\drivers\drivers\rgb.h which doesn't exist.

    You should also be able to get away with #include rgb.h, but I'd recommend sticking with our TivaWare format of using the SW_ROOT link to point to the board folder, and then use the drivers\rgb.h include.