rt/include/rt/mpu.h

31 lines
696 B
C

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#ifndef RT_MPU_TASK_REGIONS_ENABLE
#define RT_MPU_TASK_REGIONS_ENABLE 0
#endif
#if RT_MPU_TASK_REGIONS_ENABLE
#include <rt/arch/mpu.h>
#endif
// This can be defined by rt/arch/mpu.h.
#ifndef RT_MPU_PRIV_SECTIONS_ENABLE
#define RT_MPU_PRIV_SECTIONS_ENABLE RT_MPU_TASK_REGIONS_ENABLE
#endif
#if RT_MPU_PRIV_SECTIONS_ENABLE
#define RT_MPU_PRIV_BSS(name) __attribute__((section(".priv_bss." #name)))
#define RT_MPU_PRIV_DATA(name) __attribute__((section(".priv_data." #name)))
#else // !RT_MPU_PRIV_SECTIONS_ENABLE
#define RT_MPU_PRIV_BSS(name)
#define RT_MPU_PRIV_DATA(name)
#endif // RT_MPU_PRIV_SECTIONS_ENABLE
#ifdef __cplusplus
}
#endif