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/CC1310: ccs/cc1310

Part Number: CC1310
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

When i build my programme this erreur appear can you help me to resolve this   

  • Hello,
    You have provided very little information to us, making it difficult to help you.

    What kind of information do you need to provide? Please see the link below:
    software-dl.ti.com/.../ccs_support.html

    Your full build output would be most useful.

    Thanks
    ki
  • The version of os host is Windows 10 64 bit and the version of CCS is
    7.4.0.00015


    **** Build of configuration Debug for project sonde_fw ****

    "C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 2 all -O

    ../update_version.sh ../version.h
    makefile:197: recipe for target 'pre-build' failed
    process_begin: CreateProcess(NULL, ../update_version.sh ../version.h, ...) failed.
    make (e=2): Le fichier spécifié est introuvable.

    gmake[1]: [pre-build] Error 2 (ignored)

    'Building file: "../easylink/EasyLink.c"'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.7.LTS/bin/armcl" -mv7M3 --code_state=16 --float_support=vfplib -me -O4 --opt_for_speed=0 --include_path="C:/Users/berna/workspace_v7/sonde_fw" --include_path="C:/ti/simplelink_cc13x0_sdk_1_60_00_21/kernel/tirtos/packages/ti/sysbios/posix" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.7.LTS/include" --define=DeviceFamily_CC13X0 --define=DEVICE_FAMILY=cc13x0 -g --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on --preproc_with_compile --preproc_dependency="easylink/EasyLink.d_raw" --obj_directory="easylink" --cmd_file="C:/Users/berna/Desktop/Optomesure/Documentation/livraison/livraison/sonde/sonde et sonde_gateway_src/tirtos_builds_CC1310_LAUNCHXL_release_ccs/Debug/configPkg/compiler.opt" "../easylink/EasyLink.c"

    >> Compilation failure
    easylink/subdir_rules.mk:9: recipe for target 'easylink/EasyLink.obj' failed
    "../easylink/EasyLink.c", line 309: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 445: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 502: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 589: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 687: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 750: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 815: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 931: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 961: error #20: identifier "RF_EventCmdError" is undefined
    9 errors detected in the compilation of "../easylink/EasyLink.c".
    gmake[1]: *** [easylink/EasyLink.obj] Error 1
    makefile:163: recipe for target 'all' failed
    gmake[1]: Target 'main-build' not remade because of errors.
    gmake: *** [all] Error 2

    **** Build Finished ****
  • abdelkader ZAABOUBI said:
    "../easylink/EasyLink.c", line 309: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 445: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 502: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 589: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 687: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 750: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 815: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 931: error #20: identifier "RF_EventCmdError" is undefined
    "../easylink/EasyLink.c", line 961: error #20: identifier "RF_EventCmdError" is undefined

    This is a common error message. See the below link for more explanation:

    https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/568592

    Hence, you need to include the header file that defines RF_EventCmdError. 

    Thanks

    ki

  • thnak you for your support
    please can you show me how to includ RF_EventCmdError and where i can change it,
  • this is my code :

    * ======== rfEasyLinkTx.c ========
    */
    /* XDCtools Header files */
    #include <stdlib.h>
    #include <xdc/std.h>
    #include <xdc/runtime/System.h>
    #include <xdc/runtime/Error.h>

    /* BIOS Header files */
    #include <ti/sysbios/BIOS.h>
    #include <ti/sysbios/knl/Task.h>
    #include <ti/sysbios/knl/Clock.h>

    /* TI-RTOS Header files */
    #include <ti/drivers/PIN.h>
    #include <ti/drivers/Power.h>

    #include <ti/devices/cc13x0/driverlib/aon_batmon.h>
    #include <ti/devices/cc13x0/driverlib/aux_adc.h>
    #include <ti/devices/cc13x0/driverlib/chipinfo.h>
    #include <ti/devices/cc13x0/driverlib/sys_ctrl.h>

    /* Board Header files */
    #include "Board.h"

    /* EasyLink API Header files */
    #include "easylink/EasyLink.h"


    #include "sc/scif.h"

    #include "version.h"
    #include "../sonde_gw_fw/sys_intf.h"

    #include <string.h>
    #include <math.h>

    #define RFEASYLINKTX_TASK_STACK_SIZE 1024
    #define RFEASYLINKTX_TASK_PRIORITY 2

    #define RFEASYLINKTX_BURST_SIZE 1

    Task_Struct txTask; /* not static so you can see in ROV */
    static Task_Params txTaskParams;
    static uint8_t txTaskStack[RFEASYLINKTX_TASK_STACK_SIZE];

    Task_Struct sensorTask; /* not static so you can see in ROV */
    static Task_Params sensorTaskParams;
    static uint8_t sensorTaskStack[RFEASYLINKTX_TASK_STACK_SIZE];


    static PIN_State pinState;
    static PIN_Handle pin_handle;

    typedef struct {
    uint8_t reason;
    int16_t temp_deg_frac_8;
    uint8_t bat_20mV;
    } opto_sonde_data_t;

    const int OPTOSONDE_BROKEN_TEMP_SENSOR_THRESHOLD = 1500 * 1000; // 1.5 V
    //#define OPTOSONDE_DEMO_MODE 1


    PIN_Config pinTable[] = {
    PIN_ID(8) | PIN_INPUT_EN | PIN_PULLUP | PIN_HYSTERESIS,
    PIN_TERMINATE
    };

    void sleepAndReset(uint32_t sleep_time_secs) {

    // Enable button interrupt wake up
    PIN_setInterrupt(pin_handle, PIN_ID(8) | PIN_IRQ_NEGEDGE);

    uint32_t secs = sleep_time_secs;
    while (secs > 0)
    {
    uint32_t sleep_s = secs > 2000 ? 2000 : secs;
    Task_sleep((sleep_s * 1000u * 1000) / Clock_tickPeriod);
    secs -= sleep_s;
    }

    SysCtrlSystemReset();
    }

    static void rfEasyLinkTxFnx(UArg arg0, UArg arg1)
    {

    opto_sonde_data_t* optosonde_data = (opto_sonde_data_t*) arg0;
    // rtc_cmd_t* rtc_cmd = arg1;

    // EasyLink_init(EasyLink_Phy_625bpsLrm);
    // EasyLink_init(EasyLink_Phy_5kbpsSlLr);
    EasyLink_init(EasyLink_Phy_Custom);

    /*
    * If you wish to use a frequency other than the default, use
    * the following API:
    * EasyLink_setFrequency(868000000);
    */

    /* Set output power to 12dBm */
    // EasyLink_setRfPwr(12);
    EasyLink_setRfPwr(10);

    EasyLink_TxPacket txPacket;

    // Fill packet data
    uint8_t payload_ptr = 0;
    // Payload version
    txPacket.payload[payload_ptr++] = (uint8_t) (0x0);
    // Src MAC
    EasyLink_getIeeeAddr(&txPacket.payload[payload_ptr]);
    payload_ptr += 8;

    // Copy data
    txPacket.payload[payload_ptr++] = (uint8_t) (optosonde_data->reason);
    txPacket.payload[payload_ptr++] = (uint8_t) (optosonde_data->temp_deg_frac_8 >> 8);
    txPacket.payload[payload_ptr++] = (uint8_t) (optosonde_data->temp_deg_frac_8);

    txPacket.payload[payload_ptr++] = (uint8_t) (optosonde_data->bat_20mV);

    // Firmware version
    memcpy(&txPacket.payload[payload_ptr], &VERSION_HASH, sizeof(VERSION_HASH));
    payload_ptr += sizeof(VERSION_HASH);

    txPacket.len = payload_ptr;
    txPacket.absTime = 0;
    txPacket.dstAddr[0] = OPTOSONDE_ADDR;

    EasyLink_Status result = EasyLink_transmit(&txPacket);

    if (result == EasyLink_Status_Success)
    {
    /* Toggle LED1 to indicate TX */
    // PIN_setOutputValue(pinHandle, Board_PIN_LED1,!PIN_getOutputValue(Board_PIN_LED1));
    }
    else
    {
    /* Toggle LED1 and LED2 to indicate error */
    // PIN_setOutputValue(pinHandle, Board_PIN_LED1,!PIN_getOutputValue(Board_PIN_LED1));
    // PIN_setOutputValue(pinHandle, Board_PIN_LED2,!PIN_getOutputValue(Board_PIN_LED2));
    }

    // Prevent button reset overload
    if (optosonde_data->reason == optosonde_reason_button) {
    Task_sleep(1000000 / Clock_tickPeriod);
    }

    // Tell RTC to sleep
    #ifdef OPTOSONDE_DEMO_MODE
    uint32_t sleep_time_s = 30;
    #elif OPTOSONDE_VITICODE
    uint32_t sleep_time_s = 10 * 60;
    #else
    uint32_t sleep_time_s = 1 * 3600;
    #endif

    sleepAndReset(sleep_time_s);
    }

    void sendorTask_AlertCB()
    {
    static opto_sonde_data_t optosonde_data;


    /* Clear the ALERT interrupt source */
    scifClearAlertIntSource();

    /* Only handle the periodic event alert */
    if (scifGetAlertEvents() & (1 << SCIF_ADCMEAS_TASK_ID))
    {
    optosonde_data.reason = optosonde_reason_periodic;
    /* Get the SCE "output" structure */
    SCIF_ADCMEAS_OUTPUT_T* pOutput = scifGetTaskStruct(SCIF_ADCMEAS_TASK_ID, SCIF_STRUCT_OUTPUT);

    int32_t adcVal_uV[5];
    int i;
    for (i = 0; i < 4; i++) {
    adcVal_uV[i] = AUXADCValueToMicrovolts(AUXADC_FIXED_REF_VOLTAGE_NORMAL, AUXADCAdjustValueForGainAndOffset(pOutput->ntcraw[i], AUXADCGetAdjustmentGain(AUXADC_REF_FIXED), AUXADCGetAdjustmentOffset(AUXADC_REF_FIXED)));
    }
    adcVal_uV[4] = 0;

    int validMeasIdx;

    for (validMeasIdx = 0; validMeasIdx < 4; validMeasIdx++) {
    if (adcVal_uV[validMeasIdx] > OPTOSONDE_BROKEN_TEMP_SENSOR_THRESHOLD) {
    if (validMeasIdx == 3) {
    // Sensor is dead
    optosonde_data.reason = optosonde_reason_sensorfail;
    }
    } else {
    break;
    }
    }

    const int32_t ptcR = adcVal_uV[validMeasIdx] / pOutput->ntcIuA[validMeasIdx];

    const double ptcB25_100 = 3950;
    const double rinf = 0.1763226979; // rinf = R0 * exp(-B/T0)

    // T = B / ln (R / rinf)
    double ptcTemp = ptcB25_100 / log(ptcR / rinf) - 273.15;
    optosonde_data.temp_deg_frac_8 = (int16_t) (ptcTemp * 256);

    while (!AONBatMonNewBatteryMeasureReady())
    {
    // Wait
    Task_sleep(1000 * 1000 / Clock_tickPeriod);
    }
    optosonde_data.bat_20mV = (AONBatMonBatteryVoltageGet() * 390625) / 2000000;
    AONBatMonDisable();

    if (PIN_getInputValue(IOID_8) == 0) {
    optosonde_data.reason = optosonde_reason_button;
    }

    // Init Tx task
    Task_Params_init(&txTaskParams);
    txTaskParams.stackSize = RFEASYLINKTX_TASK_STACK_SIZE;
    txTaskParams.priority = RFEASYLINKTX_TASK_PRIORITY + 1;
    txTaskParams.stack = &txTaskStack;
    txTaskParams.arg0 = (xdc_UArg) &optosonde_data;

    Task_construct(&txTask, rfEasyLinkTxFnx, &txTaskParams, NULL);

    }
    else
    {
    // Sensor failed
    sleepAndReset(10 * 60);
    }

    /* Acknowledge the alert event */
    scifAckAlertEvents();
    scifUninit();
    }

    void sensorTask_fn(UArg arg0, UArg arg1)
    {
    AONBatMonEnable();

    scifOsalInit();
    scifOsalRegisterTaskAlertCallback(sendorTask_AlertCB);
    scifInit(&scifDriverSetup);
    scifExecuteTasksOnceNbl(1 << SCIF_ADCMEAS_TASK_ID);
    }

    void pinInt(PIN_Handle handle, PIN_Id pinId) {
    if (pinId == 8) {
    // Force reset to trigger measure and TX
    SysCtrlSystemReset();
    }
    }

    /*
    * ======== main ========
    */
    int opto_main(void)
    {
    /* Call driver init functions. */
    Board_initGeneral();

    pin_handle = PIN_open(&pinState, pinTable);

    PIN_registerIntCb(pin_handle, pinInt);

    // Sensor task
    Task_Params_init(&sensorTaskParams);
    txTaskParams.stackSize = RFEASYLINKTX_TASK_STACK_SIZE;
    txTaskParams.priority = RFEASYLINKTX_TASK_PRIORITY;
    txTaskParams.stack = &sensorTaskStack;
    txTaskParams.arg0 = 0;
    txTaskParams.arg1 = 0;

    Task_construct(&sensorTask, sensorTask_fn, &sensorTaskParams, NULL);


    /* Start BIOS */
    BIOS_start();

    return (0);
    }
  • abdelkader ZAABOUBI said:
    please can you show me how to includ RF_EventCmdError and where i can change it,

    Do you know which header file it is defined? If so, you need to include the header file to the source file using it. If you don't know which header file and you are using one of TI's examples from the SDK, the experts in the device forum would know best.