risc-v/esp32c3: Disable access to invalid memory regions using MPU

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei
2022-06-07 16:30:34 -03:00
committed by Xiang Xiao
parent 88bfadc55d
commit 5805ad3954
6 changed files with 275 additions and 0 deletions

View File

@@ -36,6 +36,9 @@
#include "esp32c3_clockconfig.h"
#include "esp32c3_irq.h"
#include "esp32c3_lowputc.h"
#ifdef CONFIG_ESP32C3_REGION_PROTECTION
#include "esp32c3_region.h"
#endif
#include "esp32c3_rtc.h"
#include "esp32c3_start.h"
#include "esp32c3_wdt.h"
@@ -243,6 +246,12 @@ void __esp32c3_start(void)
#endif
#ifdef CONFIG_ESP32C3_REGION_PROTECTION
/* Configure region protection */
esp32c3_region_protection();
#endif
/* Initialize RTC parameters */
esp32c3_rtc_init();