mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-11-16 12:34:29 +00:00
Add default implementations of vApplicationGetIdleTaskMemory and vApplicationGetTimerTaskMemory (#790)
This PR introduces configKERNEL_PROVIDED_STATIC_MEMORY option
which the application can set to 1 to use the default implementations
of vApplicationGetIdleTaskMemory and vApplicationGetTimerTaskMemory
functions.
If the application enables static allocation (i.e. sets
configUSE_STATIC_ALLOCATION to 1) and does not provide the above 2
functions, it will result in linker error. The application has two options:
1. Set configKERNEL_PROVIDED_STATIC_MEMORY to 1 to use the default
implementations of these functions.
2. Provide implementations of these 2 functions.
Note that default definitions are only available for non-MPU ports. The
reason is that the stack alignment requirements vary for different
architectures.
This commit is contained in:
@@ -1131,6 +1131,10 @@
|
||||
#define configSUPPORT_STATIC_ALLOCATION 0
|
||||
#endif
|
||||
|
||||
#ifndef configKERNEL_PROVIDED_STATIC_MEMORY
|
||||
#define configKERNEL_PROVIDED_STATIC_MEMORY 0
|
||||
#endif
|
||||
|
||||
#ifndef configSUPPORT_DYNAMIC_ALLOCATION
|
||||
/* Defaults to 1 for backward compatibility. */
|
||||
#define configSUPPORT_DYNAMIC_ALLOCATION 1
|
||||
|
||||
Reference in New Issue
Block a user