#pragma once #ifdef __cplusplus extern "C" { #endif #ifndef RT_MPU_TASK_REGIONS_ENABLE #define RT_MPU_TASK_REGIONS_ENABLE 0 #endif #if (defined(__arm__) || defined(__riscv)) && !defined(__linux__) #include #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