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.

error #10234-D: unresolved symbols remain

Other Parts Discussed in Thread: TM4C1294NCPDT, TM4C129ENCPDT

Hello to everyone
While using the following code I am trying to communicate two tm4c1294ncpdt cards with can protocol, I get an "error #10234-D: unresolved symbols remain" error.

This is my code:(referenced from here: ohm.ninja/.../ )

/*
* CAN bus LED controller master firmware
* Written for TI Tiva TM4C1294NCPDT
*/

#include <stdbool.h>
#include <stdint.h>
#include <math.h>

#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "inc/hw_can.h"
#include "inc/hw_ints.h"
#include "driverlib/can.h"
#include "driverlib/interrupt.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "driverlib/uart.h"
#include "driverlib/pin_map.h"

#include "utils/uartstdio.h"

#define PI 3.14159265359f

volatile bool errFlag = 0; // transmission error flag
unsigned int sysClock; // clockspeed in hz

void delay(unsigned int milliseconds) {
SysCtlDelay((sysClock / 3) * (milliseconds / 1000.0f));
}

// CAN interrupt handler
void CANIntHandler(void) {

unsigned long status = CANIntStatus(CAN1_BASE, CAN_INT_STS_CAUSE); // read interrupt status

if(status == CAN_INT_INTID_STATUS) { // controller status interrupt
status = CANStatusGet(CAN1_BASE, CAN_STS_CONTROL); // read back error bits, do something with them?
errFlag = 1;
} else if(status == 1) { // message object 1
CANIntClear(CAN1_BASE, 1); // clear interrupt
errFlag = 0; // clear any error flags
} else { // should never happen
UARTprintf("Unexpected CAN bus interrupt\n");
}
}

int main(void) {

tCANMsgObject msg; // the CAN message object
unsigned int msgData; // the message data is four bytes long which we can allocate as an int32
unsigned char *msgDataPtr = (unsigned char *)&msgData; // make a pointer to msgData so we can access individual bytes

// Run from the PLL at 120 MHz.
sysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);

// Set up debugging UART
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); // enable UART0 GPIO peripheral
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
GPIOPinConfigure(GPIO_PA0_U0RX);
GPIOPinConfigure(GPIO_PA1_U0TX);
GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
UARTStdioConfig(0, 115200, sysClock); // 115200 baud

// Set up CAN1
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); // enable CAN1 GPIO peripheral
GPIOPinConfigure(GPIO_PB0_CAN1RX);
GPIOPinConfigure(GPIO_PB1_CAN1TX);
GPIOPinTypeCAN(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_CAN1);
CANInit(CAN1_BASE);
CANBitRateSet(CAN1_BASE, sysClock, 500000);
CANIntRegister(CAN1_BASE, CANIntHandler); // use dynamic vector table allocation
CANIntEnable(CAN1_BASE, CAN_INT_MASTER | CAN_INT_ERROR | CAN_INT_STATUS);
IntEnable(INT_CAN1);
CANEnable(CAN1_BASE);

// Set up msg object
msgData = 0;
msg.ui32MsgID = 1;
msg.ui32MsgIDMask = 0;
msg.ui32Flags = MSG_OBJ_TX_INT_ENABLE;
msg.ui32MsgLen = sizeof(msgDataPtr);
msg.pui8MsgData = msgDataPtr;

unsigned int t = 0; // loop counter
float freq = 0.3; // frequency scaler

while(1) {

// set up next colour (scale sinf (0-1) to 0-255)
msgDataPtr[0] = (0.5 + 0.5*sinf(t*freq)) * 0xFF;
msgDataPtr[1] = (0.5 + 0.5*sinf(t*freq + (2*PI/3))) * 0xFF; // 120 degrees out of phase
msgDataPtr[2] = (0.5 + 0.5*sinf(t*freq + (4*PI/3))) * 0xFF; // 240 degrees out of phase
msgDataPtr[3] = 128; // 50% intensity

UARTprintf("Sending colour\tr: %d\tg: %d\tb: %d\n", msgDataPtr[0], msgDataPtr[1], msgDataPtr[2]); // write colour to UART for debugging
CANMessageSet(CAN1_BASE, 1, &msg, MSG_OBJ_TYPE_TX); // send as msg object 1

delay(100); // wait 100ms

if(errFlag) { // check for errors
UARTprintf("CAN Bus Error\n");
}

t++; // overflow is fine
}

 return 0;
}

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

and error is here:

and this is include options (I have all header files in these paths, which mentioned on my code.):


Although all the required header files are available and defined, the error is never resolved.  If anyone could help me that will be perfect. 

Thanks.

  • Hi,

      I think you are missing the driverlib.lib in your linker. Please see below. I will suggest you start your project with an existing TivaWare example such as "hello" or "blinky" example. These examples will have the CCS project setup already with proper include search paths and library. 

  • Hello Charles thanks for your interest

    I started from zero like you said. open hello world example and add these header files just to see if any error will occur.

    #include <stdbool.h>
    #include <stdint.h>
    #include <math.h>

    #include "inc/hw_memmap.h"
    #include "inc/hw_types.h"
    #include "inc/hw_can.h"
    #include "inc/hw_ints.h"
    #include "driverlib/can.h"
    #include "driverlib/interrupt.h"
    #include "driverlib/sysctl.h"
    #include "driverlib/gpio.h"
    #include "driverlib/uart.h"
    #include "driverlib/pin_map.h"

    #include "utils/uartstdio.h"

    /**
    * hello.c
    */
    int main(void)
    {
    printf("Hello World!\n");

    return 0;
    }

    ------------------------------------------------------------------------------

    and now:

    >> Compilation failure
    subdir_rules.mk:9: recipe for target 'hello.obj' failed
    "../hello.c", line 5: fatal error #1965: cannot open source file "inc/hw_memmap.h"
    1 catastrophic error detected in the compilation of "../hello.c".
    Compilation terminated.
    gmake: *** [hello.obj] Error 1
    Building file: "../tm4c129encpdt_startup_ccs.c"
    Invoking: Arm Compiler
    "C:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.2.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/Users/Batuhan METE/workspace_v10/hello" --include_path="C:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.2.LTS/include" --define=ccs="ccs" --define=PART_TM4C129ENCPDT -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="tm4c129encpdt_startup_ccs.d_raw" "../tm4c129encpdt_startup_ccs.c"
    Finished building: "../tm4c129encpdt_startup_ccs.c"

    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    ------------------------------------------------------------------------------

    program never sees "inc, driverlib, utils" folders.

    By the way I add the SW_ROOT like you said but there was warning that: SW_ROOT can not be resolved.

    Do you have any idea why is this happening?

  • Hello again. I solved header file problem with adding #include "utils/uartstdio.c" into my code. also I pasted driverlib, utils and inc folders to "C:\ti\ccs1020\ccs\tools\compiler\ti-cgt-arm_20.2.2.LTS\include" folder.