mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-06 21:25:00 -05: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:
parent
c3ece08119
commit
7cd201c290
2 changed files with 53 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue