File tree Expand file tree Collapse file tree 6 files changed +9
-5
lines changed
Expand file tree Collapse file tree 6 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 2020
2121#if ((__ARM_ARCH_7M__ == 1U ) || (__ARM_ARCH_7EM__ == 1U ) || (__ARM_ARCH_6M__ == 1U )) && \
2222 defined (__MPU_PRESENT ) && (__MPU_PRESENT == 1U ) && \
23- !defined(MBED_MPU_CUSTOM )
23+ !defined(MBED_MPU_CUSTOM ) && ! MBED_CONF_PLATFORM_DISABLE_MPU
2424
2525#if !DEVICE_MPU
2626#error "Device has v7m MPU but it is not enabled. Add 'MPU' to device_has in targets.json"
Original file line number Diff line number Diff line change 2020
2121#if ((__ARM_ARCH_8M_BASE__ == 1U ) || (__ARM_ARCH_8M_MAIN__ == 1U )) && \
2222 defined (__MPU_PRESENT ) && (__MPU_PRESENT == 1U ) && \
23- !defined(MBED_MPU_CUSTOM )
23+ !defined(MBED_MPU_CUSTOM ) && ! MBED_CONF_PLATFORM_DISABLE_MPU
2424
2525#if !DEVICE_MPU
2626#error "Device has v8m MPU but it is not enabled. Add 'MPU' to device_has in targets.json"
Original file line number Diff line number Diff line change 2626extern "C" {
2727#endif
2828
29- #if DEVICE_MPU
29+ #if DEVICE_MPU && ! MBED_CONF_PLATFORM_DISABLE_MPU
3030
3131/**
3232 * \defgroup hal_mpu MPU hal
Original file line number Diff line number Diff line change 128128 "fatal-error-auto-reboot-enabled" : {
129129 "help" : " Setting this to true enables auto-reboot on a fatal error." ,
130130 "value" : false
131+ },
132+ "disable-mpu" : {
133+ "help" : " Disable the MPU to save rom." ,
134+ "value" : false
131135 }
132136 },
133137 "target_overrides" : {
Original file line number Diff line number Diff line change 2121#include "hal/mpu_api.h"
2222#include <limits.h>
2323
24- #if DEVICE_MPU
24+ #if DEVICE_MPU && ! MBED_CONF_PLATFORM_DISABLE_MPU
2525
2626static uint16_t mem_xn_lock ;
2727static uint16_t mem_wn_lock ;
Original file line number Diff line number Diff line change 3232extern "C" {
3333#endif
3434
35- #if DEVICE_MPU
35+ #if DEVICE_MPU && ! MBED_CONF_PLATFORM_DISABLE_MPU
3636
3737/** Lock ram execute never mode off
3838 *
You can’t perform that action at this time.
0 commit comments