Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions portable/GCC/ARM_CM3_MPU/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,19 @@
#define portNVIC_SYSTICK_CLK ( 0 )
#endif

/* Unprivileged critical sections are not supported when using MPU wrappers
* version 2. Default the option to 0 and reject an explicit value of 1. */
#ifndef configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0
#else
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#endif
#else
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS == 1 ) )
#error configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not supported with MPU wrappers version 2 ( configUSE_MPU_WRAPPERS_V1 == 0 ).
#endif
#endif

/* Prototype of all Interrupt Service Routines (ISRs). */
Expand Down
14 changes: 12 additions & 2 deletions portable/GCC/ARM_CM4_MPU/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,19 @@
#define portNVIC_SYSTICK_CLK ( 0 )
#endif

/* Unprivileged critical sections are not supported when using MPU wrappers
* version 2. Default the option to 0 and reject an explicit value of 1. */
#ifndef configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0
#else
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#endif
#else
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS == 1 ) )
#error configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not supported with MPU wrappers version 2 ( configUSE_MPU_WRAPPERS_V1 == 0 ).
#endif
#endif

/* Prototype of all Interrupt Service Routines (ISRs). */
Expand Down
14 changes: 12 additions & 2 deletions portable/IAR/ARM_CM4F_MPU/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,19 @@
#define portNVIC_SYSTICK_CLK_BIT ( 0 )
#endif

/* Unprivileged critical sections are not supported when using MPU wrappers
* version 2. Default the option to 0 and reject an explicit value of 1. */
#ifndef configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0
#else
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#endif
#else
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS == 1 ) )
#error configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not supported with MPU wrappers version 2 ( configUSE_MPU_WRAPPERS_V1 == 0 ).
#endif
#endif

/* Prototype of all Interrupt Service Routines (ISRs). */
Expand Down
14 changes: 12 additions & 2 deletions portable/RVDS/ARM_CM4_MPU/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,19 @@

#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE

/* Unprivileged critical sections are not supported when using MPU wrappers
* version 2. Default the option to 0 and reject an explicit value of 1. */
#ifndef configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0
#else
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#endif
#else
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS == 1 ) )
#error configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not supported with MPU wrappers version 2 ( configUSE_MPU_WRAPPERS_V1 == 0 ).
#endif
#endif

/* Prototype of all Interrupt Service Routines (ISRs). */
Expand Down
Loading