Quantcast
Viewing all articles
Browse latest Browse all 262198

ERROR #10234-D unresolved symbols remain and ERROR #10010 error encountered during linking

Can anybody tell how is the following error regarding linking of files and unresolved symbols solved; since it is a common error I encounter while building many of my codes.

In this program I have included the "utils/uartstdio.h" where the definitions for the so called unresolved symbols is given but still the error persists.

Here's the code I used from the examples;


#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/adc.h"
#include "driverlib/gpio.h"
#include "driverlib/sysctl.h"
#include "driverlib/uart.h"
#include "utils/uartstdio.h"

#define GPIO_PA0_U0RX 0x00000001
#define GPIO_PA1_U0TX 0x00000401


void
InitConsole(void)
{
//
// Enable GPIO port A which is used for UART0 pins.

SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);


GPIOPinConfigure(GPIO_PA0_U0RX);
GPIOPinConfigure(GPIO_PA1_U0TX);

//
// Select the alternate (UART) function for these pins.

GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);

//
// Initialize the UART for console I/O.
//
UARTStdioInit(0);
}


int
main(void)
{

unsigned long ulADC0_Value[1];

SysCtlClockSet(SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_16MHZ);


InitConsole();

//
// Display the setup on the console.
//
UARTprintf("ADC ->\n");
UARTprintf(" Type: Single Ended\n");
UARTprintf(" Samples: One\n");
UARTprintf(" Update Rate: 250ms\n");
UARTprintf(" Input Pin: AIN0/PE7\n\n");

SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);


SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);



GPIOPinTypeADC(GPIO_PORTE_BASE, GPIO_PIN_3);


//
ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_PROCESSOR, 0);

ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_CH0 | ADC_CTL_IE |
ADC_CTL_END);

//
// Since sample sequence 3 is now configured, it must be enabled.
//
ADCSequenceEnable(ADC0_BASE, 3);

//
// Clear the interrupt status flag. This is done to make sure the
// interrupt flag is cleared before we sample.
//
ADCIntClear(ADC0_BASE, 3);

//
// Sample AIN0 forever. Display the value on the console.
//
while(1)
{
//
// Trigger the ADC conversion.
//
ADCProcessorTrigger(ADC0_BASE, 3);

//
// Wait for conversion to be completed.
//
while(!ADCIntStatus(ADC0_BASE, 3, false))
{
}

//
// Clear the ADC interrupt flag.
//
ADCIntClear(ADC0_BASE, 3);

//
// Read ADC Value.
//
ADCSequenceDataGet(ADC0_BASE, 3, ulADC0_Value);

//
// Display the AIN0 (PE7) digital value on the console.
//
UARTprintf("AIN0 = %4d\r", ulADC0_Value[0]);

// Delay
// 250ms arbitrarily.
//
SysCtlDelay(SysCtlClockGet() / 12);
}
}

CONSOLE OUTPUT 

**** Build of configuration Debug for project ADC Input ****

C:\ti\ccsv5\utils\bin\gmake -k all
'Building target: ADC Input.out'
'Invoking: ARM Linker'
"C:/ti/ccsv5/tools/compiler/tms470_4.9.5/bin/cl470" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --diag_warning=225 --display_error_number -z --stack_size=256 -m"ADC Input.map" --heap_size=0 -i"C:/ti/ccsv5/tools/compiler/tms470_4.9.5/lib" -i"C:/ti/ccsv5/tools/compiler/tms470_4.9.5/include" --reread_libs --warn_sections --display_error_number --rom_model -o "ADC Input.out" "./startup_ccs.obj" "./main.obj" "./am.obj" -l"libc.a" -l"C:\StellarisWare\driverlib\ccs-cm4f\Debug\driverlib-cm4f.lib" "../lm4f120h5qr.cmd"
<Linking>

undefined first referenced
symbol in file
--------- ----------------
UARTStdioInit ./main.obj
UARTprintf ./main.obj

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "ADC Input.out" not built

>> Compilation failure
gmake: *** [ADC Input.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>