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:
Mehdi 2023-09-20 09:09:37 +03:30 committed by GitHub
parent c3ece08119
commit 7cd201c290
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 0 deletions

View file

@ -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