Open maxgerhardt opened 3 years ago
Looking forward to testing it!
FreeRTOS is now a core built-in library that can be used as https://github.com/CommunityGD32Cores/ArduinoCore-GD32/tree/main/libraries/FreeRTOS/examples/FreeRTOS_Blink shows. There's a default config file, but if GD32FreeRTOSConfig.h
exists in the src
or include
folder (for PlatformIO), it will be used instead. Successfully tested on a GD32F303CC.
today I got chance to test the freeRTOS, I modified the codes based on the example, successfully blink 2 LEDs, impressive, thanks!
I wonder if this buildin freeRTOS does not support dynamically allocated memory? when I try to use xTaskCreate(), I got below error: xTaskCreate' was not declared in this scope
In the default FreeRTOS config, dynamic allocation is disabled in favor of static allocation. This prevents runtime out-of-memory situations for low-RAM microcontrollers. Irregardless, you can change the values
per-project to 0 or 1. Setting the first to 1 will enable xTaskCreate
.
Hum, I will make a note on it if needed, by the way, do we have a rough standards say for example how much RAM is defined as low-RAM mcu? what about 303CC, low or ok?
The core should have a builtin FreeRTOS library, akin to STM32FreeRTOS.
This additionally requires that the core allows hooking of the SysTick function and possibly other functions.