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.

CC2642R: Execution Graph shows nothing

Part Number: CC2642R
Other Parts Discussed in Thread: SYSBIOS

I am following the SimpleLink Academy to try to use Execution Graph for debugging:

https://dev.ti.com/tirex/explore/content/simplelink_academy_cc13xx_cc26xxsdk_6_10_01_00/modules/rtos/tirtos_basics/tirtos_basics.html#execution-graph

I followed the steps in the academy, but the Execution Graph still shows nothing, clicking the stop and start button also has no effect.

My CCS version is 11.2.0 and SDK version is 6.10.

What did I miss?

BR,

Shuyang

  • Hi Shuyang,

    What project are you trying to debug?  Are you using TI-CLANG and TI-RTOS6?  Be sure to enable BIOS logs and use the flash configuration.

    BIOS.logsEnabled = true;
    
    // ...
    
    //var ROM = xdc.useModule('ti.sysbios.rom.ROM');
    //ROM.romName = ROM.CC13X2V2;
    
    // ...
    
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    LoggingSetup.sysbiosLoggerSize = 1024;
    LoggingSetup.loadLogging = false;

    I followed the same SLA steps with adcsinglechannel_CC26X2R1_LAUNCHXL_tirtos_ticlang and got the following:

    Regards,
    Ryan

  • Hi Ryan,

    I was using the "hello" example from \examples\rtos\CC26X2R1_LAUNCHXL\sysbios.

    I tried the ADC example and it did work, but I still can't make the hello example work.

    I compared the .cfg file of these two projects and did not find the reason, can you try the hello example to see if it work?

    Thanks.

    Best regards,

    Shuyang

  • The Execution Graph is likely useless for the hello SYS/BIOS example since it only prints a single line before exiting the BIOS and spinning in a system loop forever.

    int main()
    {
        /* Call driver init functions */
        Board_init();
    
        System_printf("hello world\n");
    
        /*
         *  normal BIOS programs, would call BIOS_start() to enable interrupts
         *  and start the scheduler and kick BIOS into gear.  But, this program
         *  is a simple sanity test and calls BIOS_exit() instead.
         */
        BIOS_exit(0);  /* terminates program and dumps SysMin output */
        return(0);
    }

    You should use an example which actually starts the BIOS and initializes tasks.

    Regards,
    Ryan

  • Hi Ryan,

    It's not the original hello.c, I have followed the SimpleLink Academy here to add a task function which toggles the LED and delays for a while.

    /* TI-RTOS Header files */
    #include <xdc/std.h>
    #include <ti/sysbios/BIOS.h>
    #include <ti/sysbios/knl/Task.h>
    
    #include <ti/drivers/GPIO.h>
    
    /* Driver configuration */
    #include "ti_drivers_config.h"
    
    void myDelay(int count);
    
    /* Could be anything, like computing primes */
    #define FakeBlockingSlowWork()   myDelay(12000000)
    #define FakeBlockingFastWork()   myDelay(2000000)
    
    Task_Struct workTask;
    /* Make sure we have nice 8-byte alignment on the stack to avoid wasting memory */
    #pragma DATA_ALIGN(workTaskStack, 8)
    #define STACKSIZE 1024
    static uint8_t workTaskStack[STACKSIZE];
    
    void doUrgentWork(void)
    {
        GPIO_write(CONFIG_GPIO_LED_1, CONFIG_LED_OFF);
        FakeBlockingFastWork(); /* Pretend to do something useful but time-consuming */
        GPIO_write(CONFIG_GPIO_LED_1, CONFIG_LED_ON);
    }
    
    void doWork(void)
    {
        GPIO_write(CONFIG_GPIO_LED_0, CONFIG_LED_OFF);
        FakeBlockingSlowWork(); /* Pretend to do something useful but time-consuming */
        GPIO_write(CONFIG_GPIO_LED_0, CONFIG_LED_ON);
    }
    
    Void workTaskFunc(UArg arg0, UArg arg1)
    {
        while (1) {
    
            /* Do work */
            doWork();
    
            /* Wait a while, because doWork should be a periodic thing, not continuous.*/
            myDelay(24000000);
        }
    }
    
    /*
     *  ======== main ========
     *
     */
    int main(void)
    {
        Board_init();
        GPIO_init();
    
        /* Set up the led task */
        Task_Params workTaskParams;
        Task_Params_init(&workTaskParams);
        workTaskParams.stackSize = STACKSIZE;
        workTaskParams.priority = 2;
        workTaskParams.stack = &workTaskStack;
    
        Task_construct(&workTask, workTaskFunc, &workTaskParams, NULL);
    
        /* Start kernel. */
        BIOS_start();
    
        return (0);
    }
    
    /*
     *  ======== myDelay ========
     *  Assembly function to delay. Decrements the count until it is zero
     *  The exact duration depends on the processor speed.
     */
    __asm("    .sect \".text:myDelay\"\n"
          "    .clink\n"
          "    .thumbfunc myDelay\n"
          "    .thumb\n"
          "    .global myDelay\n"
          "myDelay:\n"
          "    subs r0, #1\n"
          "    bne.n myDelay\n"
          "    bx lr\n");
    

    I've decided to let it go since the execution graph works with other projects, however it's good to know why the example used to demonstrate the feature cannot work. Maybe we need to update the academy to avoid confusion from other customers.

    Thanks.

    Best regards,

    Shuyang

  • It's going to have to change at any rate since TI-RTOS6 is being replaced with TI-RTOS7 this year.

    https://e2e.ti.com/f/1/t/1050744 
    https://e2e.ti.com/f/1/t/1018238 

    Regards,
    Ryan