Hi everyone,
I am trying to get FreeRTOS 10.1.1 compiling without using STM32Cube for an STM32F413 using Atollic TrueSTUDIO, but I have two compilation errors in my main function, given below. We are choosing not to use STM32Cube for our project.
The errors are:
- Undefined reference to ‘xTaskCreate’
- Undefined reference to ‘vTaskStartScheduler’
Going to the declarations of both functions in
task.h shows that both are simply marked as
PRIVELEGED FUNCTION. However, both functions are defined properly in
tasks.c. This is true both in FreeRTOS 10.1.1 and in the FreeRTOS 9.0.0 that comes in STM32Cube, but for some reason TrueSTUDIO has no trouble compiling a FreeRTOS 9.0.0-based project generated by STM32Cube.
How can I get these API calls to work? I.E. how do I make sure that the correct definitions in
tasks.c are used instead of the
PRIVELEGED FUNCTION declarations in
task.h?
main.c below:
~~~
:::C
include <stdint.h>
include “stm32f4xx.h”
include “stm32f4xx_hal.h”
include “FreeRTOS.h”
include “task.h”
include “my_tasks.h”
int main(void) {
systemClockConfig();
// https://www.freertos.org/RTOS-Cortex-M3-M4.html
HAL_NVIC_SetPriorityGrouping( NVIC_PRIORITYGROUP_4 );
// Make tasks here
xTaskCreate( vMyLEDTask, "LED", configMINIMAL_STACK_SIZE, NULL, 1, NULL );
vTaskStartScheduler();
}
~~~