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/LAUNCHXL-CC26X2R1: Adding support for UART2: compilation error

Part Number: LAUNCHXL-CC26X2R1
Other Parts Discussed in Thread: SYSCONFIG

Tool/software: Code Composer Studio

I'm using cc26x2r1 board and using simple_central ble project. There are two uart port support in board. I'm using UART with inbuilt xds110 log support. I want to enable second uart UART2 for other purpose. I have modified sysconfig and add UART2. But facing issue while compiling.
Below is the error and snippet of corresponding generated sysconfig.

--------- Compilation error
>> Compilation failure
subdir_rules.mk:29: recipe for target 'syscfg/ti_drivers_config.obj' failed
"syscfg/ti_drivers_config.c", line 517: error #20: identifier "UDMA_CHAN_UART1_RX" is undefined
"syscfg/ti_drivers_config.c", line 518: error #20: identifier "UDMA_CHAN_UART1_TX" is undefined

--------------- Snippet of auto generated config file
UART2CC26X2_Object uart2CC26X2Objects[CONFIG_UART2_COUNT];

static const UART2CC26X2_HWAttrs uart2CC26X2HWAttrs[CONFIG_UART2_COUNT] = {
{
.baseAddr = UART1_BASE,
.intNum = INT_UART1_COMB,
.intPriority = (~0),
.rxPin = IOID_5,
.txPin = IOID_4,
.ctsPin = PIN_UNASSIGNED,
.rtsPin = PIN_UNASSIGNED,
.rxChannelMask = 1 << UDMA_CHAN_UART1_RX,
.txChannelMask = 1 << UDMA_CHAN_UART1_TX,
.txIntFifoThr = UART2CC26X2_FIFO_THRESHOLD_1_8,
.rxIntFifoThr = UART2CC26X2_FIFO_THRESHOLD_4_8
},
};

Please help me out from this..

  • Hi Vinay,

    1) What version of the SimpleLink CC13x2/CC26x2 SDK are you using?

    2) Did you define UDMA_CHAN_UART1_RX and UDMA_CHAN_UART1_TX anywhere?

  • Hi Marie,

    A1: I am using simplelink_cc13x2_26x2_sdk_3_30_00_03 sdk and use simple_central example for reference.

    A2: No I haven't difined such variables/constants anywhere in program. I have modified sysconfig to enable uart2 support. In simple_central sysconfig uart0 is used for display so I simply added uart2 and compile code. UDMA_CHAN_UART1_RX and UDMA_CHAN_UART1_TX are part of auto generated code.

    Thanks & Regards,

    Vinay

  • Hi Marie,

    Did you get information? Plz let me know if need further data.

    Regards,

    Vinay

  • Hi Vinay,

    Sorry for the late reply.

    Can you make sure the two uarts are not using the same UART peripheral (one uses UART0 and one uses UART1). Check this in Sysconfig -> URAT/UART2 -> PinMux -> UART Peripheral.

  • Hi Marie,

    Both uart using different pinmux. Sharing the sysconfig file for reference.

    Regards,

    Vinay

    // These arguments were used when this file was generated. They will be automatically applied on subsequent loads 
    // via the GUI or CLI invocations. Run CLI with '--help' for additional information on how to override these arguments.
    // @cliArgs --board "/ti/boards/CC26X2R1_LAUNCHXL" --product "simplelink_cc13x2_26x2_sdk@3.30.00.03"
    // @versions {"data":"2019083011","timestamp":"2019083011","tool":"1.2.952","templates":"2019083011"}
    
    var RTOS = scripting.addModule("/ti/drivers/RTOS");
    var AESCCM = scripting.addModule("/ti/drivers/AESCCM");
    var AESCCM1 = AESCCM.addInstance();
    var DMA = scripting.addModule("/ti/drivers/DMA");
    var Board = scripting.addModule("/ti/drivers/Board");
    var DriverLib = scripting.addModule("/ti/devices/DriverLib");
    var Power = scripting.addModule("/ti/drivers/Power");
    var CCFG = scripting.addModule("/ti/devices/CCFG");
    var AESECB = scripting.addModule("/ti/drivers/AESECB");
    var AESECB1 = AESECB.addInstance();
    var ECDH = scripting.addModule("/ti/drivers/ECDH");
    var ECDH1 = ECDH.addInstance();
    var AESCTRDRBG = scripting.addModule("/ti/drivers/AESCTRDRBG");
    var AESCTRDRBG1 = AESCTRDRBG.addInstance();
    var Display = scripting.addModule("/ti/display/Display");
    var Display1 = Display.addInstance();
    var GPIO = scripting.addModule("/ti/drivers/GPIO");
    var GPIO1 = GPIO.addInstance();
    var GPIO2 = GPIO.addInstance();
    var NVS = scripting.addModule("/ti/drivers/NVS");
    var NVS1 = NVS.addInstance();
    var RF = scripting.addModule("/ti/drivers/RF");
    var TRNG = scripting.addModule("/ti/drivers/TRNG");
    var TRNG1 = TRNG.addInstance();
    var ble = scripting.addModule("/ti/ble5stack/ble");
    var multi_stack_validate = scripting.addModule("/ti/easylink/multi_stack_validate");
    // Name
    AESCCM1.$name = "Board_AESCCM0";
    // Enable Bootloader - Enable ROM Bootloader, for flashing from external host
    CCFG.enableBootloader = true;
    // Enable Bootloader Backdoor - When enabling the Bootloader Backdoor, the Bootloader can be activated externally by pulling a pin, even when a valid flash image is present. Note, enabling the backdoor allows an external host to read back a flash image from the device
    CCFG.enableBootloaderBackdoor = true;
    // Bootloader Backdoor DIO - DIO (pin) to trigger Bootloader backdoor, this pin is only needed at boot
    CCFG.dioBootloaderBackdoor = 13;
    // Trigger Level of Bootloader Backdoor - Active high or low on selected DIO to open boot loader backdoor
    CCFG.levelBootloaderBackdoor = "Active low";
    // Name
    CCFG.ccfgTemplate.$name = "ti_devices_CCFGTemplate0";
    // Name
    AESECB1.$name = "CONFIG_AESECB0";
    // Name
    ECDH1.$name = "CONFIG_ECDH0";
    // Name - The C/C++ identifier used in applications as the index parameter passed to aesctrdrbg runtime APIs
    AESCTRDRBG1.$name = "CONFIG_AESCTRDRBG_0";
    // Name
    AESCTRDRBG1.aesctrObject.$name = "CONFIG_AESCTR_0";
    // Name - The C/C++ identifier used in applications as the index parameter passed to Display runtime APIs
    Display1.$name = "CONFIG_Display_0";
    // Use Hardware - Select the hardware to use, or 'None' to use available header pins
    Display1.$hardware = system.deviceData.board.components.XDS110UART;
    // Enable ANSI - Enables or disables ANSI cursor support.
    Display1.enableANSI = true;
    // UART Buffer Size - UART display buffer size in bytes
    Display1.uartBufferSize = 128;
    // Name - The C/C++ identifier used in applications as the index parameter passed to UART runtime APIs
    Display1.uart.$name = "CONFIG_DISPLAY_UART";
    // Output State - Initial Output State
    Display1.uart.txPinInstance.outputState = "High";
    // Name
    Display1.uart.txPinInstance.$name = "CONFIG_PIN_UART_TX";
    // Name
    Display1.uart.rxPinInstance.$name = "CONFIG_PIN_UART_RX";
    // Name
    Display1.uart.uart.$name = "MyUART1";
    // Use Hardware - Select the hardware to use, or 'None' to use available header pins
    GPIO1.$hardware = system.deviceData.board.components["BTN-1"];
    // Mode - Select the GPIO mode
    GPIO1.mode = "Dynamic";
    // Name - The C/C++ identifier used in applications as the index parameter passed to GPIO runtime APIs
    GPIO1.$name = "CONFIG_GPIO_BTN1";
    // Name
    GPIO1.pinInstance.$name = "CONFIG_PIN_BTN1";
    // Use Hardware - Select the hardware to use, or 'None' to use available header pins
    GPIO2.$hardware = system.deviceData.board.components["BTN-2"];
    // Mode - Select the GPIO mode
    GPIO2.mode = "Dynamic";
    // Name - The C/C++ identifier used in applications as the index parameter passed to GPIO runtime APIs
    GPIO2.$name = "CONFIG_GPIO_BTN2";
    // Name
    GPIO2.pinInstance.$name = "CONFIG_PIN_BTN2";
    // Name - The C/C++ identifier used in applications as the index parameter passed to NVS runtime APIs
    NVS1.$name = "CONFIG_NVSINTERNAL";
    // Name
    NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0";
    // Region Base - Base address of the region. Must be aligned on an integer multiple of the sector size.
    NVS1.internalFlash.regionBase = 0x48000;
    // Region Size - Size of the region in bytes. Must be a non-zero multiple of the Sector Size
    NVS1.internalFlash.regionSize = 0x4000;
    // Name - The C/C++ identifier used in applications as the index parameter passed to TRNG runtime APIs
    TRNG1.$name = "CONFIG_TRNG_0";
    // Device Role - The BLE device role
    ble.deviceRole = "CENTRAL_CFG";
    // Lock Project
    ble.lockProject = true;
    // Pairing Mode
    ble.bondPairing = "GAPBOND_PAIRING_MODE_INITIATE";
    // Name
    ble.radioConfig.codeExportConfig.$name = "ti_radioconfig_code_export_param0";
    // Name
    ble.connUpdateParamsCentral.$name = "ti_ble5stack_general_ble_conn_update_params0";
    // Suggest solution
    Display1.uart.uart.$suggestSolution = "UART1";
    // Suggest solution
    Display1.uart.uart.txPin.$suggestSolution = "8";
    // Suggest solution
    Display1.uart.uart.rxPin.$suggestSolution = "7";
    // Suggest solution
    GPIO1.gpioPin.$suggestSolution = "19";
    // Suggest solution
    GPIO2.gpioPin.$suggestSolution = "20";
    

  • Hi Vinay,

    I was not able to reproduce your issue with SimpleLink CC13x2/CC26x2 SDK 3.40. Also, I can only see one usert in the txt file you posted.