Skip to content

Commit aa07289

Browse files
IsaacDynamoactions-userSkptak
authored
Make configSUPPORT_STATIC_ALLOCATION==1 an error for MPU ports (#953)
* Error when configSUPPORT_STATIC_ALLOCATION is set for MPU ports * Uncrustify: triggered by comment. --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Soren Ptak <[email protected]>
1 parent c083af9 commit aa07289

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tasks.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@
4141
#include "timers.h"
4242
#include "stack_macros.h"
4343

44+
/* The default definitions are only available for non-MPU ports. The
45+
* reason is that the stack alignment requirements vary for different
46+
* architectures.*/
47+
#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) && ( portUSING_MPU_WRAPPERS != 0 ) )
48+
#error configKERNEL_PROVIDED_STATIC_MEMORY cannot be set to 1 when using an MPU port. The vApplicationGet*TaskMemory() functions must be provided manually.
49+
#endif
50+
4451
/* The MPU ports require MPU_WRAPPERS_INCLUDED_FROM_API_FILE to be defined
4552
* for the header files above, but not in this file, in order to generate the
4653
* correct privileged Vs unprivileged linkage and placement. */

0 commit comments

Comments
 (0)