ftsi wrote on Sunday, May 26, 2019:
Hi
i would like to create just 2 tasks. But i gor error of vApplicationStackOverflowHook.
#include "stm32f30x.h"
#include "FreeRTOS.h"
#include "task.h"
//Task functions prototypes
void vTask1_handlder(void *params);
void vTask2_handlder(void *params);
TaskHandle_t xTaskHandle1 = NULL;
TaskHandle_t xTaskHandle2 = NULL;
int main(void)
{
//1. Reset the RCC clock configuration to the default reset state
//HSI ON,PLL OFF, HSE OFF, system clock = 8 MHz
RCC_DeInit();
//2. update the SystemCoreClock variable
SystemCoreClockUpdate();
xTaskCreate(vTask1_handlder, "Task-1",configMINIMAL_STACK_SIZE,NULL,2,&xTaskHandle1);
xTaskCreate(vTask2_handlder, "Task-2",configMINIMAL_STACK_SIZE,NULL,2,&xTaskHandle2);
for(;;);
}
void vTask1_handlder(void *params)
{
while(1);
}
void vTask2_handlder(void *params)
{
while(1);
}
as far as I know, this kind of error are connected with FreeRTOSConfig.h. I search something in the forum but changing some parameters value like configUSE_MALLOC_FAILED_HOOK, configCHECK_FOR_STACK_OVERFLOW, i have never solved the issues.
The compiler gives me:
d:/openstm32/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: STM32_HelloWorld.elf section `.bss' will not fit in region `RAM'
d:/openstm32/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 13736 bytes
Third-Party/FreeRTOS/ong/Source/tasks.o: In function `vTaskSwitchContext':
D:\Workspace\RTOS_workspace\STM32_HelloWorld\Debug/../Third-Party/FreeRTOS/ong/Source/tasks.c:2988: undefined reference to `vApplicationStackOverflowHook'
collect2.exe: error: ld returned 1 exit status
makefile:38: recipe for target 'STM32_HelloWorld.elf' failed
make: *** [STM32_HelloWorld.elf] Error 1
My Config file is:
....
#include "stm32f30x.h"
extern uint32_t SystemCoreClock;
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0// it was 1
#define configCPU_CLOCK_HZ (SystemCoreClock)
#define configTICK_RATE_HZ ((portTickType) 1000)
#define configMAX_PRIORITIES (5) //it was ((unsigned portBASE_TYPE) 5)
#define configMINIMAL_STACK_SIZE ((unsigned short) 130)
#define configTOTAL_HEAP_SIZE ((size_t) (75 * 1024))
#define configMAX_TASK_NAME_LEN (10)
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1
#define configQUEUE_REGISTRY_SIZE 8
#define configCHECK_FOR_STACK_OVERFLOW 2 // it was 2
#define configUSE_RECURSIVE_MUTEXES 1
#define configUSE_MALLOC_FAILED_HOOK 0
#define configUSE_APPLICATION_TASK_TAG 0
#define configUSE_COUNTING_SEMAPHORES 1
#define configGENERATE_RUN_TIME_STATS 0
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES (2)
/* Software timer definitions. */
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY (2)
#define configTIMER_QUEUE_LENGTH 10
#define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 2)
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 1
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
...
thanks in advance
Fausto