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.

#10234-D unresolved symbols remain for ADC Read code

Other Parts Discussed in Thread: SYSBIOS

Hi

I have been working on ADC Read code in CCS. code is given below,

#include "Board.h"
#include <ti/sysbios/knl/Semaphore.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/family/arm/m3/Hwi.h>
#include <ti/sysbios/family/arm/cc26xx/Power.h>
#include <ti/sysbios/BIOS.h>
#include <ti/drivers/PIN/PINCC26XX.h>
#include <ti/drivers/UART.h>
#include <driverlib/aux_adc.h>
#include <driverlib/aux_wuc.h>
#include <inc/hw_aux_evctl.h>
#define TASK_STACK_SIZE 512
#define TASK_PRI        1
char taskStack[TASK_STACK_SIZE];
Task_Struct taskStruct;
Semaphore_Struct sem;
Semaphore_Handle hSem;
Hwi_Struct hwi;
#define SAMPLECOUNT 8
#define SAMPLETYPE uint16_t
#define SAMPLESIZE sizeof(SAMPLETYPE)
#define ALS_POWER   IOID_26
#define ALS_OUTPUT  IOID_23
SAMPLETYPE adcSamples[SAMPLECOUNT];
SAMPLETYPE singleSample;
// Analog light sensor pins
const PIN_Config alsPins[] = {
  ALS_POWER       | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH   | PIN_PUSHPULL | PIN_DRVSTR_MAX,
  ALS_OUTPUT      | PIN_INPUT_DIS | PIN_GPIO_OUTPUT_DIS ,
  PIN_TERMINATE
};
PIN_Handle pinHandle;
PIN_State  pinState;
UART_Handle uHandle;
void taskFxn(UArg a0, UArg a1);
void adcIsr(UArg a0);
int main(void) {
  //Initialize pins, turn on GPIO module
  PIN_init(BoardGpioInitTable);
  //Initialize task
  Task_Params params;
  Task_Params_init(&params);
  params.priority = TASK_PRI;
  params.stackSize = TASK_STACK_SIZE;
  params.stack = taskStack;
  Task_construct(&taskStruct, taskFxn, &params, NULL);
  // Construct semaphore used for pending in task
  Semaphore_Params sParams;
  Semaphore_Params_init(&sParams);
  sParams.mode = Semaphore_Mode_BINARY;
  Semaphore_construct(&sem, 0, &sParams);
  hSem = Semaphore_handle(&sem);
  BIOS_start();
}
void taskFxn(UArg a0, UArg a1) {
  Hwi_Params hwiParams;
  Hwi_Params_init(&hwiParams);
  hwiParams.enableInt = true;
  Hwi_construct(&hwi, INT_AUX_ADC, adcIsr, &hwiParams, NULL);
  UART_Params uParams;
  // Initialize default values
  UART_Params_init(&uParams);
  // Configure custom data, don't care about read params as not used
  // 115.2kBaud, Text, blocking mode
  uHandle = UART_open(Board_UART,&uParams);
  // Set up pins
  pinHandle = PIN_open(&pinState, alsPins);
  // Enable clock for ADC digital and analog interface (not currently enabled in driver)
  AUXWUCClockEnable(AUX_WUC_MODCLKEN0_SOC_M|AUX_WUC_MODCLKEN0_AUX_ADI4_M);
  // Connect AUX IO7 (DIO23) as analog input. Light sensor on SmartRF06EB
  AUXADCSelectInput(ADC_COMPB_IN_AUXIO7);
  // Set up ADC
  AUXADCEnableSync(AUXADC_REF_FIXED, AUXADC_SAMPLE_TIME_2P7_US, AUXADC_TRIGGER_MANUAL);
  // Disallow STANDBY mode while using the ADC.
  Power_setConstraint(Power_SB_DISALLOW);
  uint8_t currentSample = 0;
  while(currentSample < SAMPLECOUNT) {
    //Sleep 100ms in IDLE mode
    Task_sleep(100 * 1000 / Clock_tickPeriod);
    // Trigger ADC sampling
    AUXADCGenManualTrigger();
    // Wait in IDLE until done
    Semaphore_pend(hSem, BIOS_WAIT_FOREVER );
    adcSamples[currentSample++] = singleSample;
  }
  // Disable ADC
  AUXADCDisable();
  // Allow STANDBY mode again
  Power_releaseConstraint(Power_SB_DISALLOW);
  // Restore pins to values in BoardGpioTable
  PIN_close(pinHandle);
  // Log data through UART
  for(uint8_t i = 0; i<SAMPLECOUNT; i++ ) {
    UART_write(uHandle, &adcSamples[i], SAMPLESIZE);
  }
  // Goto STANDBY forever
  Task_sleep(BIOS_WAIT_FOREVER);
}
void adcIsr(UArg a0) {
  // Pop sample from FIFO to allow clearing ADC_IRQ event
  singleSample = AUXADCReadFifo();
  // Clear ADC_IRQ flag. Note: Missing driver for this.
  HWREGBITW(AUX_EVCTL_BASE + AUX_EVCTL_O_EVTOMCUFLAGSCLR, AUX_EVCTL_EVTOMCUFLAGSCLR_ADC_IRQ_BITN) = 1;
  // Post semaphore to wakeup task
  Semaphore_post(hSem);
}
I am creating a new project with this code. I have added the header files to the include path. But I am getting an error

#10234-D unresolved symbols remain ADCRead C/C++ Proble

The build message shows unresolved symbol as follows

undefined first referenced
symbol in file
--------- ----------------
ResetISR

error #10234-D: unresolved symbols remain
warning #10062-D: entry-point symbol "ResetISR" undefined

How can I avoid all these errors and create stand alone error free ccs project for Reading ADC value?

  • I can tell you what is wrong.  I cannot tell you how to fix it.

    Somewhere in your code there is a reference to the symbol ResetISR.  The diagnostic includes the name of the file where the reference occurs, but I don't see it in your post.  This reference could a be a function call (unlikely) or an entry in a table (more likely).  However, there is no definition of the symbol ResetISR.  No function with that name.  Such errors are usually due to configuring something incorrectly, or not including a library in the link, or something similar.

    Thanks and regards,

    -George

  • George Mock,

    Yes this error was due to not including the library. and I got solution from the ti forum. The link to the answer is given below

    e2e.ti.com/.../430252

    This may help other newbies to resolve "unresolved symbol ResetISR".