Skip to content

Commit 9f6284d

Browse files
committed
Optional PRIVILEGED_DATA wrapper (FreeRTOS#1433)
- Instead, when MPU wrappers are not used, allow port to override PRIVILEGED_FUNCTION, PRIVILEGED_DATA, or FREERTOS_SYSTEM_CALL selectively, permitting custom section placement at link-time. - Allows critical data to be placed in port-specific location for improved performance, notably for cache-coherent SMP. - Does not require enabling the full MPU wrappers.
1 parent af297f0 commit 9f6284d

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

include/mpu_wrappers.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,17 @@
288288

289289
#else /* portUSING_MPU_WRAPPERS */
290290

291-
#define PRIVILEGED_FUNCTION
292-
#define PRIVILEGED_DATA
293-
#define FREERTOS_SYSTEM_CALL
291+
#ifndef PRIVILEGED_FUNCTION
292+
#define PRIVILEGED_FUNCTION
293+
#endif
294+
295+
#ifndef PRIVILEGED_DATA
296+
#define PRIVILEGED_DATA
297+
#endif
298+
299+
#ifndef FREERTOS_SYSTEM_CALL
300+
#define FREERTOS_SYSTEM_CALL
301+
#endif
294302

295303
#endif /* portUSING_MPU_WRAPPERS */
296304

0 commit comments

Comments
 (0)