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.

Problem in starting my first project for uart communication.

Other Parts Discussed in Thread: TM4C1294NCPDT

Hi
I am very new to the TI microcontrollers. Have a TM4C1294XL Launchpad and I have just started with the example applications. I tested the uart_echo example on the board.

Now I have just started a new project in the CCS and in the main.c, just copied all the code from the uart_echo example c file and I am trying to run that.

First problem i faced was regarding the files in #include. So I added the respective paths in include options in my project settings.

Further, I see a lot of errors and warnings on this new project.

Description    Resource    Path    Location    Type
#10010 errors encountered during linking; "mytrials1.out" not built    mytrials1             C/C++ Problem
#10234-D unresolved symbols remain    mytrials1             C/C++ Problem
unresolved symbol GPIOPinConfigure, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol GPIOPinWrite, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol ROM_GPIOPinTypeGPIOOutput, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol ROM_GPIOPinTypeUART, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol ROM_IntEnable, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol ROM_IntMasterEnable, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol ROM_SysCtlPeripheralEnable, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol ROM_UARTCharGetNonBlocking, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol ROM_UARTCharPutNonBlocking, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol ROM_UARTCharsAvail, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol ROM_UARTConfigSetExpClk, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol ROM_UARTIntClear, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol ROM_UARTIntEnable, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol ROM_UARTIntStatus, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol SysCtlClockFreqSet, first referenced in ./main.obj    mytrials1             C/C++ Problem
unresolved symbol SysCtlDelay, first referenced in ./main.obj    mytrials1             C/C++ Problem
#225-D function "ROM_GPIOPinTypeGPIOOutput" declared implicitly    main.c    /mytrials1    line 175    C/C++ Problem
#225-D function "ROM_GPIOPinTypeUART" declared implicitly    main.c    /mytrials1    line 194    C/C++ Problem
#225-D function "ROM_IntEnable" declared implicitly    main.c    /mytrials1    line 206    C/C++ Problem
#225-D function "ROM_IntMasterEnable" declared implicitly    main.c    /mytrials1    line 187    C/C++ Problem
#225-D function "ROM_SysCtlPeripheralEnable" declared implicitly    main.c    /mytrials1    line 169    C/C++ Problem
#225-D function "ROM_UARTCharGetNonBlocking" declared implicitly    main.c    /mytrials1    line 99    C/C++ Problem
#225-D function "ROM_UARTCharPutNonBlocking" declared implicitly    main.c    /mytrials1    line 109    C/C++ Problem
#225-D function "ROM_UARTCharPutNonBlocking" declared implicitly    main.c    /mytrials1    line 147    C/C++ Problem
#225-D function "ROM_UARTCharsAvail" declared implicitly    main.c    /mytrials1    line 94    C/C++ Problem
#225-D function "ROM_UARTConfigSetExpClk" declared implicitly    main.c    /mytrials1    line 199    C/C++ Problem
#225-D function "ROM_UARTIntClear" declared implicitly    main.c    /mytrials1    line 89    C/C++ Problem
#225-D function "ROM_UARTIntEnable" declared implicitly    main.c    /mytrials1    line 207    C/C++ Problem
#225-D function "ROM_UARTIntStatus" declared implicitly    main.c    /mytrials1    line 84    C/C++ Problem

What more am I required to do in order to build and run this on the board? What more steps am I missing?

Regards


KK

  • Hi!

    Check your project settings (right click on your project then Properties) and compare yours to the working one, especially:

    Linked Resources->Path Variables
    Build->Variables Tab
    Arm Compiler->Include options
    Arm Linker->File Search Paths

    PS: There is a better way to start a project from scratch: just right click + copy on a project in the Project Explorer, then right click + paste it. You have a dialog to change the name of this copied project and later you can change whatever you want using rename and properties etc. in the Project Explorer.

  • Thanks JustGreg

    I will do that...
  • Hello Kaushik,

    You need to add the in the include section of the project's C file, "driverlib/rom.h" and "driverlib/rom_map.h"

    Also to be added are in the Define section of the project, TARGET_IS_TM4C129_RA1 and PART_TM4C1294NCPDT.

    Regards
    Amit
  • Thanks Amit.
    Since I have copied the existing code of the uart_echo example, the rom.h and rom_map.h were already included.

    I have also now compared the 4 places pointed out by JustGreg.

    And the errors have vanished. That was certainly the step I was missing.

    Now my new project which is a copy of the uart_echo project builds and when I run the project, I get "Enter text" prompt on the serial terminal window.
    However, when I type anything, that is not echoed back. If i build and run the original example, I see a proper echoing of the characters.

    What I am probably missing more because of which the uart echo is not working?

    I tried addng a breakpoint in the interrupt handling routine but that point is not reached. Which means, that the uart interrupt is probably not working in my project? Any idea why that could happen?

    Thanks and Regards

    KK
  • Kaushik Kale said:
    I tried addng a breakpoint in the interrupt handling routine but that point is not reached. Which means, that the uart interrupt is probably not working in my project? Any idea why that could happen?

    The TivaWare uartEcho example contains the interrupt vectors in flash in the g_pfnVectors[] array in the startup_ccs.c source file, and there is the following entry for the UART interrupt handler:

        UARTIntHandler,                         // UART0 Rx and Tx
    

    Have you done the same in your project?

  • Hello Kaushik,

    Then why not use the original project as the starting template?

    Regards
    Amit
  • Thanks Chester

    Yes I was missing on the Interrupt handler.

    That solved the problem.

    KK
  • Thanks Amit for your time.

    But the Interrupt Handler entry solved the problem.

    I agree, using the original project as a starting template is a best way... but wanted to start with a new project with an example code.

    Thanks once again all of you for your time.

    KK
  • Since he is new to this platform he wants to learn what is under the hood I guess :-)
  • Hello Greg,

    BeyondCompare of folders....

    Regards
    Amit