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.

Compile Time Errors

Other Parts Discussed in Thread: TM4C123GH6PM

I'm posting this as a last resort after endlessly searching in all forums and posts .
I'm using the Tiva C Series TM4C123GH6PM launchpad and am trying to use SSI and UART on it .
The code seems irrelevant to this post as the problems I'm facing are compile time errors .

For eg.
GPIO_PA2_SSI0CLK undefined
GPIO_PA0_U0RX  undefined ,etc .

For the project  , I have included the following :-


#include <stdbool.h>
#include <stdint.h>
#include "inc/hw_memmap.h"
#include "driverlib/gpio.h"
#include "driverlib/pin_map.h"
#include "driverlib/ssi.h"
#include "driverlib/sysctl.h"
#include "driverlib/uart.h"
#include "utils/uartstdio.h"
#include "inc/hw_types.h"
#include "inc/hw_gpio.h"
#include "inc/hw_ssi.h"
#include "inc/tm4c123gh6pm.h"

I have linked the driverlib.lib to my project .
I have mentioned the TivaWare directory in the include options and in the Build Variables .
I have mentioned the directory of driverlib.lib in the Files search paths .

I have added startup_ccs.c


Desperately require help .
 

The code that I am compiling is the SPI_master example in the Tivaware examples . 

 

  • I resolved the issue of the compiler not recognising SPI definitions by including the following in Predifined symbols

    PART_IS_BLIZZARD_RA1
    PART_TM4C123GH6PM

    DEBUG
     

    But still a few errors are unresolved ,

     After i added  the uartstdio.c  ,i get 

    Description Resource Path Location Type
    unresolved symbol __error__, first referenced in ./main.obj SPI C/C++ Problem

    Description Resource Path Location Type
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain SPI C/C++ Problem

    All of the above errors didn't come up until i added  uartstdio.c

     

  • This is from the DEBUG define. Either undefine it (as it is in the examples I looked at) or add the code from the examples (listed below).

    See the user's guide and driverlib/debug.h for the ASSERT macro.

    A quick glance shows that the driverlib.lib doesn't use it, but you'll want to verify yourself.

    //*****************************************************************************
    //
    // The error routine that is called if the driver library encounters an error.
    //
    //*****************************************************************************
    #ifdef DEBUG
    void
    __error__(char *pcFilename, uint32_t ui32Line)
    {
        UARTprintf("Error at line %d of %s\n", ui32Line, pcFilename);
        while(1)
        {
        }
    }
    #endif

  • Rakshit Ramesh said:

    I resolved the issue of the compiler not recognising SPI definitions by including the following in Predifined symbols

    PART_IS_BLIZZARD_RA1
    PART_TM4C123GH6PM

    DEBUG

    And for the sake of completeness, when you are building your own project in CCS, the other define you may need is

    ccs="ccs"

    Also PART_IS_BLIZZARD_RA1, RA1 is the silicon revision. I really don't know which silicon bugs driverlib works around. If you are using a TM4C123GH6PM, not the older LM4F or LX4F parts you'll want that to be PART_IS_BLIZZARD_RB1

     

  • Thanks a lot Stepman !

    I removed the DEBUG define from predefined symbols and all my errors vanished !
    Changing the

    PART_IS_BLIZZARD_RA1 to PART_IS_BLIZZARD_RB1 didn't make any difference .
    (I'm using TM4c123GH6PM)

     

  • I suspect you are meaning TARGET_IS_BLIZZARD_RA1 or TARGET_IS_BLIZZARD_RB1 here. These are labels that are used by rom.h to determine the subset of DriverLib functions that are available in a given part's ROM.

  • In what user guide is all this defined? I have been having the same problems and it is extermely frustrating that I try to copy the examples like you provide and I can't get a simple program to compile because driverlib is so hard to configure.

  • Now that you mention it, this is rather badly documented. It's hinted at in the ROM User's Guide but not at all clear. I'll make sure we add something to the DriverLib User's Guide to clear this up before the next release.

    Edit 11/1/13: I posted this after looking at the ROM User's Guide but now that I look in the DriverLib User's Guide, I see that there is already a chapter devoted to using ROM calls. Take a look in Chapter 36. The list of valid "TARGET_IS_<part class>_<revision>" tags hasn't been updated to include the new TM4C129 (Snowflake) class parts - I'll fix this - but the information on using rom.h and rom_map.h is all there.