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.

RTOS: CC2650 Launchpad UART Log

Other Parts Discussed in Thread: CC2650

Tool/software: TI-RTOS

Hi everyone

Like title says, I want to see my log in an uart terminal, like this: http://processors.wiki.ti.com/index.php/CC26xx_Ouput_TI-RTOS_Log_statements_over_UART

But, I can't see anything on Putty:

So, as the image shows, I can establish the conection with the board, but I can't see anything.

Here are my codes:

main.c

/* XDCtools Header files */
#include <xdc/std.h>
#include <xdc/runtime/System.h>
#include <xdc/runtime/Log.h>
#include <xdc/runtime/Diags.h>

//Logs
#include <ti/uia/events/UIAEvt.h>
#include <ti/uia/events/UIAErr.h>

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

/* TI-RTOS Header files */
#include <ti/drivers/I2C.h>
#include <ti/drivers/i2c/I2CCC26XX.h>
#include <ti/drivers/UART.h>
#include <ti/drivers/uart/UARTCC26XX.h>
#include <ti/drivers/PIN.h>

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

/* External Files */
#include "display_balanza.h"
#include "uart_logs.h"


int main(void)
{
    /* Call board init functions */
    Board_initGeneral();
    //Board_initI2C();
    Log_info0("Board Initialized");

    //UART PARA LOG
    Board_initUART();
    UART_init(); //Test
    UART_Params uartParams;
    UART_Params_init(&uartParams);
    uartParams.baudRate = 115200;
    UART_Handle hUart = UART_open(Board_UART, &uartParams);
    // Initialize the logger output
    UartLog_init(hUart);
    Log_info0("UART Logger initialized");

    //Inicializamos tarea I2C Slave
    display_balanza_createTask();
    Log_info0("Task 'display_balanza' created with success");

    /* Start BIOS */
    Log_info0("Starting BIOS");
    BIOS_start();

    return (0);
}

uart_logs.c and uart_logs.h were downloaded from here: http://processors.wiki.ti.com/index.php/File:Cc26xx_uart_log_loggercallback_example.zip

config.cfg

/* ================ TI-RTOS drivers' configuration ================ */
var driversConfig = xdc.useModule('ti.drivers.Config');
/*
 * Include TI-RTOS drivers
 *
 * Pick one:
 *  - driversConfig.LibType_NonInstrumented (default)
 *      Use TI-RTOS drivers library optimized for footprint and performance
 *      without asserts or logs.
 *  - driversConfig.LibType_Instrumented
 *      Use TI-RTOS drivers library for debugging with asserts and logs enabled.
 */
driversConfig.libType = driversConfig.LibType_Instrumented;
//driversConfig.libType = driversConfig.LibType_Instrumented;

/* LOG CONFIGURATION  */
// Remaining Modules
var Diags = xdc.useModule('xdc.runtime.Diags');
var Main = xdc.useModule('xdc.runtime.Main');
var Reset = xdc.useModule('xdc.runtime.Reset');

var UIAEvt = xdc.useModule('ti.uia.events.UIAEvt');
var UIAErr = xdc.useModule('ti.uia.events.UIAErr');


// Need Text loaded for formatting of Log_info/warning/error, but not for Log_print.
Text.isLoaded = true;

// Logging
var Log = xdc.useModule('xdc.runtime.Log');

// Override error output color with ANSI codes, and use shorter (file.c:line) format.
Log.L_error =  {
    mask: Diags.STATUS,
    level: Diags.ERROR,
    msg: "\x1b[31;1mERROR:\x1b[0m (%s:%d) %$S"
};

Log.L_info = {
    mask: Diags.INFO,
    msg: "\x1b[32;1mINFO:\x1b[0m (%s:%d) %$S"
};

Log.L_warning = {
    mask: Diags.STATUS,
    level: Diags.WARNING,
    msg: "\x1b[33;1mWARNING:\x1b[0m (%s:%d) %$S"
    };

// Pull in LoggerCallback
var LoggerCallback = xdc.useModule('xdc.runtime.LoggerCallback');

// Tell LoggerCallback to call our output function
LoggerCallback.outputFxn = "&uartLog_outputFxn";

// Tell the Idle module to add our flush() function to the idle loop (before Power)
//var Idle = xdc.useModule('ti.sysbios.knl.Idle'); // Add if Idle isn't already imported.
Idle.addFunc('&uartLog_flush');

// Create a static instance of LoggerCallback and set as default Main logger
var loggerParams = new LoggerCallback.Params();
loggerParams.arg = 1;

// Only for Main (code that's not in an rtsc module)
Main.common$.logger = LoggerCallback.create(loggerParams);
//Defaults.common$.logger = LoggerCallback.create(loggerParams); // Use for all log events

// Turn on USER1 logs and INFO in Main module (user code). Turn off USER2 for fun.
Main.common$.diags_USER1 = Diags.ALWAYS_ON;
Main.common$.diags_USER2 = Diags.ALWAYS_ON;
Main.common$.diags_USER3 = Diags.ALWAYS_ON;
Main.common$.diags_USER4 = Diags.ALWAYS_ON;
Main.common$.diags_USER5 = Diags.ALWAYS_ON;
Main.common$.diags_USER6 = Diags.ALWAYS_ON;
Main.common$.diags_INFO = Diags.ALWAYS_ON;

/* ================ UIA LOG ================ */
/*var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;

LoggingSetup.sysbiosSwiLogging = true;
LoggingSetup.sysbiosHwiLogging = true;
LoggingSetup.sysbiosSemaphoreLogging = true;*/

And there are some things to print in my task's file, like this:

display_balanza.c

void display_balanza_taskFxn(UArg a0, UArg a1){
	//Inicializamos todas las variables de la tarea
	display_balanza_init();
	Log_info0("Inicializated success");

	//Loop infinito de la tarea
	while(1){
		while(I2CSlaveStatus(I2C0_BASE) != I2C_SLAVE_ACT_RREQ_FBR);
		//I2CSlaveIntClear(I2C0_BASE, I2C_SLAVE_INT_START);
		Log_info0("Recibiendo FBR");
		break_fbr = false;
		PIN_setOutputValue(ledPinHandle, Board_LED0, 1);
		i2cDataArray[0] = I2CSlaveDataGet(I2C0_BASE);
		//I2CSlaveIntClear(I2C0_BASE, I2C_SLAVE_INT_DATA);
		for (i = 1; i < ARRAYDATA_SIZE; i++){
				while(I2CSlaveStatus(I2C0_BASE) != I2C_SLAVE_ACT_RREQ){
					if(I2CSlaveStatus(I2C0_BASE) == I2C_SLAVE_ACT_RREQ_FBR){
						Log_info0("Break, FBR Again");
						break_fbr = true;
						break;
					}
				}
				if(break_fbr){
					break;
				}
				Log_info0("Recibiendo Byte");
				i2cDataArray[i] = I2CSlaveDataGet(I2C0_BASE);
				//I2CSlaveIntClear(I2C0_BASE, I2C_SLAVE_INT_DATA);
		}
		//Log_info3("Recibido: %d - %d - %d", (IArg) i2cDataArray[0], (IArg) i2cDataArray[1], (IArg) i2cDataArray[2]);
		//Log_print1(Diags_USER1, "Recibido: %d", (IArg)i2cDataArray);
		Log_info0("Recibido");
		display_balanza_getData(i2cDataArray);
		//I2CSlaveIntClear(I2C0_BASE, I2C_SLAVE_INT_STOP);
	}
}

Thank you in advance for your response!

PD:

In the link of the tutorial above, says this:

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

Remove global Log disable

If it's present, change predefined symbol below (or remove entirely) to avoid removing all Log statements from the code, which we don't want now.
  xdc_runtime_Log_DISABLE_ALL --> X_xdc_runtime_Log_DISABLE_ALL

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

I don't know if that is necesary, because, when I active the UIA logger, I can see the logs (going to Tools-->RTOS Analyzer--> Printf and error logs).

Moreover, if it would need, I don't know how to desactivate the log disable statement (I am using CCSv6)

  • Hi Daniel,

    Daniel Rabinovich said:

    uart_logs.c and uart_logs.h were downloaded from here: http://processors.wiki.ti.com/index.php/File:Cc26xx_uart_log_loggercallback_example.zip

    I tried importing the sources and cfg file from the above example into a basic TI-RTOS project and was able to get the UART log to work. So, I believe the example is fine. I noticed that your cfg file does not fully mirror the above example's cfg. Can you rework the cfg file to match the example's version and try again ? Also, please comment out the display_balanza_createTask() before trying. You can un comment it if UART log works.

    Can you also share your application <Board>.c and <Board.h> files ? Please share the TI-RTOS version you are using too.

    Best,

    Ashish

  • Thanks for your answer, Ashish Kapania!!

    I made another project, an empty project, and put the .cfg , uart_logs.c and uart_logs.h and it works!!

      

    Then, i've copy the same .cfg file to the "display_balanza" project, and it didn't work :(

    The board.h and board.c files are the same in both project's, but i'll put them in the final of the answer so you can see them.

    So, it seems to be the problem in another part, not in the .cfg file.

    Any idea of what can happening?

    Thanks!!

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

     

    TI-RTOS Version: 2.21.0.06

    board.h

    #ifndef __BOARD_H
    #define __BOARD_H
    
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    #include <ti/drivers/Power.h>
    
    #include "CC2650_LAUNCHXL.h"
    
    /* These #defines allow us to reuse TI-RTOS across other device families */
    #define     Board_LED0              Board_RLED
    #define     Board_LED1              Board_GLED
    #define     Board_LED2              Board_LED0
    
    #define     Board_BUTTON0           Board_BTN1
    #define     Board_BUTTON1           Board_BTN2
    
    #define     Board_UART0             Board_UART
    #define     Board_AES0              Board_AES
    #define     Board_WATCHDOG0         CC2650_LAUNCHXL_WATCHDOG0
    
    #define     Board_ADC0              CC2650_LAUNCHXL_ADCVSS
    #define     Board_ADC1              CC2650_LAUNCHXL_ADCVDDS
    
    #define     Board_ADCBuf0           CC2650_LAUNCHXL_ADCBuf0
    #define     Board_ADCBufChannel0    (0)
    #define     Board_ADCBufChannel1    (1)
    
    #define     Board_initGeneral() { \
        Power_init(); \
        if (PIN_init(BoardGpioInitTable) != PIN_SUCCESS) \
            {System_abort("Error with PIN_init\n"); \
        } \
    }
    
    #define     Board_initGPIO()
    #define     Board_initPWM()        PWM_init()
    #define     Board_initSPI()         SPI_init()
    #define		Board_initI2C()			I2C_init()
    #define     Board_initUART()        UART_init()
    #define     Board_initWatchdog()    Watchdog_init()
    #define     Board_initADCBuf()      ADCBuf_init()
    #define     Board_initADC()         ADC_init()
    #define     GPIO_toggle(n)
    #define     GPIO_write(n,m)
    
    #ifdef __cplusplus
    }
    #endif
    
    #endif /* __BOARD_H */
    

    CC2650_LAUNCHXL.c

    /*
     *  ====================== CC2650_LAUNCHXL.c ===================================
     *  This file is responsible for setting up the board specific items for the
     *  CC2650 LaunchPad.
     */
    
    
    /*
     *  ====================== Includes ============================================
     */
    #include <xdc/std.h>
    #include <xdc/runtime/System.h>
    
    #include <ti/sysbios/family/arm/m3/Hwi.h>
    #include <ti/drivers/PIN.h>
    #include <ti/drivers/pin/PINCC26XX.h>
    #include <ti/drivers/PWM.h>
    #include <ti/drivers/pwm/PWMTimerCC26XX.h>
    #include <ti/drivers/timer/GPTimerCC26XX.h>
    #include <ti/drivers/Power.h>
    #include <ti/drivers/power/PowerCC26XX.h>
    
    #include <inc/hw_memmap.h>
    #include <inc/hw_ints.h>
    #include <driverlib/ioc.h>
    #include <driverlib/udma.h>
    
    #include <Board.h>
    
    /*
     *  ========================= IO driver initialization =========================
     *  From main, PIN_init(BoardGpioInitTable) should be called to setup safe
     *  settings for this board.
     *  When a pin is allocated and then de-allocated, it will revert to the state
     *  configured in this table.
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(BoardGpioInitTable, ".const:BoardGpioInitTable")
    #pragma DATA_SECTION(PINCC26XX_hwAttrs, ".const:PINCC26XX_hwAttrs")
    #endif
    
    const PIN_Config BoardGpioInitTable[] = {
    
        Board_RLED   | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,         /* LED initially off             */
        Board_GLED   | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,         /* LED initially off             */
        Board_BTN1   | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS,            /* Button is active low          */
        Board_BTN2   | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS,            /* Button is active low          */
        Board_SPI_FLASH_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MIN,  /* External flash chip select    */
        Board_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN,                                              /* UART RX via debugger back channel */
        Board_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL,                        /* UART TX via debugger back channel */
        Board_SPI0_MOSI | PIN_INPUT_EN | PIN_PULLDOWN,                                            /* SPI master out - slave in */
        Board_SPI0_MISO | PIN_INPUT_EN | PIN_PULLDOWN,                                            /* SPI master in - slave out */
        Board_SPI0_CLK | PIN_INPUT_EN | PIN_PULLDOWN,                                             /* SPI clock */
    
        PIN_TERMINATE
    };
    
    const PINCC26XX_HWAttrs PINCC26XX_hwAttrs = {
        .intPriority = ~0,
        .swiPriority = 0
    };
    /*============================================================================*/
    
    /*
     *  ============================= Power begin ==================================
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(PowerCC26XX_config, ".const:PowerCC26XX_config")
    #endif
    const PowerCC26XX_Config PowerCC26XX_config = {
        .policyInitFxn      = NULL,
        .policyFxn          = &PowerCC26XX_standbyPolicy,
        .calibrateFxn       = &PowerCC26XX_calibrate,
        .enablePolicy       = TRUE,
        .calibrateRCOSC_LF  = TRUE,
        .calibrateRCOSC_HF  = TRUE,
    };
    /*
     *  ============================= Power end ====================================
     */
    
    /*
     *  ============================= UART begin ===================================
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(UART_config, ".const:UART_config")
    #pragma DATA_SECTION(uartCC26XXHWAttrs, ".const:uartCC26XXHWAttrs")
    #endif
    
    /* Include drivers */
    #include <ti/drivers/UART.h>
    #include <ti/drivers/uart/UARTCC26XX.h>
    
    /* UART objects */
    UARTCC26XX_Object uartCC26XXObjects[CC2650_LAUNCHXL_UARTCOUNT];
    unsigned char uartCC26XXRingBuffer[CC2650_LAUNCHXL_UARTCOUNT][32];
    
    /* UART hardware parameter structure, also used to assign UART pins */
    const UARTCC26XX_HWAttrsV2 uartCC26XXHWAttrs[CC2650_LAUNCHXL_UARTCOUNT] = {
        {
            .baseAddr       = UART0_BASE,
            .powerMngrId    = PowerCC26XX_PERIPH_UART0,
            .intNum         = INT_UART0_COMB,
            .intPriority    = ~0,
            .swiPriority    = 0,
            .txPin          = Board_UART_TX,
            .rxPin          = Board_UART_RX,
            .ctsPin         = PIN_UNASSIGNED,
            .rtsPin         = PIN_UNASSIGNED,
            .ringBufPtr     = uartCC26XXRingBuffer[0],
            .ringBufSize    = sizeof(uartCC26XXRingBuffer[0])
        }
    };
    
    /* UART configuration structure */
    const UART_Config UART_config[] = {
        {
            .fxnTablePtr = &UARTCC26XX_fxnTable,
            .object      = &uartCC26XXObjects[0],
            .hwAttrs     = &uartCC26XXHWAttrs[0]
        },
        {NULL, NULL, NULL}
    };
    /*
     *  ============================= UART end =====================================
     */
    
    /*
     *  ============================= UDMA begin ===================================
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(UDMACC26XX_config, ".const:UDMACC26XX_config")
    #pragma DATA_SECTION(udmaHWAttrs, ".const:udmaHWAttrs")
    #endif
    
    /* Include drivers */
    #include <ti/drivers/dma/UDMACC26XX.h>
    
    /* UDMA objects */
    UDMACC26XX_Object udmaObjects[CC2650_LAUNCHXL_UDMACOUNT];
    
    /* UDMA configuration structure */
    const UDMACC26XX_HWAttrs udmaHWAttrs[CC2650_LAUNCHXL_UDMACOUNT] = {
        {
            .baseAddr    = UDMA0_BASE,
            .powerMngrId = PowerCC26XX_PERIPH_UDMA,
            .intNum      = INT_DMA_ERR,
            .intPriority = ~0
        }
    };
    
    /* UDMA configuration structure */
    const UDMACC26XX_Config UDMACC26XX_config[] = {
        {
             .object  = &udmaObjects[0],
             .hwAttrs = &udmaHWAttrs[0]
        },
        {NULL, NULL}
    };
    /*
     *  ============================= UDMA end =====================================
     */
    
    /*
     *  ========================== SPI DMA begin ===================================
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(SPI_config, ".const:SPI_config")
    #pragma DATA_SECTION(spiCC26XXDMAHWAttrs, ".const:spiCC26XXDMAHWAttrs")
    #endif
    
    /* Include drivers */
    #include <ti/drivers/spi/SPICC26XXDMA.h>
    
    /* SPI objects */
    SPICC26XXDMA_Object spiCC26XXDMAObjects[CC2650_LAUNCHXL_SPICOUNT];
    
    /* SPI configuration structure, describing which pins are to be used */
    const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[CC2650_LAUNCHXL_SPICOUNT] = {
        {
            .baseAddr           = SSI0_BASE,
            .intNum             = INT_SSI0_COMB,
            .intPriority        = ~0,
            .swiPriority        = 0,
            .powerMngrId        = PowerCC26XX_PERIPH_SSI0,
            .defaultTxBufValue  = 0,
            .rxChannelBitMask   = 1<<UDMA_CHAN_SSI0_RX,
            .txChannelBitMask   = 1<<UDMA_CHAN_SSI0_TX,
            .mosiPin            = Board_SPI0_MOSI,
            .misoPin            = Board_SPI0_MISO,
            .clkPin             = Board_SPI0_CLK,
            .csnPin             = Board_SPI0_CSN
        },
        {
            .baseAddr           = SSI1_BASE,
            .intNum             = INT_SSI1_COMB,
            .intPriority        = ~0,
            .swiPriority        = 0,
            .powerMngrId        = PowerCC26XX_PERIPH_SSI1,
            .defaultTxBufValue  = 0,
            .rxChannelBitMask   = 1<<UDMA_CHAN_SSI1_RX,
            .txChannelBitMask   = 1<<UDMA_CHAN_SSI1_TX,
            .mosiPin            = Board_SPI1_MOSI,
            .misoPin            = Board_SPI1_MISO,
            .clkPin             = Board_SPI1_CLK,
            .csnPin             = Board_SPI1_CSN
        }
    };
    
    /* SPI configuration structure */
    const SPI_Config SPI_config[] = {
        {
             .fxnTablePtr = &SPICC26XXDMA_fxnTable,
             .object      = &spiCC26XXDMAObjects[0],
             .hwAttrs     = &spiCC26XXDMAHWAttrs[0]
        },
        {
             .fxnTablePtr = &SPICC26XXDMA_fxnTable,
             .object      = &spiCC26XXDMAObjects[1],
             .hwAttrs     = &spiCC26XXDMAHWAttrs[1]
        },
        {NULL, NULL, NULL}
    };
    /*
     *  ========================== SPI DMA end =====================================
    */
    
    
    /*
     *  ============================= I2C Begin=====================================
    */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(I2C_config, ".const:I2C_config")
    #pragma DATA_SECTION(i2cCC26xxHWAttrs, ".const:i2cCC26xxHWAttrs")
    #endif
    
    /* Include drivers */
    #include <ti/drivers/i2c/I2CCC26XX.h>
    
    /* I2C objects */
    I2CCC26XX_Object i2cCC26xxObjects[CC2650_LAUNCHXL_I2CCOUNT];
    
    /* I2C configuration structure, describing which pins are to be used */
    const I2CCC26XX_HWAttrsV1 i2cCC26xxHWAttrs[CC2650_LAUNCHXL_I2CCOUNT] = {
        {
            .baseAddr = I2C0_BASE,
            .powerMngrId = PowerCC26XX_PERIPH_I2C0,
            .intNum = INT_I2C_IRQ,
            .intPriority = ~0,
            .swiPriority = 0,
            .sdaPin = Board_I2C0_SDA0,
            .sclPin = Board_I2C0_SCL0,
        }
    };
    
    /* I2C configuration structure */
    const I2C_Config I2C_config[] = {
        {
            .fxnTablePtr = &I2CCC26XX_fxnTable,
            .object = &i2cCC26xxObjects[0],
            .hwAttrs = &i2cCC26xxHWAttrs[0]
        },
        {NULL, NULL, NULL}
    };
    /*
     *  ========================== I2C end =========================================
     */
    
    /*
     *  ========================== Crypto begin ====================================
     *  NOTE: The Crypto implementation should be considered experimental
     *        and not validated!
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(CryptoCC26XX_config, ".const:CryptoCC26XX_config")
    #pragma DATA_SECTION(cryptoCC26XXHWAttrs, ".const:cryptoCC26XXHWAttrs")
    #endif
    
    /* Include drivers */
    #include <ti/drivers/crypto/CryptoCC26XX.h>
    
    /* Crypto objects */
    CryptoCC26XX_Object cryptoCC26XXObjects[CC2650_LAUNCHXL_CRYPTOCOUNT];
    
    /* Crypto configuration structure, describing which pins are to be used */
    const CryptoCC26XX_HWAttrs cryptoCC26XXHWAttrs[CC2650_LAUNCHXL_CRYPTOCOUNT] = {
        {
            .baseAddr       = CRYPTO_BASE,
            .powerMngrId    = PowerCC26XX_PERIPH_CRYPTO,
            .intNum         = INT_CRYPTO_RESULT_AVAIL_IRQ,
            .intPriority    = ~0,
        }
    };
    
    /* Crypto configuration structure */
    const CryptoCC26XX_Config CryptoCC26XX_config[] = {
        {
             .object  = &cryptoCC26XXObjects[0],
             .hwAttrs = &cryptoCC26XXHWAttrs[0]
        },
        {NULL, NULL}
    };
    /*
     *  ========================== Crypto end ======================================
     */
    
    
    /*
     *  ========================= RF driver begin ==================================
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(RFCC26XX_hwAttrs, ".const:RFCC26XX_hwAttrs")
    #endif
    
    /* Include drivers */
    #include <ti/drivers/rf/RF.h>
    
    /* RF hwi and swi priority */
    const RFCC26XX_HWAttrs RFCC26XX_hwAttrs = {
        .hwiCpe0Priority = ~0,
        .hwiHwPriority   = ~0,
        .swiCpe0Priority =  0,
        .swiHwPriority   =  0,
    };
    
    /*
     *  ========================== RF driver end ===================================
     */
    
    /*
     *  ========================= Display begin ====================================
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(Display_config, ".const:Display_config")
    #pragma DATA_SECTION(displaySharpHWattrs, ".const:displaySharpHWattrs")
    #pragma DATA_SECTION(displayUartHWAttrs, ".const:displayUartHWAttrs")
    #endif
    
    #include <ti/mw/display/Display.h>
    #include <ti/mw/display/DisplaySharp.h>
    #include <ti/mw/display/DisplayUart.h>
    
    /* Structures for UartPlain Blocking */
    DisplayUart_Object        displayUartObject;
    
    #ifndef BOARD_DISPLAY_UART_STRBUF_SIZE
    #define BOARD_DISPLAY_UART_STRBUF_SIZE    128
    #endif
    static char uartStringBuf[BOARD_DISPLAY_UART_STRBUF_SIZE];
    
    const DisplayUart_HWAttrs displayUartHWAttrs = {
        .uartIdx      = Board_UART,
        .baudRate     =     115200,
        .mutexTimeout = BIOS_WAIT_FOREVER,
        .strBuf = uartStringBuf,
        .strBufLen = BOARD_DISPLAY_UART_STRBUF_SIZE,
    };
    
    /* Structures for SHARP */
    DisplaySharp_Object displaySharpObject;
    
    #ifndef BOARD_DISPLAY_SHARP_SIZE
    #define BOARD_DISPLAY_SHARP_SIZE    96 // 96->96x96 is the most common board, alternative is 128->128x128.
    #endif
    static uint8_t sharpDisplayBuf[BOARD_DISPLAY_SHARP_SIZE * BOARD_DISPLAY_SHARP_SIZE / 8];
    
    const DisplaySharp_HWAttrs displaySharpHWattrs = {
        .spiIndex    = Board_SPI0,
        .csPin       = Board_LCD_CS,
        .extcominPin = Board_LCD_EXTCOMIN,
        .powerPin    = Board_LCD_POWER,
        .enablePin   = Board_LCD_ENABLE,
        .pixelWidth  = BOARD_DISPLAY_SHARP_SIZE,
        .pixelHeight = BOARD_DISPLAY_SHARP_SIZE,
        .displayBuf  = sharpDisplayBuf,
    };
    
    /* Array of displays */
    const Display_Config Display_config[] = {
    #if !defined(BOARD_DISPLAY_EXCLUDE_UART)
        {
            .fxnTablePtr = &DisplayUart_fxnTable,
            .object      = &displayUartObject,
            .hwAttrs     = &displayUartHWAttrs,
        },
    #endif
    #if !defined(BOARD_DISPLAY_EXCLUDE_LCD)
        {
            .fxnTablePtr = &DisplaySharp_fxnTable,
            .object      = &displaySharpObject,
            .hwAttrs     = &displaySharpHWattrs
        },
    #endif
        { NULL, NULL, NULL } // Terminator
    };
    
    /*
     *  ========================= Display end ======================================
     */
    
    /*
     *  ============================ GPTimer begin =================================
     *  Remove unused entries to reduce flash usage both in Board.c and Board.h
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(GPTimerCC26XX_config, ".const:GPTimerCC26XX_config")
    #pragma DATA_SECTION(gptimerCC26xxHWAttrs, ".const:gptimerCC26xxHWAttrs")
    #endif
    
    /* GPTimer hardware attributes, one per timer part (Timer 0A, 0B, 1A, 1B..) */
    const GPTimerCC26XX_HWAttrs gptimerCC26xxHWAttrs[CC2650_LAUNCHXL_GPTIMERPARTSCOUNT] = {
        { .baseAddr = GPT0_BASE, .intNum = INT_GPT0A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0A, },
        { .baseAddr = GPT0_BASE, .intNum = INT_GPT0B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0B, },
        { .baseAddr = GPT1_BASE, .intNum = INT_GPT1A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1A, },
        { .baseAddr = GPT1_BASE, .intNum = INT_GPT1B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1B, },
        { .baseAddr = GPT2_BASE, .intNum = INT_GPT2A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2A, },
        { .baseAddr = GPT2_BASE, .intNum = INT_GPT2B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2B, },
        { .baseAddr = GPT3_BASE, .intNum = INT_GPT3A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3A, },
        { .baseAddr = GPT3_BASE, .intNum = INT_GPT3B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3B, },
    };
    
    /*  GPTimer objects, one per full-width timer (A+B) (Timer 0, Timer 1..) */
    GPTimerCC26XX_Object gptimerCC26XXObjects[CC2650_LAUNCHXL_GPTIMERCOUNT];
    
    /* GPTimer configuration (used as GPTimer_Handle by driver and application) */
    const GPTimerCC26XX_Config GPTimerCC26XX_config[CC2650_LAUNCHXL_GPTIMERPARTSCOUNT] = {
        { &gptimerCC26XXObjects[0], &gptimerCC26xxHWAttrs[0], GPT_A },
        { &gptimerCC26XXObjects[0], &gptimerCC26xxHWAttrs[1], GPT_B },
        { &gptimerCC26XXObjects[1], &gptimerCC26xxHWAttrs[2], GPT_A },
        { &gptimerCC26XXObjects[1], &gptimerCC26xxHWAttrs[3], GPT_B },
        { &gptimerCC26XXObjects[2], &gptimerCC26xxHWAttrs[4], GPT_A },
        { &gptimerCC26XXObjects[2], &gptimerCC26xxHWAttrs[5], GPT_B },
        { &gptimerCC26XXObjects[3], &gptimerCC26xxHWAttrs[6], GPT_A },
        { &gptimerCC26XXObjects[3], &gptimerCC26xxHWAttrs[7], GPT_B },
    };
    
    /*
     *  ============================ GPTimer end ===================================
     */
    
    
    
    /*
     *  ============================= PWM begin ====================================
     *  Remove unused entries to reduce flash usage both in Board.c and Board.h
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(PWM_config, ".const:PWM_config")
    #pragma DATA_SECTION(pwmtimerCC26xxHWAttrs, ".const:pwmtimerCC26xxHWAttrs")
    #endif
    
    /* PWM configuration, one per PWM output.   */
    PWMTimerCC26XX_HwAttrs pwmtimerCC26xxHWAttrs[CC2650_LAUNCHXL_PWMCOUNT] = {
        { .pwmPin = Board_PWMPIN0, .gpTimerUnit = Board_GPTIMER0A },
        { .pwmPin = Board_PWMPIN1, .gpTimerUnit = Board_GPTIMER0B },
        { .pwmPin = Board_PWMPIN2, .gpTimerUnit = Board_GPTIMER1A },
        { .pwmPin = Board_PWMPIN3, .gpTimerUnit = Board_GPTIMER1B },
        { .pwmPin = Board_PWMPIN4, .gpTimerUnit = Board_GPTIMER2A },
        { .pwmPin = Board_PWMPIN5, .gpTimerUnit = Board_GPTIMER2B },
        { .pwmPin = Board_PWMPIN6, .gpTimerUnit = Board_GPTIMER3A },
        { .pwmPin = Board_PWMPIN7, .gpTimerUnit = Board_GPTIMER3B },
    };
    
    /* PWM object, one per PWM output */
    PWMTimerCC26XX_Object pwmtimerCC26xxObjects[CC2650_LAUNCHXL_PWMCOUNT];
    
    extern const PWM_FxnTable PWMTimerCC26XX_fxnTable;
    
    /* PWM configuration (used as PWM_Handle by driver and application) */
    const PWM_Config PWM_config[CC2650_LAUNCHXL_PWMCOUNT + 1] = {
        { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[0], &pwmtimerCC26xxHWAttrs[0] },
        { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[1], &pwmtimerCC26xxHWAttrs[1] },
        { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[2], &pwmtimerCC26xxHWAttrs[2] },
        { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[3], &pwmtimerCC26xxHWAttrs[3] },
        { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[4], &pwmtimerCC26xxHWAttrs[4] },
        { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[5], &pwmtimerCC26xxHWAttrs[5] },
        { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[6], &pwmtimerCC26xxHWAttrs[6] },
        { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[7], &pwmtimerCC26xxHWAttrs[7] },
        { NULL,                NULL,                 NULL                 }
    };
    
    
    /*
     *  ============================= PWM end ======================================
     */
    
    /*
     *  ========================== ADCBuf begin =========================================
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(ADCBuf_config, ".const:ADCBuf_config")
    #pragma DATA_SECTION(adcBufCC26xxHWAttrs, ".const:adcBufCC26xxHWAttrs")
    #pragma DATA_SECTION(ADCBufCC26XX_adcChannelLut, ".const:ADCBufCC26XX_adcChannelLut")
    #endif
    
    /* Include drivers */
    #include <ti/drivers/ADCBuf.h>
    #include <ti/drivers/adcbuf/ADCBufCC26XX.h>
    
    /* ADCBuf objects */
    ADCBufCC26XX_Object adcBufCC26xxObjects[CC2650_LAUNCHXL_ADCBufCOUNT];
    
    /*
     *  This table converts a virtual adc channel into a dio and internal analogue input signal.
     *  This table is necessary for the functioning of the adcBuf driver.
     *  Comment out unused entries to save flash.
     *  Dio and internal signal pairs are hardwired. Do not remap them in the table. You may reorder entire entries though.
     *  The mapping of dio and internal signals is package dependent.
     */
    const ADCBufCC26XX_AdcChannelLutEntry ADCBufCC26XX_adcChannelLut[] = {
        {PIN_UNASSIGNED, ADC_COMPB_IN_VDDS},
        {PIN_UNASSIGNED, ADC_COMPB_IN_DCOUPL},
        {PIN_UNASSIGNED, ADC_COMPB_IN_VSS},
        {Board_DIO23_ANALOG, ADC_COMPB_IN_AUXIO7},
        {Board_DIO24_ANALOG, ADC_COMPB_IN_AUXIO6},
        {Board_DIO25_ANALOG, ADC_COMPB_IN_AUXIO5},
        {Board_DIO26_ANALOG, ADC_COMPB_IN_AUXIO4},
        {Board_DIO27_ANALOG, ADC_COMPB_IN_AUXIO3},
        {Board_DIO28_ANALOG, ADC_COMPB_IN_AUXIO2},
        {Board_DIO29_ANALOG, ADC_COMPB_IN_AUXIO1},
        {Board_DIO30_ANALOG, ADC_COMPB_IN_AUXIO0},
    };
    
    const ADCBufCC26XX_HWAttrs adcBufCC26xxHWAttrs[CC2650_LAUNCHXL_ADCBufCOUNT] = {
        {
            .intPriority = ~0,
            .swiPriority = 0,
            .adcChannelLut = ADCBufCC26XX_adcChannelLut,
            .gpTimerUnit = Board_GPTIMER0A,
            .gptDMAChannelMask = 1 << UDMA_CHAN_TIMER0_A,
        }
    };
    
    const ADCBuf_Config ADCBuf_config[] = {
        {&ADCBufCC26XX_fxnTable, &adcBufCC26xxObjects[0], &adcBufCC26xxHWAttrs[0]},
        {NULL, NULL, NULL},
    };
    /*
     *  ========================== ADCBuf end =========================================
     */
    
    
    
    /*
     *  ========================== ADC begin =========================================
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(ADC_config, ".const:ADC_config")
    #pragma DATA_SECTION(adcCC26xxHWAttrs, ".const:adcCC26xxHWAttrs")
    #endif
    
    /* Include drivers */
    #include <ti/drivers/ADC.h>
    #include <ti/drivers/adc/ADCCC26XX.h>
    
    /* ADC objects */
    ADCCC26XX_Object adcCC26xxObjects[CC2650_LAUNCHXL_ADCCOUNT];
    
    
    const ADCCC26XX_HWAttrs adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADCCOUNT] = {
        {
            .adcDIO = Board_DIO23_ANALOG,
            .adcCompBInput = ADC_COMPB_IN_AUXIO7,
            .refSource = ADCCC26XX_FIXED_REFERENCE,
            .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
            .inputScalingEnabled = true,
            .triggerSource = ADCCC26XX_TRIGGER_MANUAL
        },
        {
            .adcDIO = Board_DIO24_ANALOG,
            .adcCompBInput = ADC_COMPB_IN_AUXIO6,
            .refSource = ADCCC26XX_FIXED_REFERENCE,
            .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
            .inputScalingEnabled = true,
            .triggerSource = ADCCC26XX_TRIGGER_MANUAL
        },
        {
            .adcDIO = Board_DIO25_ANALOG,
            .adcCompBInput = ADC_COMPB_IN_AUXIO5,
            .refSource = ADCCC26XX_FIXED_REFERENCE,
            .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
            .inputScalingEnabled = true,
            .triggerSource = ADCCC26XX_TRIGGER_MANUAL
        },
        {
            .adcDIO = Board_DIO26_ANALOG,
            .adcCompBInput = ADC_COMPB_IN_AUXIO4,
            .refSource = ADCCC26XX_FIXED_REFERENCE,
            .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
            .inputScalingEnabled = true,
            .triggerSource = ADCCC26XX_TRIGGER_MANUAL
        },
        {
            .adcDIO = Board_DIO27_ANALOG,
            .adcCompBInput = ADC_COMPB_IN_AUXIO3,
            .refSource = ADCCC26XX_FIXED_REFERENCE,
            .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
            .inputScalingEnabled = true,
            .triggerSource = ADCCC26XX_TRIGGER_MANUAL
        },
        {
            .adcDIO = Board_DIO28_ANALOG,
            .adcCompBInput = ADC_COMPB_IN_AUXIO2,
            .refSource = ADCCC26XX_FIXED_REFERENCE,
            .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
            .inputScalingEnabled = true,
            .triggerSource = ADCCC26XX_TRIGGER_MANUAL
        },
        {
            .adcDIO = Board_DIO29_ANALOG,
            .adcCompBInput = ADC_COMPB_IN_AUXIO1,
            .refSource = ADCCC26XX_FIXED_REFERENCE,
            .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
            .inputScalingEnabled = true,
            .triggerSource = ADCCC26XX_TRIGGER_MANUAL
        },
        {
            .adcDIO = Board_DIO30_ANALOG,
            .adcCompBInput = ADC_COMPB_IN_AUXIO0,
            .refSource = ADCCC26XX_FIXED_REFERENCE,
            .samplingDuration = ADCCC26XX_SAMPLING_DURATION_10P9_MS,
            .inputScalingEnabled = true,
            .triggerSource = ADCCC26XX_TRIGGER_MANUAL
        },
        {
            .adcDIO = PIN_UNASSIGNED,
            .adcCompBInput = ADC_COMPB_IN_DCOUPL,
            .refSource = ADCCC26XX_FIXED_REFERENCE,
            .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
            .inputScalingEnabled = true,
            .triggerSource = ADCCC26XX_TRIGGER_MANUAL
        },
        {
            .adcDIO = PIN_UNASSIGNED,
            .adcCompBInput = ADC_COMPB_IN_VSS,
            .refSource = ADCCC26XX_FIXED_REFERENCE,
            .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
            .inputScalingEnabled = true,
            .triggerSource = ADCCC26XX_TRIGGER_MANUAL
        },
        {
            .adcDIO = PIN_UNASSIGNED,
            .adcCompBInput = ADC_COMPB_IN_VDDS,
            .refSource = ADCCC26XX_FIXED_REFERENCE,
            .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
            .inputScalingEnabled = true,
            .triggerSource = ADCCC26XX_TRIGGER_MANUAL
        }
    };
    
    const ADC_Config ADC_config[] = {
        {&ADCCC26XX_fxnTable, &adcCC26xxObjects[0], &adcCC26xxHWAttrs[0]},
        {&ADCCC26XX_fxnTable, &adcCC26xxObjects[1], &adcCC26xxHWAttrs[1]},
        {&ADCCC26XX_fxnTable, &adcCC26xxObjects[2], &adcCC26xxHWAttrs[2]},
        {&ADCCC26XX_fxnTable, &adcCC26xxObjects[3], &adcCC26xxHWAttrs[3]},
        {&ADCCC26XX_fxnTable, &adcCC26xxObjects[4], &adcCC26xxHWAttrs[4]},
        {&ADCCC26XX_fxnTable, &adcCC26xxObjects[5], &adcCC26xxHWAttrs[5]},
        {&ADCCC26XX_fxnTable, &adcCC26xxObjects[6], &adcCC26xxHWAttrs[6]},
        {&ADCCC26XX_fxnTable, &adcCC26xxObjects[7], &adcCC26xxHWAttrs[7]},
        {&ADCCC26XX_fxnTable, &adcCC26xxObjects[8], &adcCC26xxHWAttrs[8]},
        {&ADCCC26XX_fxnTable, &adcCC26xxObjects[9], &adcCC26xxHWAttrs[9]},
        {&ADCCC26XX_fxnTable, &adcCC26xxObjects[10], &adcCC26xxHWAttrs[10]},
        {NULL, NULL, NULL},
    };
    
    /*
     *  ========================== ADC end =========================================
     */
    
    /*
     *  =============================== Watchdog ===============================
     */
    /* Place into subsections to allow the TI linker to remove items properly */
    #if defined(__TI_COMPILER_VERSION__)
    #pragma DATA_SECTION(Watchdog_config, ".const:Watchdog_config")
    #pragma DATA_SECTION(watchdogCC26XXHWAttrs, ".const:watchdogCC26XXHWAttrs")
    #endif
    
    #include <ti/drivers/Watchdog.h>
    #include <ti/drivers/watchdog/WatchdogCC26XX.h>
    
    WatchdogCC26XX_Object watchdogCC26XXObjects[CC2650_LAUNCHXL_WATCHDOGCOUNT];
    
    const WatchdogCC26XX_HWAttrs watchdogCC26XXHWAttrs[CC2650_LAUNCHXL_WATCHDOGCOUNT] = {
        {
            .baseAddr = WDT_BASE,
            .intNum = INT_WDT_IRQ,
            .reloadValue = 1000 /* Reload value in milliseconds */
        },
    };
    
    const Watchdog_Config Watchdog_config[] = {
        {
            .fxnTablePtr = &WatchdogCC26XX_fxnTable,
            .object = &watchdogCC26XXObjects[0],
            .hwAttrs = &watchdogCC26XXHWAttrs[0]
        },
        {NULL, NULL, NULL},
    };
    
    /*
     *  ======== CC26XX_LAUNCHXL_initWatchdog ========
     */
    void CC26XX_LAUNCHXL_initWatchdog(void)
    {
        Watchdog_init();
    }
    

    CC2650_LAUNCHXL.h

    /** ============================================================================
     *  @file       CC2650_LAUNCHXL.h
     *
     *  @brief      CC2650 LaunchPad Board Specific header file.
     *
     *  NB! This is the board file for CC2650 LaunchPad PCB version 1.1
     *
     *  ============================================================================
     */
    #ifndef __CC2650_LAUNCHXL_BOARD_H__
    #define __CC2650_LAUNCHXL_BOARD_H__
    
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    /** ============================================================================
     *  Includes
     *  ==========================================================================*/
    #include <ti/drivers/PIN.h>
    #include <driverlib/ioc.h>
    
    /** ============================================================================
     *  Externs
     *  ==========================================================================*/
    extern const PIN_Config BoardGpioInitTable[];
    
    /** ============================================================================
     *  Defines
     *  ==========================================================================*/
    
    /* Same RF Configuration as 7x7 EM */
    #define CC2650EM_7ID
    #define CC2650_LAUNCHXL
    
    /* Mapping of pins to board signals using general board aliases
     *      <board signal alias>        <pin mapping>
     */
    
    /* Discrete outputs */
    #define Board_RLED                  IOID_6
    #define Board_GLED                  IOID_7
    #define Board_LED_ON                1
    #define Board_LED_OFF               0
    
    /* Discrete inputs */
    #define Board_BTN1                  IOID_13
    #define Board_BTN2                  IOID_14
    
    /* UART Board */
    #define Board_UART_RX               IOID_2          /* RXD  */
    #define Board_UART_TX               IOID_3          /* TXD  */
    #define Board_UART_CTS              IOID_19         /* CTS  */
    #define Board_UART_RTS              IOID_18         /* RTS */
    
    /* SPI Board */
    #define Board_SPI0_MISO             IOID_8          /* RF1.20 */
    #define Board_SPI0_MOSI             IOID_9          /* RF1.18 */
    #define Board_SPI0_CLK              IOID_10         /* RF1.16 */
    #define Board_SPI0_CSN              PIN_UNASSIGNED
    #define Board_SPI1_MISO             PIN_UNASSIGNED
    #define Board_SPI1_MOSI             PIN_UNASSIGNED
    #define Board_SPI1_CLK              PIN_UNASSIGNED
    #define Board_SPI1_CSN              PIN_UNASSIGNED
    
    /* I2C */
    #define Board_I2C0_SCL0             IOID_4
    #define Board_I2C0_SDA0             IOID_5
    
    /* SPI */
    #define Board_SPI_FLASH_CS          IOID_20
    #define Board_FLASH_CS_ON           0
    #define Board_FLASH_CS_OFF          1
    
    /* Booster pack generic */
    #define Board_DIO0                  IOID_0
    #define Board_DIO1_RFSW             IOID_1
    #define Board_DIO12                 IOID_12
    #define Board_DIO15                 IOID_15
    #define Board_DIO16_TDO             IOID_16
    #define Board_DIO17_TDI             IOID_17
    #define Board_DIO21                 IOID_21
    #define Board_DIO22                 IOID_22
    
    #define Board_DIO23_ANALOG          IOID_23
    #define Board_DIO24_ANALOG          IOID_24
    #define Board_DIO25_ANALOG          IOID_25
    #define Board_DIO26_ANALOG          IOID_26
    #define Board_DIO27_ANALOG          IOID_27
    #define Board_DIO28_ANALOG          IOID_28
    #define Board_DIO29_ANALOG          IOID_29
    #define Board_DIO30_ANALOG          IOID_30
    
    /* Booster pack LCD (430BOOST - Sharp96 Rev 1.1) */
    #define Board_LCD_CS                IOID_24 // SPI chip select
    #define Board_LCD_EXTCOMIN          IOID_12 // External COM inversion
    #define Board_LCD_ENABLE            IOID_22 // LCD enable
    #define Board_LCD_POWER             IOID_23 // LCD power control
    #define Board_LCD_CS_ON             1
    #define Board_LCD_CS_OFF            0
    
    /* PWM outputs */
    #define Board_PWMPIN0                       Board_RLED
    #define Board_PWMPIN1                       Board_GLED
    #define Board_PWMPIN2                       PIN_UNASSIGNED
    #define Board_PWMPIN3                       PIN_UNASSIGNED
    #define Board_PWMPIN4                       PIN_UNASSIGNED
    #define Board_PWMPIN5                       PIN_UNASSIGNED
    #define Board_PWMPIN6                       PIN_UNASSIGNED
    #define Board_PWMPIN7                       PIN_UNASSIGNED
    
    /** ============================================================================
     *  Instance identifiers
     *  ==========================================================================*/
    /* Generic I2C instance identifiers */
    #define Board_I2C                   CC2650_LAUNCHXL_I2C0
    /* Generic SPI instance identifiers */
    #define Board_SPI0                  CC2650_LAUNCHXL_SPI0
    #define Board_SPI1                  CC2650_LAUNCHXL_SPI1
    /* Generic UART instance identifiers */
    #define Board_UART                  CC2650_LAUNCHXL_UART0
    /* Generic Crypto instance identifiers */
    #define Board_CRYPTO                CC2650_LAUNCHXL_CRYPTO0
    /* Generic GPTimer instance identifiers */
    #define Board_GPTIMER0A             CC2650_LAUNCHXL_GPTIMER0A
    #define Board_GPTIMER0B             CC2650_LAUNCHXL_GPTIMER0B
    #define Board_GPTIMER1A             CC2650_LAUNCHXL_GPTIMER1A
    #define Board_GPTIMER1B             CC2650_LAUNCHXL_GPTIMER1B
    #define Board_GPTIMER2A             CC2650_LAUNCHXL_GPTIMER2A
    #define Board_GPTIMER2B             CC2650_LAUNCHXL_GPTIMER2B
    #define Board_GPTIMER3A             CC2650_LAUNCHXL_GPTIMER3A
    #define Board_GPTIMER3B             CC2650_LAUNCHXL_GPTIMER3B
    /* Generic PWM instance identifiers */
    #define Board_PWM0                  CC2650_LAUNCHXL_PWM0
    #define Board_PWM1                  CC2650_LAUNCHXL_PWM1
    #define Board_PWM2                  CC2650_LAUNCHXL_PWM2
    #define Board_PWM3                  CC2650_LAUNCHXL_PWM3
    #define Board_PWM4                  CC2650_LAUNCHXL_PWM4
    #define Board_PWM5                  CC2650_LAUNCHXL_PWM5
    #define Board_PWM6                  CC2650_LAUNCHXL_PWM6
    #define Board_PWM7                  CC2650_LAUNCHXL_PWM7
    
    /** ============================================================================
     *  Number of peripherals and their names
     *  ==========================================================================*/
    
    /*!
     *  @def    CC2650_LAUNCHXL_I2CName
     *  @brief  Enum of I2C names on the CC2650 dev board
     */
    typedef enum CC2650_LAUNCHXL_I2CName {
        CC2650_LAUNCHXL_I2C0 = 0,
    
        CC2650_LAUNCHXL_I2CCOUNT
    } CC2650_LAUNCHXL_I2CName;
    
    /*!
     *  @def    CC2650_LAUNCHXL_CryptoName
     *  @brief  Enum of Crypto names on the CC2650 dev board
     */
    typedef enum CC2650_LAUNCHXL_CryptoName {
        CC2650_LAUNCHXL_CRYPTO0 = 0,
    
        CC2650_LAUNCHXL_CRYPTOCOUNT
    } CC2650_LAUNCHXL_CryptoName;
    
    
    /*!
     *  @def    CC2650_LAUNCHXL_SPIName
     *  @brief  Enum of SPI names on the CC2650 dev board
     */
    typedef enum CC2650_LAUNCHXL_SPIName {
        CC2650_LAUNCHXL_SPI0 = 0,
        CC2650_LAUNCHXL_SPI1,
    
        CC2650_LAUNCHXL_SPICOUNT
    } CC2650_LAUNCHXL_SPIName;
    
    /*!
     *  @def    CC2650_LAUNCHXL_UARTName
     *  @brief  Enum of UARTs on the CC2650 dev board
     */
    typedef enum CC2650_LAUNCHXL_UARTName {
        CC2650_LAUNCHXL_UART0 = 0,
    
        CC2650_LAUNCHXL_UARTCOUNT
    } CC2650_LAUNCHXL_UARTName;
    
    /*!
     *  @def    CC2650_LAUNCHXL_UdmaName
     *  @brief  Enum of DMA buffers
     */
    typedef enum CC2650_LAUNCHXL_UdmaName {
        CC2650_LAUNCHXL_UDMA0 = 0,
    
        CC2650_LAUNCHXL_UDMACOUNT
    } CC2650_LAUNCHXL_UdmaName;
    
    /*!
     *  @def    CC2650_LAUNCHXL_GPTimerName
     *  @brief  Enum of GPTimer parts
     */
    typedef enum CC2650_LAUNCHXL_GPTimerName
    {
        CC2650_LAUNCHXL_GPTIMER0A = 0,
        CC2650_LAUNCHXL_GPTIMER0B,
        CC2650_LAUNCHXL_GPTIMER1A,
        CC2650_LAUNCHXL_GPTIMER1B,
        CC2650_LAUNCHXL_GPTIMER2A,
        CC2650_LAUNCHXL_GPTIMER2B,
        CC2650_LAUNCHXL_GPTIMER3A,
        CC2650_LAUNCHXL_GPTIMER3B,
        CC2650_LAUNCHXL_GPTIMERPARTSCOUNT
    } CC2650_LAUNCHXL_GPTimerName;
    
    /*!
     *  @def    CC2650_LAUNCHXL_GPTimers
     *  @brief  Enum of GPTimers
     */
    typedef enum CC2650_LAUNCHXL_GPTimers
    {
        CC2650_LAUNCHXL_GPTIMER0 = 0,
        CC2650_LAUNCHXL_GPTIMER1,
        CC2650_LAUNCHXL_GPTIMER2,
        CC2650_LAUNCHXL_GPTIMER3,
        CC2650_LAUNCHXL_GPTIMERCOUNT
    } CC2650_LAUNCHXL_GPTimers;
    
    /*!
     *  @def    CC2650_LAUNCHXL_PWM
     *  @brief  Enum of PWM outputs on the board
     */
    typedef enum CC2650_LAUNCHXL_PWM
    {
        CC2650_LAUNCHXL_PWM0 = 0,
        CC2650_LAUNCHXL_PWM1,
        CC2650_LAUNCHXL_PWM2,
        CC2650_LAUNCHXL_PWM3,
        CC2650_LAUNCHXL_PWM4,
        CC2650_LAUNCHXL_PWM5,
        CC2650_LAUNCHXL_PWM6,
        CC2650_LAUNCHXL_PWM7,
        CC2650_LAUNCHXL_PWMCOUNT
    } CC2650_LAUNCHXL_PWM;
    
    /*!
     *  @def    CC2650_LAUNCHXL_ADCBufName
     *  @brief  Enum of ADCs
     */
    typedef enum CC2650_LAUNCHXL_ADCBufName {
        CC2650_LAUNCHXL_ADCBuf0 = 0,
        CC2650_LAUNCHXL_ADCBufCOUNT
    } CC2650_LAUNCHXL_ADCBufName;
    
    
    /*!
     *  @def    CC2650_LAUNCHXL_ADCName
     *  @brief  Enum of ADCs
     */
    typedef enum CC2650_LAUNCHXL_ADCName {
        CC2650_LAUNCHXL_ADC0 = 0,
        CC2650_LAUNCHXL_ADC1,
        CC2650_LAUNCHXL_ADC2,
        CC2650_LAUNCHXL_ADC3,
        CC2650_LAUNCHXL_ADC4,
        CC2650_LAUNCHXL_ADC5,
        CC2650_LAUNCHXL_ADC6,
        CC2650_LAUNCHXL_ADC7,
        CC2650_LAUNCHXL_ADCDCOUPL,
        CC2650_LAUNCHXL_ADCVSS,
        CC2650_LAUNCHXL_ADCVDDS,
        CC2650_LAUNCHXL_ADCCOUNT
    } CC2650_LAUNCHXL_ADCName;
    
    /*!
     *  @def    CC2650_LAUNCHXL_WatchdogName
     *  @brief  Enum of Watchdogs on the CC2650_LAUNCHXL dev board
     */
    typedef enum CC2650_LAUNCHXL_WatchdogName {
        CC2650_LAUNCHXL_WATCHDOG0 = 0,
    
        CC2650_LAUNCHXL_WATCHDOGCOUNT
    } CC2650_LAUNCHXL_WatchdogName;
    
    #ifdef __cplusplus
    }
    #endif
    
    #endif /* __CC2650_LAUNCHXL_BOARD_H__ */
    

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

    config.cfg (of empty projects, that works)

    /** ============================================================================
     *  @file       CC2650_LAUNCHXL.h
     *
     *  @brief      CC2650 LaunchPad Board Specific header file.
     *
     *  NB! This is the board file for CC2650 LaunchPad PCB version 1.1
     *
     *  ============================================================================
     */
    #ifndef __CC2650_LAUNCHXL_BOARD_H__
    #define __CC2650_LAUNCHXL_BOARD_H__
    
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    /** ============================================================================
     *  Includes
     *  ==========================================================================*/
    #include <ti/drivers/PIN.h>
    #include <driverlib/ioc.h>
    
    /** ============================================================================
     *  Externs
     *  ==========================================================================*/
    extern const PIN_Config BoardGpioInitTable[];
    
    /** ============================================================================
     *  Defines
     *  ==========================================================================*/
    
    /* Same RF Configuration as 7x7 EM */
    #define CC2650EM_7ID
    #define CC2650_LAUNCHXL
    
    /* Mapping of pins to board signals using general board aliases
     *      <board signal alias>        <pin mapping>
     */
    
    /* Discrete outputs */
    #define Board_RLED                  IOID_6
    #define Board_GLED                  IOID_7
    #define Board_LED_ON                1
    #define Board_LED_OFF               0
    
    /* Discrete inputs */
    #define Board_BTN1                  IOID_13
    #define Board_BTN2                  IOID_14
    
    /* UART Board */
    #define Board_UART_RX               IOID_2          /* RXD  */
    #define Board_UART_TX               IOID_3          /* TXD  */
    #define Board_UART_CTS              IOID_19         /* CTS  */
    #define Board_UART_RTS              IOID_18         /* RTS */
    
    /* SPI Board */
    #define Board_SPI0_MISO             IOID_8          /* RF1.20 */
    #define Board_SPI0_MOSI             IOID_9          /* RF1.18 */
    #define Board_SPI0_CLK              IOID_10         /* RF1.16 */
    #define Board_SPI0_CSN              PIN_UNASSIGNED
    #define Board_SPI1_MISO             PIN_UNASSIGNED
    #define Board_SPI1_MOSI             PIN_UNASSIGNED
    #define Board_SPI1_CLK              PIN_UNASSIGNED
    #define Board_SPI1_CSN              PIN_UNASSIGNED
    
    /* I2C */
    #define Board_I2C0_SCL0             IOID_4
    #define Board_I2C0_SDA0             IOID_5
    
    /* SPI */
    #define Board_SPI_FLASH_CS          IOID_20
    #define Board_FLASH_CS_ON           0
    #define Board_FLASH_CS_OFF          1
    
    /* Booster pack generic */
    #define Board_DIO0                  IOID_0
    #define Board_DIO1_RFSW             IOID_1
    #define Board_DIO12                 IOID_12
    #define Board_DIO15                 IOID_15
    #define Board_DIO16_TDO             IOID_16
    #define Board_DIO17_TDI             IOID_17
    #define Board_DIO21                 IOID_21
    #define Board_DIO22                 IOID_22
    
    #define Board_DIO23_ANALOG          IOID_23
    #define Board_DIO24_ANALOG          IOID_24
    #define Board_DIO25_ANALOG          IOID_25
    #define Board_DIO26_ANALOG          IOID_26
    #define Board_DIO27_ANALOG          IOID_27
    #define Board_DIO28_ANALOG          IOID_28
    #define Board_DIO29_ANALOG          IOID_29
    #define Board_DIO30_ANALOG          IOID_30
    
    /* Booster pack LCD (430BOOST - Sharp96 Rev 1.1) */
    #define Board_LCD_CS                IOID_24 // SPI chip select
    #define Board_LCD_EXTCOMIN          IOID_12 // External COM inversion
    #define Board_LCD_ENABLE            IOID_22 // LCD enable
    #define Board_LCD_POWER             IOID_23 // LCD power control
    #define Board_LCD_CS_ON             1
    #define Board_LCD_CS_OFF            0
    
    /* PWM outputs */
    #define Board_PWMPIN0                       Board_RLED
    #define Board_PWMPIN1                       Board_GLED
    #define Board_PWMPIN2                       PIN_UNASSIGNED
    #define Board_PWMPIN3                       PIN_UNASSIGNED
    #define Board_PWMPIN4                       PIN_UNASSIGNED
    #define Board_PWMPIN5                       PIN_UNASSIGNED
    #define Board_PWMPIN6                       PIN_UNASSIGNED
    #define Board_PWMPIN7                       PIN_UNASSIGNED
    
    /** ============================================================================
     *  Instance identifiers
     *  ==========================================================================*/
    /* Generic I2C instance identifiers */
    #define Board_I2C                   CC2650_LAUNCHXL_I2C0
    /* Generic SPI instance identifiers */
    #define Board_SPI0                  CC2650_LAUNCHXL_SPI0
    #define Board_SPI1                  CC2650_LAUNCHXL_SPI1
    /* Generic UART instance identifiers */
    #define Board_UART                  CC2650_LAUNCHXL_UART0
    /* Generic Crypto instance identifiers */
    #define Board_CRYPTO                CC2650_LAUNCHXL_CRYPTO0
    /* Generic GPTimer instance identifiers */
    #define Board_GPTIMER0A             CC2650_LAUNCHXL_GPTIMER0A
    #define Board_GPTIMER0B             CC2650_LAUNCHXL_GPTIMER0B
    #define Board_GPTIMER1A             CC2650_LAUNCHXL_GPTIMER1A
    #define Board_GPTIMER1B             CC2650_LAUNCHXL_GPTIMER1B
    #define Board_GPTIMER2A             CC2650_LAUNCHXL_GPTIMER2A
    #define Board_GPTIMER2B             CC2650_LAUNCHXL_GPTIMER2B
    #define Board_GPTIMER3A             CC2650_LAUNCHXL_GPTIMER3A
    #define Board_GPTIMER3B             CC2650_LAUNCHXL_GPTIMER3B
    /* Generic PWM instance identifiers */
    #define Board_PWM0                  CC2650_LAUNCHXL_PWM0
    #define Board_PWM1                  CC2650_LAUNCHXL_PWM1
    #define Board_PWM2                  CC2650_LAUNCHXL_PWM2
    #define Board_PWM3                  CC2650_LAUNCHXL_PWM3
    #define Board_PWM4                  CC2650_LAUNCHXL_PWM4
    #define Board_PWM5                  CC2650_LAUNCHXL_PWM5
    #define Board_PWM6                  CC2650_LAUNCHXL_PWM6
    #define Board_PWM7                  CC2650_LAUNCHXL_PWM7
    
    /** ============================================================================
     *  Number of peripherals and their names
     *  ==========================================================================*/
    
    /*!
     *  @def    CC2650_LAUNCHXL_I2CName
     *  @brief  Enum of I2C names on the CC2650 dev board
     */
    typedef enum CC2650_LAUNCHXL_I2CName {
        CC2650_LAUNCHXL_I2C0 = 0,
    
        CC2650_LAUNCHXL_I2CCOUNT
    } CC2650_LAUNCHXL_I2CName;
    
    /*!
     *  @def    CC2650_LAUNCHXL_CryptoName
     *  @brief  Enum of Crypto names on the CC2650 dev board
     */
    typedef enum CC2650_LAUNCHXL_CryptoName {
        CC2650_LAUNCHXL_CRYPTO0 = 0,
    
        CC2650_LAUNCHXL_CRYPTOCOUNT
    } CC2650_LAUNCHXL_CryptoName;
    
    
    /*!
     *  @def    CC2650_LAUNCHXL_SPIName
     *  @brief  Enum of SPI names on the CC2650 dev board
     */
    typedef enum CC2650_LAUNCHXL_SPIName {
        CC2650_LAUNCHXL_SPI0 = 0,
        CC2650_LAUNCHXL_SPI1,
    
        CC2650_LAUNCHXL_SPICOUNT
    } CC2650_LAUNCHXL_SPIName;
    
    /*!
     *  @def    CC2650_LAUNCHXL_UARTName
     *  @brief  Enum of UARTs on the CC2650 dev board
     */
    typedef enum CC2650_LAUNCHXL_UARTName {
        CC2650_LAUNCHXL_UART0 = 0,
    
        CC2650_LAUNCHXL_UARTCOUNT
    } CC2650_LAUNCHXL_UARTName;
    
    /*!
     *  @def    CC2650_LAUNCHXL_UdmaName
     *  @brief  Enum of DMA buffers
     */
    typedef enum CC2650_LAUNCHXL_UdmaName {
        CC2650_LAUNCHXL_UDMA0 = 0,
    
        CC2650_LAUNCHXL_UDMACOUNT
    } CC2650_LAUNCHXL_UdmaName;
    
    /*!
     *  @def    CC2650_LAUNCHXL_GPTimerName
     *  @brief  Enum of GPTimer parts
     */
    typedef enum CC2650_LAUNCHXL_GPTimerName
    {
        CC2650_LAUNCHXL_GPTIMER0A = 0,
        CC2650_LAUNCHXL_GPTIMER0B,
        CC2650_LAUNCHXL_GPTIMER1A,
        CC2650_LAUNCHXL_GPTIMER1B,
        CC2650_LAUNCHXL_GPTIMER2A,
        CC2650_LAUNCHXL_GPTIMER2B,
        CC2650_LAUNCHXL_GPTIMER3A,
        CC2650_LAUNCHXL_GPTIMER3B,
        CC2650_LAUNCHXL_GPTIMERPARTSCOUNT
    } CC2650_LAUNCHXL_GPTimerName;
    
    /*!
     *  @def    CC2650_LAUNCHXL_GPTimers
     *  @brief  Enum of GPTimers
     */
    typedef enum CC2650_LAUNCHXL_GPTimers
    {
        CC2650_LAUNCHXL_GPTIMER0 = 0,
        CC2650_LAUNCHXL_GPTIMER1,
        CC2650_LAUNCHXL_GPTIMER2,
        CC2650_LAUNCHXL_GPTIMER3,
        CC2650_LAUNCHXL_GPTIMERCOUNT
    } CC2650_LAUNCHXL_GPTimers;
    
    /*!
     *  @def    CC2650_LAUNCHXL_PWM
     *  @brief  Enum of PWM outputs on the board
     */
    typedef enum CC2650_LAUNCHXL_PWM
    {
        CC2650_LAUNCHXL_PWM0 = 0,
        CC2650_LAUNCHXL_PWM1,
        CC2650_LAUNCHXL_PWM2,
        CC2650_LAUNCHXL_PWM3,
        CC2650_LAUNCHXL_PWM4,
        CC2650_LAUNCHXL_PWM5,
        CC2650_LAUNCHXL_PWM6,
        CC2650_LAUNCHXL_PWM7,
        CC2650_LAUNCHXL_PWMCOUNT
    } CC2650_LAUNCHXL_PWM;
    
    /*!
     *  @def    CC2650_LAUNCHXL_ADCBufName
     *  @brief  Enum of ADCs
     */
    typedef enum CC2650_LAUNCHXL_ADCBufName {
        CC2650_LAUNCHXL_ADCBuf0 = 0,
        CC2650_LAUNCHXL_ADCBufCOUNT
    } CC2650_LAUNCHXL_ADCBufName;
    
    
    /*!
     *  @def    CC2650_LAUNCHXL_ADCName
     *  @brief  Enum of ADCs
     */
    typedef enum CC2650_LAUNCHXL_ADCName {
        CC2650_LAUNCHXL_ADC0 = 0,
        CC2650_LAUNCHXL_ADC1,
        CC2650_LAUNCHXL_ADC2,
        CC2650_LAUNCHXL_ADC3,
        CC2650_LAUNCHXL_ADC4,
        CC2650_LAUNCHXL_ADC5,
        CC2650_LAUNCHXL_ADC6,
        CC2650_LAUNCHXL_ADC7,
        CC2650_LAUNCHXL_ADCDCOUPL,
        CC2650_LAUNCHXL_ADCVSS,
        CC2650_LAUNCHXL_ADCVDDS,
        CC2650_LAUNCHXL_ADCCOUNT
    } CC2650_LAUNCHXL_ADCName;
    
    /*!
     *  @def    CC2650_LAUNCHXL_WatchdogName
     *  @brief  Enum of Watchdogs on the CC2650_LAUNCHXL dev board
     */
    typedef enum CC2650_LAUNCHXL_WatchdogName {
        CC2650_LAUNCHXL_WATCHDOG0 = 0,
    
        CC2650_LAUNCHXL_WATCHDOGCOUNT
    } CC2650_LAUNCHXL_WatchdogName;
    
    #ifdef __cplusplus
    }
    #endif
    
    #endif /* __CC2650_LAUNCHXL_BOARD_H__ */
    

    config.cfg (of display_balanza projects, (I didn't put the whole code before, sorry, so I put it now))

    /*
     * Copyright (c) 2015-2016, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    
    
    /* ================ Boot configuration ================ */
    var Boot = xdc.useModule('ti.sysbios.family.arm.cc26xx.Boot');
    /*
     * This module contains family specific Boot APIs and configuration settings.
     * See the SYS/BIOS API guide for more information.
     */
    
    
    
    /* ================ Clock configuration ================ */
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    
    /*
     * When using Power and calibrateRCOSC is set to true, this should be set to 10.
     * The timer used by the Clock module supports TickMode_DYNAMIC. This enables us
     * to set the tick period to 10 us without generating the overhead of additional
     * interrupts.
     *
     * Note: The calibrateRCOSC parameter is set within the Power configuration
     *     structure in the "Board.c" file.
     */
    Clock.tickPeriod = 10;
    
    
    
    /* ================ Defaults (module) configuration ================ */
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    /*
     * A flag to allow module names to be loaded on the target. Module name
     * strings are placed in the .const section for debugging purposes.
     *
     * Pick one:
     *  - true (default)
     *      Setting this parameter to true will include name strings in the .const
     *      section so that Errors and Asserts are easier to debug.
     *  - false
     *      Setting this parameter to false will reduce footprint in the .const
     *      section. As a result, Error and Assert messages will contain an
     *      "unknown module" prefix instead of the actual module name.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Defaults.common$.namedModule = true;
    Defaults.common$.namedModule = false;
    
    
    
    /* ================ Error configuration ================ */
    var Error = xdc.useModule('xdc.runtime.Error');
    /*
     * This function is called to handle all raised errors, but unlike
     * Error.raiseHook, this function is responsible for completely handling the
     * error with an appropriately initialized Error_Block.
     *
     * Pick one:
     *  - Error.policyDefault (default)
     *      Calls Error.raiseHook with an initialized Error_Block structure and logs
     *      the error using the module's logger.
     *  - Error.policySpin
     *      Simple alternative that traps on a while(1) loop for minimized target
     *      footprint.
     *      Using Error.policySpin, the Error.raiseHook will NOT called.
     */
    //Error.policyFxn = Error.policyDefault;
    Error.policyFxn = Error.policySpin;
    
    /*
     * If Error.policyFxn is set to Error.policyDefault, this function is called
     * whenever an error is raised by the Error module.
     *
     * Pick one:
     *  - Error.print (default)
     *      Errors are formatted and output via System_printf() for easier
     *      debugging.
     *  - null
     *      Errors are not formatted or logged. This option reduces code footprint.
     *  - non-null function
     *      Errors invoke custom user function. See the Error module documentation
     *      for more details.
     */
    //Error.raiseHook = Error.print;
    Error.raiseHook = null;
    //Error.raiseHook = "&myErrorFxn";
    
    /*
     * If Error.policyFxn is set to Error.policyDefault, this option applies to the
     * maximum number of times the Error.raiseHook function can be recursively
     * invoked. This option limits the possibility of an infinite recursion that
     * could lead to a stack overflow.
     * The default value is 16.
     */
    Error.maxDepth = 2;
    
    
    
    /* ================ Hwi configuration ================ */
    var halHwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
    /*
     * Checks for Hwi (system) stack overruns while in the Idle loop.
     *
     * Pick one:
     *  - true (default)
     *      Checks the top word for system stack overflows during the idle loop and
     *      raises an Error if one is detected.
     *  - false
     *      Disabling the runtime check improves runtime performance and yields a
     *      reduced flash footprint.
     */
    //halHwi.checkStackFlag = true;
    halHwi.checkStackFlag = false;
    
    /*
     * The following options alter the system's behavior when a hardware exception
     * is detected.
     *
     * Pick one:
     *  - Hwi.enableException = true
     *      This option causes the default m3Hwi.excHandlerFunc function to fully
     *      decode an exception and dump the registers to the system console.
     *      This option raises errors in the Error module and displays the
     *      exception in ROV.
     *  - Hwi.enableException = false
     *      This option reduces code footprint by not decoding or printing the
     *      exception to the system console.
     *      It however still raises errors in the Error module and displays the
     *      exception in ROV.
     *  - Hwi.excHandlerFunc = null
     *      This is the most aggressive option for code footprint savings; but it
     *      can difficult to debug exceptions. It reduces flash footprint by
     *      plugging in a default while(1) trap when exception occur. This option
     *      does not raise an error with the Error module.
     */
    //m3Hwi.enableException = true;
    //m3Hwi.enableException = false;
    m3Hwi.excHandlerFunc = null;
    
    /*
     * Enable hardware exception generation when dividing by zero.
     *
     * Pick one:
     *  - 0 (default)
     *      Disables hardware exceptions when dividing by zero
     *  - 1
     *      Enables hardware exceptions when dividing by zero
     */
    m3Hwi.nvicCCR.DIV_0_TRP = 0;
    //m3Hwi.nvicCCR.DIV_0_TRP = 1;
    
    /*
     * Enable hardware exception generation for invalid data alignment.
     *
     * Pick one:
     *  - 0 (default)
     *      Disables hardware exceptions for data alignment
     *  - 1
     *      Enables hardware exceptions for data alignment
     */
    m3Hwi.nvicCCR.UNALIGN_TRP = 0;
    //m3Hwi.nvicCCR.UNALIGN_TRP = 1;
    
    /*
     * Assign an address for the reset vector.
     *
     * Default is 0x0, which is the start of Flash. Ordinarily this setting should
     * not be changed.
     */
    m3Hwi.resetVectorAddress = 0x0;
    
    /*
     * Assign an address for the vector table in RAM.
     *
     * The default is the start of RAM. This table is placed in RAM so interrupts
     * can be added at runtime.
     *
     * Note: To change, verify address in the device specific datasheets'
     *     memory map.
     */
    m3Hwi.vectorTableAddress = 0x20000000;
    
    
    
    /* ================ Idle configuration ================ */
    var Idle = xdc.useModule('ti.sysbios.knl.Idle');
    /*
     * The Idle module is used to specify a list of functions to be called when no
     * other tasks are running in the system.
     *
     * Functions added here will be run continuously within the idle task.
     *
     * Function signature:
     *     Void func(Void);
     */
    //Idle.addFunc("&myIdleFunc");
    
    
    
    /* ================ Kernel (SYS/BIOS) configuration ================ */
    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    /*
     * Enable asserts in the BIOS library.
     *
     * Pick one:
     *  - true (default)
     *      Enables asserts for debugging purposes.
     *  - false
     *      Disables asserts for a reduced code footprint and better performance.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //BIOS.assertsEnabled = true;
    BIOS.assertsEnabled = false;
    
    /*
     * Specify default heap size for BIOS.
     */
    BIOS.heapSize = 1024;
    
    /*
     * Specify default CPU Frequency.
     */
    BIOS.cpuFreq.lo = 48000000;
    
    /*
     * A flag to determine if xdc.runtime sources are to be included in a custom
     * built BIOS library.
     *
     * Pick one:
     *  - false (default)
     *      The pre-built xdc.runtime library is provided by the respective target
     *      used to build the application.
     *  - true
     *      xdc.runtime library sources are to be included in the custom BIOS
     *      library. This option yields the most efficient library in both code
     *      footprint and runtime performance.
     */
    //BIOS.includeXdcRuntime = false;
    BIOS.includeXdcRuntime = true;
    
    /*
     * The SYS/BIOS runtime is provided in the form of a library that is linked
     * with the application. Several forms of this library are provided with the
     * SYS/BIOS product.
     *
     * Pick one:
     *   - BIOS.LibType_Custom
     *      Custom built library that is highly optimized for code footprint and
     *      runtime performance.
     *   - BIOS.LibType_Debug
     *      Custom built library that is non-optimized that can be used to
     *      single-step through APIs with a debugger.
     *
     */
    BIOS.libType = BIOS.LibType_Custom;
    //BIOS.libType = BIOS.LibType_Debug;
    
    /*
     * Runtime instance creation enable flag.
     *
     * Pick one:
     *   - true (default)
     *      Allows Mod_create() and Mod_delete() to be called at runtime which
     *      requires a default heap for dynamic memory allocation.
     *   - false
     *      Reduces code footprint by disallowing Mod_create() and Mod_delete() to
     *      be called at runtime. Object instances are constructed via
     *      Mod_construct() and destructed via Mod_destruct().
     *
     *  When using BIOS in ROM:
     *      This option must be set to true.
     */
    BIOS.runtimeCreatesEnabled = true;
    //BIOS.runtimeCreatesEnabled = false;
    
    /*
     * Enable logs in the BIOS library.
     *
     * Pick one:
     *  - true (default)
     *      Enables logs for debugging purposes.
     *  - false
     *      Disables logging for reduced code footprint and improved runtime
     *      performance.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //BIOS.logsEnabled = true;
    BIOS.logsEnabled = false;
    
    
    
    /* ================ Memory configuration ================ */
    var Memory = xdc.useModule('xdc.runtime.Memory');
    /*
     * The Memory module itself simply provides a common interface for any
     * variety of system and application specific memory management policies
     * implemented by the IHeap modules(Ex. HeapMem, HeapBuf).
     */
    
    
    
    /* ================ Program configuration ================ */
    /*
     *  Program.stack is ignored with IAR. Use the project options in
     *  IAR Embedded Workbench to alter the system stack size.
     */
    if (!Program.build.target.$name.match(/iar/)) {
        /*
         *  Reducing the system stack size (used by ISRs and Swis) to reduce
         *  RAM usage.
         */
        Program.stack = 768;
    }
    
    
    
    /*
     * Uncomment to enable Semihosting for GNU targets to print to the CCS console.
     * Please read the following TIRTOS Wiki page for more information on Semihosting:
     * processors.wiki.ti.com/.../TI-RTOS_Examples_SemiHosting
     */
    
    if (Program.build.target.$name.match(/gnu/)) {
        //var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
    }
    
    /* ================ ROM configuration ================ */
    /*
     * To use BIOS in flash, comment out the code block below.
     */
    var ROM = xdc.useModule('ti.sysbios.rom.ROM');
    if (Program.cpu.deviceName.match(/CC26/)) {
        ROM.romName = ROM.CC2650;
    }
    else if (Program.cpu.deviceName.match(/CC13/)) {
        ROM.romName = ROM.CC1350;
    }
    
    
    
    /* ================ Semaphore configuration ================ */
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    /*
     * Enables global support for Task priority pend queuing.
     *
     * Pick one:
     *  - true (default)
     *      This allows pending tasks to be serviced based on their task priority.
     *  - false
     *      Pending tasks are services based on first in, first out basis.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Semaphore.supportsPriority = true;
    Semaphore.supportsPriority = false;
    
    /*
     * Allows for the implicit posting of events through the semaphore,
     * disable for additional code saving.
     *
     * Pick one:
     *  - true
     *      This allows the Semaphore module to post semaphores and events
     *      simultaneously.
     *  - false (default)
     *      Events must be explicitly posted to unblock tasks.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Semaphore.supportsEvents = true;
    Semaphore.supportsEvents = false;
    
    
    
    /* ================ Swi configuration ================ */
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    /*
     * A software interrupt is an object that encapsulates a function to be
     * executed and a priority. Software interrupts are prioritized, preempt tasks
     * and are preempted by hardware interrupt service routines.
     *
     * This module is included to allow Swi's in a users' application.
     */
    
    /*
     * Reduce the number of swi priorities from the default of 16.
     * Decreasing the number of swi priorities yields memory savings.
     */
    Swi.numPriorities = 6;
    
    
    
    /* ================ System configuration ================ */
    var System = xdc.useModule('xdc.runtime.System');
    /*
     * The Abort handler is called when the system exits abnormally.
     *
     * Pick one:
     *  - System.abortStd (default)
     *      Call the ANSI C Standard 'abort()' to terminate the application.
     *  - System.abortSpin
     *      A lightweight abort function that loops indefinitely in a while(1) trap
     *      function.
     *  - A custom abort handler
     *      A user-defined function. See the System module documentation for
     *      details.
     */
    //System.abortFxn = System.abortStd;
    System.abortFxn = System.abortSpin;
    //System.abortFxn = "&myAbortSystem";
    
    /*
     * The Exit handler is called when the system exits normally.
     *
     * Pick one:
     *  - System.exitStd (default)
     *      Call the ANSI C Standard 'exit()' to terminate the application.
     *  - System.exitSpin
     *      A lightweight exit function that loops indefinitely in a while(1) trap
     *      function.
     *  - A custom exit function
     *      A user-defined function. See the System module documentation for
     *      details.
     */
    //System.exitFxn = System.exitStd;
    System.exitFxn = System.exitSpin;
    //System.exitFxn = "&myExitSystem";
    
    /*
     * Minimize exit handler array in the System module. The System module includes
     * an array of functions that are registered with System_atexit() which is
     * called by System_exit(). The default value is 8.
     */
    System.maxAtexitHandlers = 0;
    
    /*
     * The System.SupportProxy defines a low-level implementation of System
     * functions such as System_printf(), System_flush(), etc.
     *
     * Pick one pair:
     *  - SysMin
     *      This module maintains an internal configurable circular buffer that
     *      stores the output until System_flush() is called.
     *      The size of the circular buffer is set via SysMin.bufSize.
     *  - SysCallback
     *      SysCallback allows for user-defined implementations for System APIs.
     *      The SysCallback support proxy has a smaller code footprint and can be
     *      used to supply custom System_printf services.
     *      The default SysCallback functions point to stub functions. See the
     *      SysCallback module's documentation.
     */
    //var SysMin = xdc.useModule('xdc.runtime.SysMin');
    //SysMin.bufSize = 128;
    //System.SupportProxy = SysMin;
    var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
    System.SupportProxy = SysCallback;
    //SysCallback.abortFxn = "&myUserAbort";
    //SysCallback.exitFxn  = "&myUserExit";
    //SysCallback.flushFxn = "&myUserFlush";
    //SysCallback.putchFxn = "&myUserPutch";
    //SysCallback.readyFxn = "&myUserReady";
    
    
    
    /* ================ Task configuration ================ */
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    /*
     * Check task stacks for overflow conditions.
     *
     * Pick one:
     *  - true (default)
     *      Enables runtime checks for task stack overflow conditions during
     *      context switching ("from" and "to")
     *  - false
     *      Disables runtime checks for task stack overflow conditions.
     *
     *  When using BIOS in ROM:
     *      This option must be set to false.
     */
    //Task.checkStackFlag = true;
    Task.checkStackFlag = false;
    
    /*
     * Set the default task stack size when creating tasks.
     *
     * The default is dependent on the device being used. Reducing the default stack
     * size yields greater memory savings.
     */
    Task.defaultStackSize = 512;
    
    /*
     * Enables the idle task.
     *
     * Pick one:
     *  - true (default)
     *      Creates a task with priority of 0 which calls idle hook functions. This
     *      option must be set to true to gain power savings provided by the Power
     *      module.
     *  - false
     *      No idle task is created. This option consumes less memory as no
     *      additional default task stack is needed.
     *      To gain power savings by the Power module without having the idle task,
     *      add Idle.run as the Task.allBlockedFunc.
     */
    Task.enableIdleTask = true;
    //Task.enableIdleTask = false;
    //Task.allBlockedFunc = Idle.run;
    
    /*
     * If Task.enableIdleTask is set to true, this option sets the idle task's
     * stack size.
     *
     * Reducing the idle stack size yields greater memory savings.
     */
    Task.idleTaskStackSize = 512;
    
    /*
     * Reduce the number of task priorities.
     * The default is 16.
     * Decreasing the number of task priorities yield memory savings.
     */
    Task.numPriorities = 4;
    
    
    
    /* ================ Text configuration ================ */
    var Text = xdc.useModule('xdc.runtime.Text');
    /*
     * These strings are placed in the .const section. Setting this parameter to
     * false will save space in the .const section. Error, Assert and Log messages
     * will print raw ids and args instead of a formatted message.
     *
     * Pick one:
     *  - true (default)
     *      This option loads test string into the .const for easier debugging.
     *  - false
     *      This option reduces the .const footprint.
     */
    //Text.isLoaded = true;
    //Text.isLoaded = false; //Mas abajo en la parte de log
    
    
    
    /* ================ Types configuration ================ */
    var Types = xdc.useModule('xdc.runtime.Types');
    /*
     * This module defines basic constants and types used throughout the
     * xdc.runtime package.
     */
    
    
    
    /* ================ TI-RTOS middleware configuration ================ */
    var mwConfig = xdc.useModule('ti.mw.Config');
    /*
     * Include TI-RTOS middleware libraries
     */
    
    
    
    /* ================ TI-RTOS drivers' configuration ================ */
    var driversConfig = xdc.useModule('ti.drivers.Config');
    /*
     * Include TI-RTOS drivers
     *
     * Pick one:
     *  - driversConfig.LibType_NonInstrumented (default)
     *      Use TI-RTOS drivers library optimized for footprint and performance
     *      without asserts or logs.
     *  - driversConfig.LibType_Instrumented
     *      Use TI-RTOS drivers library for debugging with asserts and logs enabled.
     */
    driversConfig.libType = driversConfig.LibType_Instrumented;
    //driversConfig.libType = driversConfig.LibType_Instrumented;
    
    /* LOG CONFIGURATION  */
    // Remaining Modules
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Main = xdc.useModule('xdc.runtime.Main');
    var Reset = xdc.useModule('xdc.runtime.Reset');
    
    var UIAEvt = xdc.useModule('ti.uia.events.UIAEvt');
    var UIAErr = xdc.useModule('ti.uia.events.UIAErr');
    
    
    // Need Text loaded for formatting of Log_info/warning/error, but not for Log_print.
    Text.isLoaded = true;
    
    // Logging
    var Log = xdc.useModule('xdc.runtime.Log');
    
    // Override error output color with ANSI codes, and use shorter (file.c:line) format.
    Log.L_error =  {
        mask: Diags.STATUS,
        level: Diags.ERROR,
        msg: "\x1b[31;1mERROR:\x1b[0m (%s:%d) %$S"
    };
    
    Log.L_info = {
        mask: Diags.INFO,
        msg: "\x1b[32;1mINFO:\x1b[0m (%s:%d) %$S"
    };
    
    Log.L_warning = {
        mask: Diags.STATUS,
        level: Diags.WARNING,
        msg: "\x1b[33;1mWARNING:\x1b[0m (%s:%d) %$S"
        };
    
    // Pull in LoggerCallback
    var LoggerCallback = xdc.useModule('xdc.runtime.LoggerCallback');
    
    // Tell LoggerCallback to call our output function
    LoggerCallback.outputFxn = "&uartLog_outputFxn";
    
    // Tell the Idle module to add our flush() function to the idle loop (before Power)
    //var Idle = xdc.useModule('ti.sysbios.knl.Idle'); // Add if Idle isn't already imported.
    Idle.addFunc('&uartLog_flush');
    
    // Create a static instance of LoggerCallback and set as default Main logger
    var loggerParams = new LoggerCallback.Params();
    loggerParams.arg = 1;
    
    // Only for Main (code that's not in an rtsc module)
    Main.common$.logger = LoggerCallback.create(loggerParams);
    //Defaults.common$.logger = LoggerCallback.create(loggerParams); // Use for all log events
    
    // Turn on USER1 logs and INFO in Main module (user code). Turn off USER2 for fun.
    Main.common$.diags_USER1 = Diags.ALWAYS_ON;
    Main.common$.diags_USER2 = Diags.ALWAYS_ON;
    Main.common$.diags_USER3 = Diags.ALWAYS_OFF;
    Main.common$.diags_USER4 = Diags.ALWAYS_OFF;
    Main.common$.diags_USER5 = Diags.ALWAYS_OFF;
    Main.common$.diags_USER6 = Diags.ALWAYS_OFF;
    Main.common$.diags_INFO = Diags.ALWAYS_ON;
    
    /* ================ UIA LOG ================ */
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;
    
    LoggingSetup.sysbiosSwiLogging = true;
    LoggingSetup.sysbiosHwiLogging = true;
    LoggingSetup.sysbiosSemaphoreLogging = true;
    

     

    THANKS IN ADVANCE FOR YOUR ANSWER AND YOUR TIME!!! :)

     

  • Hi Again, Ashish!

    I found the solution.
    When the execution goes to the task's loop, this doesn't work. This is beacuse this doesn't have time for flush through the uart, when de procesor is in idle state. So, I added some "Task_Sleep" inside the loop, and it works!!

    Anyway, it's only works with the example's .cfg file. With the other doesn't work. I don't know why. If you know, please tell me!

    Thanks a lot!! You were very helpfull to me!
  • Hi Daniel,

    Glad to know your issue is solved.

    Regarding the cfg file, I noticed that the cfg you shared in the first post was missing a lot of important configuration settings (CPU frequency setting, clock tick period setting, etc). I would suggest using the example's cfg as baseline and make modifications to it. It looks like that is what you are doing now.

    Best,
    Ashish