Jump to content
Sign in to follow this  
RAKSH

New CCS project which has UART functions included from UARTStdio.h

Recommended Posts

For the sake of thanking this community for solving my issue ,I would like to write a post on how I overcame this issue thanks to community member Stepman .

I use the TIva C Series Launchpad .

For a program employing UART if you are getting errors like  
 

Description Resource Path Location Type
unresolved symbol UARTprintf, first referenced in ./main.obj 
 

Description Resource Path Location Type
unresolved symbol UARTStdioConfig, first referenced in ./main.obj 

Then you have not copied or linked your uartstdio.c file from utils/uartstdio.c

If you are getting errors like
 

Description Resource Path Location Type
#20 identifier "GPIO_PA0_U0RX" is undefined main.c /SPI line 113 C/C++ Problem
 

Description Resource Path Location Type
#20 identifier "GPIO_PA1_U0TX" is undefined main.c /SPI line 114 C/C++ Problem

Then you have to do the following steps :-

1.Right Click on your project and go to properties->arm compiler->advanced options->predefined symbols
2.Their , in the Pre-Define name area add

    a)PART_TM4C123GH6PM or whichever MCU part name you are using 
    b)PART_IS_BLIZZARD_RB1 for the Tiva C series and PART_IS_BLIZZARD_RA1 for previous versions .


The above should also be of help when you get errors related to other Pin definitions such as for SPI and PWM pin defs.


Make sure that if you have included  DEBUG in pre-define names then you include  debug statements as follows
in main.c

//*****************************************************************************
//
// 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

Prior to the above make sure that you have added driverlib.lib in properties->arm linker->include library
Navigate to driverlib->CCS->Debug->driverlib.lib

Make sure that you also add this file to your project .


And if you are on a noob level don't forget to include TivaWare directory in your include options . 

Share this post


Link to post
Share on other sites

Hey, I'm using the LM4F120H5QR, with CCS. I've encountered the same error as you describe above

 

'Description Resource Path Location Type

#20 identifier "GPIO_PA1_U0TX" is undefined main.c /SecondUartTest line 101 C/C++ Problem'
 
I've added the following to the Predefined Symbols tab:
'PART_LM4F120H5QR', 
'TARGET_IS_BLIZZARD_RA1' (tried RB1 as well) 
 
I am still getting the error. I've tried using energia and I can get the other UARTs to work. I've also tried looking through the include files for a reference to GPIO_PA1_U0TX, as I guess this is just a memory location, but I can't find it referred to anyway, I believe it should be in hw_uart.h ? I've found a reference to 'GPIO_PCTL_PA1_U0TX' in inc/lm4f120h5qr.h . Using this instead gets rid of the symbol undefined error, but no uart transmission. 
 
Any pointers or help you can give would be much appreciated, thanks!
 
*** Just a quick update on this:
 
   Managed to get UART0 to work by using:
    GPIOPinConfigure(GPIO_PORTA_BASE|GPIO_PCTL_PA0_U0RX);
   Though addition of other UARTs seems to stop this working, I'm building off of uart_echo.c
***

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...