Hi,
I am very new to FreeRTOS and I keep getting an error on when I try to start the task scheduler (vTaskStartScheduler). pvPortMalloc is returning NULL which causes vApplicationMallocFailedHook to be called but I do not have one defined. I disabled this in the config but when it is disabled it compiles and programs but gets stuck in an infinite loop because I am out of heap space (The infinite loop is in Cm3Start.c).
I have tried allocating more heap space in the config (even though the only task being run turns an LED on so it shouldn’t need anywhere near 64k).
My main.c
<------------------------------------------------------------>
#include "project.h"
#include "FreeRTOS.h"
#include "timers.h"
//#include "led_control.h"
void led_stuff( void *pvParams );
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
TaskHandle_t xHandle = NULL;
if (xTaskCreate(led_stuff, "led_flicker", ( uint16 ) 64, NULL, 1, &xHandle) == pdPASS) {
vTaskStartScheduler();
vTaskDelete(xHandle);
}
for(;;)
{
}
}
void led_stuff( void *pvParams ){
( void ) pvParams;
for(;;){
LED_Write(1u);
CyDelay(200);
LED_Write(0u);
CyDelay(200);
}
}
<------------------------------------------------------>
Thank you in advance for help and sorry for bad formatting.