Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2640R2F
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");