/* ... */
#include <stdint.h>
#include "hal/mpu_hal.h"
void esp_cpu_configure_region_protection(void)
{
/* ... */
const int illegal_regions[] = {0, 4, 5, 6, 7};
for (size_t i = 0; i < sizeof(illegal_regions) / sizeof(illegal_regions[0]); ++i) {
mpu_hal_set_region_access(illegal_regions[i], MPU_REGION_ILLEGAL);
}{...}
mpu_hal_set_region_access(1, MPU_REGION_RW);
}{ ... }