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.
Tool/software: Code Composer Studio
I'm doing the hello execution graph demo on the CC2640R2F and, as far as I can tell, I followed all the instructions to the letter.
When the execution graph showed no output, I followed the instructions in the "If there is nothing in the execution graph..." disclaimer.
However, there is still no output. I tried reseting the launchpad and rebuilding the project. I've attached the hello.cfg and hello.c I'm using.
OS: macOS 10.14.5 (18F132)
IDE: CCS 9.0.1.00004
SDK: CC2640R2 v3.10.00.15
/* TI-RTOS Header files */ #include <xdc/std.h> #include <ti/sysbios/BIOS.h> #include <ti/sysbios/knl/Task.h> #include <ti/drivers/GPIO.h> /* Example/Board Header files */ #include "Board.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(Board_GPIO_LED1, Board_GPIO_LED_OFF); FakeBlockingFastWork(); /* Pretend to do something useful but time-consuming */ GPIO_write(Board_GPIO_LED1, Board_GPIO_LED_ON); } void doWork(void) { GPIO_write(Board_GPIO_LED0, Board_GPIO_LED_OFF); FakeBlockingSlowWork(); /* Pretend to do something useful but time-consuming */ GPIO_write(Board_GPIO_LED0, Board_GPIO_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_initGeneral(); 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");
Hi,
Can you look in ROV->LoggerStopMode to confirm there are records being generated? If not, make sure you do the following in the .cfg
1. place the kernel in flash
2. set BIOS.logsEnabled = true
3. Add LoggingSetup
Todd
ToddMullanix said:Can you look in ROV->LoggerStopMode to confirm there are records being generated?
No logs are generated.
ToddMullanix said:1. place the kernel in flash
I misunderstood that code block in the .cfg.
But it appears I need to toggle "Freeze Update" on the execution graph to get the workTaskFunc to display on the graph. The default time axis is -100 to 0 ms and by freezing and unfreezing the time axis rescales to 0 to 100 ms. Any idea why this is?
The example is using LoggerStopMode. So the execution graph reads the logs on the target when it is stopped (or the more correct term is "paused"). Once the log buffer is full, it wraps (by default). If there is no log record present in the log record that shows the context switch of a task, it is not included in the graph. The easiest work-around is to make the log buffer larger, which will increase the number of log records, which increases the likelihood of a context switch for a task.
Other approaches are to limit what is being logged or enable/disable logging dynamically in the application.
Todd