stm32:Support CONFIG_MPU_RESET and CONFIG_ARM_MPU_EARLY_RESET
This commit is contained in:
parent
9d8f7126f6
commit
fd2c1cb216
@ -53,7 +53,7 @@ ifeq ($(CONFIG_ARCH_RAMVECTORS),y)
|
||||
CMN_CSRCS += arm_ramvec_initialize.c arm_ramvec_attach.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARM_MPU),y)
|
||||
ifneq ($(filter y,$(CONFIG_ARM_MPU) $(CONFIG_ARM_MPU_EARLY_RESET)),)
|
||||
CMN_CSRCS += arm_mpu.c
|
||||
endif
|
||||
|
||||
|
@ -78,6 +78,10 @@ void stm32_mpuinitialize(void)
|
||||
|
||||
mpu_showtype();
|
||||
|
||||
/* Reset MPU if enabled */
|
||||
|
||||
mpu_reset();
|
||||
|
||||
/* Configure user flash and SRAM space */
|
||||
|
||||
mpu_user_flash(USERSPACE->us_textstart,
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "arm_arch.h"
|
||||
#include "arm_internal.h"
|
||||
#include "nvic.h"
|
||||
#include "mpu.h"
|
||||
|
||||
#include "stm32.h"
|
||||
#include "stm32_gpio.h"
|
||||
@ -217,6 +218,10 @@ void __start(void)
|
||||
"r"(CONFIG_IDLETHREAD_STACKSIZE - 64) :);
|
||||
#endif
|
||||
|
||||
/* If enabled reset the MPU */
|
||||
|
||||
mpu_early_reset();
|
||||
|
||||
/* Configure the UART so that we can get debug output as soon as possible */
|
||||
|
||||
stm32_clockconfig();
|
||||
|
Loading…
Reference in New Issue
Block a user