Hello Community,
I am trying to run a basic FreeRTOS project (blinking an LED) on my F28379D launchpad. I have copied and included all the necessary freeRTOS files from C2000 ware freeRTOS demo for F2838x_C28x_CCS. I am using the default linker cmd file i.e. 2837xD_FLASH_lnk_CPU1.cmd in the project and not the one provided in the freeRTOS demo (2838x_FreeRTOS_FLASH_lnk_cpu1). The project compiles without error but on debugging, the task never gets executed and code enters the while loop in main(). Here is the code snippet:
///////////////////////////////////////////////////////////////code start///////////////////////////////////////////////////////////////////////////////////////
#include "driverlib.h" #include "device.h" #include "FreeRTOS.h" #include "task.h" #include<stdio.h> #define myBoardLED0_GPIO 34 uint32_t count = 0; void myBoardLED0_GPIO_init(){ GPIO_setPadConfig(myBoardLED0_GPIO, GPIO_PIN_TYPE_STD); GPIO_setQualificationMode(myBoardLED0_GPIO, GPIO_QUAL_SYNC); GPIO_setDirectionMode(myBoardLED0_GPIO, GPIO_DIR_MODE_OUT); GPIO_setControllerCore(myBoardLED0_GPIO, GPIO_CORE_CPU1); } TaskHandle_t myTask1Handle = NULL; void myTask1(void *p) { while(1) { count++; GPIO_togglePin(myBoardLED0_GPIO); vTaskDelay(1000); // 1 sec delay } } void main(void) { myBoardLED0_GPIO_init(); xTaskCreate(myTask1,"task1", 225, (void*) 0, 1,&myTask1Handle); vTaskStartScheduler(); while(1) { } }
///////////////////////////////////////////////////////////////code end///////////////////////////////////////////////////////////////////////////////////////
It would be great if someone can tell me what am i missing here?
Thanks!