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.

CCS/EK-TM4C129EXL: UART6 Compilation Error

Part Number: EK-TM4C129EXL

Tool/software: Code Composer Studio

Hi,

I am debugging a code using ccs8 to receive data from sensor using the UART protocol (UART6)

there is no compilation error but when i try to execute the program it directs to exit.c

how do i resolve this error.

  • Hi Rahul,

    One of the reasons (the most i encountered) is due to accessing peripheral without enabling them.

    For example, by typo error, you access portN (which is say not enabled) but actually you intended to access portF (which is enabled).

    Check your code carefully for such typo error(s).


    Hope this is of any help.

    BR,
    Pranav.
  • rahul iyer said:
    there is no compilation error but when i try to execute the program it directs to exit.c

    That file name 'exit.c' was outside of my '10+ years here - file name recognition' & 'not found' via my Windows Search of 'all' TM4C files.

    As the other poster suggested - yet did not detail - has the 'long-standing'  "FAULT_ISR" been (now) 'sanitized?'     (into the far 'less explanatory/useful' ... 'exit.c?')

    Your error - as w/most such errors - best resolves w/ your presentation of  your code-base.      (ideally limited to your UART set-up and function calls.)

  • Hello cb1,

    The exit.c file is part Code Composer Studio ARM compiler which is why you haven't experienced it before. It's not even a FaultISR. It occurs rarely, but there are times issues will cause the compiler to go there.

    Hello Rahul,

    Can you please post your source code, there is likely something erroneous with your code setup.
  • Thank you, Ralph - never would (any here) have that recognition.    Clients & Investors demand that we (potentially) accommodate ALL ARM MCUs - not just (any)  - (so limited) a selection.

    We thus have ZERO interest or awareness - in ANY 'Single Vendor 'Solution.'       (How possibly ... can such self-limiting - be good?)

  • hi Ralph,

    i am trying to read data from neo 6m gps module and displaying the same on the virtual com port

    i modified the uart_echo code to receive data on UART6 and send it to the terminal via UART0

    the code is:

    #include <stdint.h>

    #include <stdbool.h>

    #include "inc/hw_ints.h"

    #include "inc/hw_memmap.h"

    #include "driverlib/debug.h"

    #include "driverlib/fpu.h"

    #include "driverlib/gpio.h"

    #include "driverlib/interrupt.h"

    #include "driverlib/pin_map.h"

    #include "driverlib/rom.h"

    #include "driverlib/sysctl.h"

    #include "driverlib/uart.h"

    #include "stdio.h"

    #ifdef DEBUG

    void

    __error__(char *pcFilename, uint32_t ui32Line)

    {

    }

    #endif

    // Handler function of interrupts on UART4

    // Configuration is done in startup_ccs.c file

    // Vector table definition in startup_ccs.c as

    /*...*/

    /* UART4IntHandler,                        // UART4 Rx and Tx */

    /*...*/

    void

    UART4IntHandler(void)

    {

        // Clear interrupts on UART4

        uint32_t ui32Status;

        ui32Status = ROM_UARTIntStatus(UART4_BASE, true);

        ROM_UARTIntClear(UART4_BASE, ui32Status);

        // Turn on the led at the start of reading

        GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2, GPIO_PIN_2);

        while(ROM_UARTCharsAvail(UART4_BASE))

        {

            // Write GPS data(that is read from UART4) to UART0

            ROM_UARTCharPutNonBlocking(UART0_BASE, ROM_UARTCharGetNonBlocking(UART4_BASE));

        }

        //Turn off the led at the end of reading

        GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2, 0);

    }

    int

    main(void)

    {

        // Enable lazy stacking for interrupt handlers.

        ROM_FPUEnable();

        ROM_FPULazyStackingEnable();

        // Set the clocking to run directly from the crystal.

        ROM_SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |

                           SYSCTL_XTAL_16MHZ);

        // Enable the peripherals used:

        // Port C Pins will be used as UART4

        ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART4);

        ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);

        // Port F will be used for on-board led

        ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);

        // Port A pins will be used as UART0(Virtual serial connection-debug)

        ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);

        ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);

        // Enable processor interrupts.

        ROM_IntMasterEnable();

        // Set PC4 as UART4 RX

        GPIOPinConfigure(GPIO_PC4_U4RX);

        ROM_GPIOPinTypeUART(GPIO_PORTC_BASE, GPIO_PIN_4);

        // Set GPIO A1 as UART0 Tx(Transmit)

        GPIOPinConfigure(GPIO_PA1_U0TX);

        ROM_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_1);

        // Configure the UART0 for 115,200, 8-N-1 operation.

        // This is the serial connection between TM4C and PC

        ROM_UARTConfigSetExpClk(UART0_BASE, ROM_SysCtlClockGet(), 115200,

                                (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |

                                 UART_CONFIG_PAR_NONE));

        // Configure the UART0 for 115,200, 8-N-1 operation.

        // This is the serial connection between TM4C and PC

        ROM_GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_2);

        // Configure the UART for 9600, 8-N-1 operation. GPS module provides data in 9600 bps

        // This is the connection between GPS Module(U-blox NEO6M)

        ROM_UARTConfigSetExpClk(UART4_BASE, ROM_SysCtlClockGet(), 9600,

                                (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |

                                 UART_CONFIG_PAR_NONE));

        // Enable the UART4 interrupt. Other interrupts are not needed since

        // we do not expect anything from PC, it is used for displaying GPS data

        ROM_IntEnable(INT_UART4);

        ROM_UARTIntEnable(UART4_BASE, UART_INT_RX | UART_INT_RT);

        while(1)

        {

        }

    }

    on compilation of the program i am getting the following errors 

    Description Resource Path Location Type

    • #10010 null: errors encountered during linking; "uart_echo.out" not built uart_echo C/C++ Problem

    <a href="processors.wiki.ti.com/.../10234">

    • #10234-D</a> null: unresolved symbols remain uart_echo C/C++ Problem
    • gmake: *** [uart_echo.out] Error 1 uart_echo C/C++ Problem
    • gmake: Target 'all' not remade because of errors. uart_echo C/C++ Problem
    • unresolved symbol UARTIntHandler, first referenced in ./startup_ccs.obj uart_echo C/C++ Problem

    i have changed Default Interrupt handler of UART6 to UART6Handler function in startup_ccs.c

    please help me to resolve these errors

  • Hello Rahul,

    Check your ISR name and make sure it is properly defined like this in the startup_ccs.c file.

    extern void UARTIntHandler(void);

    If the extern tag isn't used, then the uart_echo.c file won't see it properly.

    You talked about changing the interrupt handler to UART6Handler, so make sure you have something like:

    extern void UART6Handler(void);
  • hi Ralph

    do i replace extern void UARTIntHandler(void)
    as
    extern void UART6Handler(void)
    or simply add the latter to the file
  • Hello Rahul,

    You need an extern void statement for each ISR you are going to access in your main code file. So if you are using both UARTIntHandler and UART6Handler, then you need externs for both. If you replaced UARTIntHandler in your main code file with UART6Handler, then you can make the same replacement in your startup_ccs.c file.
  • hi Ralph

    thank you for all the help the code compiles with no errors
  • hi Ralph

    while executing the program the virtual com port reads the data as follows

    $GNRMC,041342.755,V,,,,,,,060718,,,M*5F

    how do i rectify this to get a correct output
  • Hello Rahul,

    Check that the baud rate for the TM4C code, your UART terminal, and your COM Port are all aligned. That looks like what happens when you have the wrong baud rate set and so the terminal can't properly read the data and therefore outputs garbled messes. Chances are you are using either 9600 or 115200 on the TM4C, so look for the UART configuration function, determine the baud rate, and have it correctly set on the receiving end (your PC and Terminal software).
  • Hi Ralph,

    at the receiving end i.e. UART6 the baud rate is set to 9600 since neo 6m send data at 9600 bit rate

    UART0 and the COM Port are set to 115200

    still some of the feilds are empty

    how do i resolve this

  • Hello Rahul,

    Can you make a new thread for this issue? It is not a compilation error anymore, so it doesn't fit well within this thread.
  • hi Ralph

    in the same code how do i store the incoming data (from UART6) in a variable instead of echoing the data