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 20
20
21
21
#if ((__ARM_ARCH_7M__ == 1U ) || (__ARM_ARCH_7EM__ == 1U ) || (__ARM_ARCH_6M__ == 1U )) && \
22
22
defined (__MPU_PRESENT ) && (__MPU_PRESENT == 1U ) && \
23
- !defined(MBED_MPU_CUSTOM )
23
+ !defined(MBED_MPU_CUSTOM ) && ! MBED_CONF_PLATFORM_DISABLE_MPU
24
24
25
25
#if !DEVICE_MPU
26
26
#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 20
20
21
21
#if ((__ARM_ARCH_8M_BASE__ == 1U ) || (__ARM_ARCH_8M_MAIN__ == 1U )) && \
22
22
defined (__MPU_PRESENT ) && (__MPU_PRESENT == 1U ) && \
23
- !defined(MBED_MPU_CUSTOM )
23
+ !defined(MBED_MPU_CUSTOM ) && ! MBED_CONF_PLATFORM_DISABLE_MPU
24
24
25
25
#if !DEVICE_MPU
26
26
#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 26
26
extern "C" {
27
27
#endif
28
28
29
- #if DEVICE_MPU
29
+ #if DEVICE_MPU && ! MBED_CONF_PLATFORM_DISABLE_MPU
30
30
31
31
/**
32
32
* \defgroup hal_mpu MPU hal
Original file line number Diff line number Diff line change 128
128
"fatal-error-auto-reboot-enabled" : {
129
129
"help" : " Setting this to true enables auto-reboot on a fatal error." ,
130
130
"value" : false
131
+ },
132
+ "disable-mpu" : {
133
+ "help" : " Disable the MPU to save rom." ,
134
+ "value" : false
131
135
}
132
136
},
133
137
"target_overrides" : {
Original file line number Diff line number Diff line change 21
21
#include "hal/mpu_api.h"
22
22
#include <limits.h>
23
23
24
- #if DEVICE_MPU
24
+ #if DEVICE_MPU && ! MBED_CONF_PLATFORM_DISABLE_MPU
25
25
26
26
static uint16_t mem_xn_lock ;
27
27
static uint16_t mem_wn_lock ;
Original file line number Diff line number Diff line change 32
32
extern "C" {
33
33
#endif
34
34
35
- #if DEVICE_MPU
35
+ #if DEVICE_MPU && ! MBED_CONF_PLATFORM_DISABLE_MPU
36
36
37
37
/** Lock ram execute never mode off
38
38
*
You can’t perform that action at this time.
0 commit comments