diff --git a/platform/mbed_application.c b/platform/mbed_application.c index 41930fcd65..c23520b0b3 100644 --- a/platform/mbed_application.c +++ b/platform/mbed_application.c @@ -19,7 +19,7 @@ #include #include "device.h" #include "platform/mbed_application.h" -#include "hal/mpu_api.h" +#include "platform/mbed_mpu_mgmt.h" #if MBED_APPLICATION_SUPPORT @@ -69,7 +69,7 @@ void mbed_start_application(uintptr_t address) SysTick->CTRL = 0x00000000; powerdown_nvic(); powerdown_scb(address); - mbed_mpu_free(); + mbed_mpu_manager_deinit(); #ifdef MBED_DEBUG // Configs to make debugging easier diff --git a/platform/mbed_mpu_mgmt.h b/platform/mbed_mpu_mgmt.h index 6140c3110f..8364941d79 100644 --- a/platform/mbed_mpu_mgmt.h +++ b/platform/mbed_mpu_mgmt.h @@ -35,6 +35,8 @@ extern "C" { #define mbed_mpu_manager_init() mbed_mpu_init() +#define mbed_mpu_manager_deinit() mbed_mpu_free() + /** Lock ram execute never mode off * * This disables the MPU's execute never ram protection and allows @@ -87,6 +89,8 @@ void mbed_mpu_manager_unlock_rom_write(void); #define mbed_mpu_manager_init() (void)0 +#define mbed_mpu_manager_deinit() (void)0 + #define mbed_mpu_manager_lock_ram_execution() (void)0 #define mbed_mpu_manager_unlock_ram_execution() (void)0