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.

Logs from TI-RTOS CC2650

Other Parts Discussed in Thread: CC2650

Hello,

I have inserted some logging statements into the example empty code for the CC2650 4xS DK. However nothing shows up in the printf view. 

In the Live view I can see the Log_info being posted but still nothing shows up in the printf logs. Attached below is the code and cfg file can someone tell me where i'm going wrong?

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

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

/* TI-RTOS Header files */
// #include <ti/drivers/I2C.h>
#include <ti/drivers/PIN.h>
// #include <ti/drivers/SPI.h>
// #include <ti/drivers/UART.h>
// #include <ti/drivers/Watchdog.h>

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

#define TASKSTACKSIZE   512

Task_Struct task0Struct;
Char task0Stack[TASKSTACKSIZE];

/* Pin driver handle */
static PIN_Handle ledPinHandle;
static PIN_State ledPinState;

/*
 * Application LED pin configuration table:
 *   - All LEDs board LEDs are off.
 */
PIN_Config ledPinTable[] = {
    Board_LED0 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
    Board_LED1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
    PIN_TERMINATE
};

/*
 *  ======== heartBeatFxn ========
 *  Toggle the Board_LED0. The Task_sleep is determined by arg0 which
 *  is configured for the heartBeat Task instance.
 */
Void heartBeatFxn(UArg arg0, UArg arg1)
{
    while (1) {
        Task_sleep((UInt)arg0);
        Log_info0("Heart-beat");
        PIN_setOutputValue(ledPinHandle, Board_LED0,
                           !PIN_getOutputValue(Board_LED0));
    }
}

/*
 *  ======== main ========
 */
int main(void)
{
    Task_Params taskParams;

    /* Call board init functions */
    Board_initGeneral();
    // Board_initI2C();
    // Board_initSPI();
    // Board_initUART();
    // Board_initWatchdog();

    /* Construct heartBeat Task  thread */
    Task_Params_init(&taskParams);
    taskParams.arg0 = 1000000 / Clock_tickPeriod;
    taskParams.stackSize = TASKSTACKSIZE;
    taskParams.stack = &task0Stack;
    Task_construct(&task0Struct, (Task_FuncPtr)heartBeatFxn, &taskParams, NULL);

    /* Open LED pins */
    ledPinHandle = PIN_open(&ledPinState, ledPinTable);
    if(!ledPinHandle) {
        System_abort("Error initializing board LED pins\n");
    }

    PIN_setOutputValue(ledPinHandle, Board_LED1, 1);

    System_printf("Starting the example\nSystem provider is set to SysMin. "
                  "Halt the target to view any SysMin contents in ROV.\n");
    /* SysMin will only print to the console when you call flush or exit */
    System_flush();

    /* Start BIOS */
    BIOS_start();

    return (0);
}
var Boot = xdc.useModule('ti.sysbios.family.arm.cc26xx.Boot');
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
Clock.tickPeriod = 10;
var Defaults = xdc.useModule('xdc.runtime.Defaults');
Defaults.common$.namedModule = false;
var Error = xdc.useModule('xdc.runtime.Error');
Error.policyFxn = Error.policySpin;
Error.raiseHook = null;
Error.maxDepth = 2;
var halHwi = xdc.useModule('ti.sysbios.hal.Hwi');
var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
halHwi.checkStackFlag = false;
m3Hwi.excHandlerFunc = null;
m3Hwi.nvicCCR.DIV_0_TRP = 0;
m3Hwi.nvicCCR.UNALIGN_TRP = 0;
m3Hwi.resetVectorAddress = 0x0;
m3Hwi.vectorTableAddress = 0x20000000;
var Idle = xdc.useModule('ti.sysbios.knl.Idle');
var BIOS = xdc.useModule('ti.sysbios.BIOS');
BIOS.assertsEnabled = false;
BIOS.heapSize = 1024;
BIOS.cpuFreq.lo = 48000000;
BIOS.includeXdcRuntime = true;
BIOS.libType = BIOS.LibType_Custom;
BIOS.runtimeCreatesEnabled = true;
BIOS.logsEnabled = true;
var Memory = xdc.useModule('xdc.runtime.Memory');
if (!Program.build.target.$name.match(/iar/)) {
Program.stack = 768;
}
if (Program.build.target.$name.match(/gnu/)) {
}
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
Semaphore.supportsPriority = false;
Semaphore.supportsEvents = false;
var Swi = xdc.useModule('ti.sysbios.knl.Swi');
Swi.numPriorities = 6;
var System = xdc.useModule('xdc.runtime.System');
System.abortFxn = System.abortSpin;
System.exitFxn = System.exitSpin;
System.maxAtexitHandlers = 2;
var SysMin = xdc.useModule('xdc.runtime.SysMin');
SysMin.bufSize = 128;
System.SupportProxy = SysMin;
var Task = xdc.useModule('ti.sysbios.knl.Task');
Task.checkStackFlag = false;
Task.defaultStackSize = 512;
Task.enableIdleTask = true;
Task.idleTaskStackSize = 512;
Task.numPriorities = 4;
var Text = xdc.useModule('xdc.runtime.Text');
Text.isLoaded = false;
var Types = xdc.useModule('xdc.runtime.Types');
var mwConfig = xdc.useModule('ti.mw.Config');
var driversConfig = xdc.useModule('ti.drivers.Config');
driversConfig.libType = driversConfig.LibType_NonInstrumented;
var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
var LoggerStopMode = xdc.useModule('ti.uia.loggers.LoggerStopMode');
var Log = xdc.useModule('xdc.runtime.Log');