Skip to content

Commit 8a6e3dd

Browse files
author
Amanda Butler
authored
Merge pull request #868 from c1728p9/mpu_addition
Document how to turn MPU off at compile time
2 parents 9291290 + c2947e9 commit 8a6e3dd

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

docs/api/platform/MpuManagement.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Mbed OS handles MPU management automatically in the following situations:
1313

1414
<span class="notes">**Note:** Memory protection should be transparent to most applications and libraries because Mbed OS handles it automatically for operations that need to disable MPU protections, such as flash programming. This is an advanced feature intended for use by advanced developers; it is not required.</span>
1515

16+
<span class="notes">**Note:** The configuration value `platform.use-mpu` can be set to `false` to remove the MPU driver and save code space.</span>
17+
1618
#### RAM execute lock
1719

1820
After boot, execution from RAM is not allowed. Libraries requiring the ability to execute from RAM can enable this by acquiring the RAM execution lock. The RAM execution lock has a count associated with it, and you can lock it multiple times. Execution from RAM is disabled only when all components have unlocked it.

docs/reference/configuration/Platform.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,23 @@ The following is the complete list of platform configuration parameters, as gene
88
Configuration parameters
99
------------------------
1010
11+
Name: platform.all-stats-enabled
12+
Description: Set to 1 to enable all platform stats. When enabled the functions mbed_stats_*_get returns non-zero data. See mbed_stats.h for more information
13+
Defined by: library:platform
14+
No value set
1115
Name: platform.cpu-stats-enabled
1216
Description: Set to 1 to enable cpu stats. When enabled the function mbed_stats_cpu_get returns non-zero data. See mbed_stats.h for more information
1317
Defined by: library:platform
1418
No value set
19+
Name: platform.crash-capture-enabled
20+
Description: Enables crash context capture when the system enters a fatal error/crash.
21+
Defined by: library:platform
22+
No value set
23+
Name: platform.cthunk_count_max
24+
Description: The maximum CThunk objects used at the same time. This must be greater than 0 and less 256
25+
Defined by: library:platform
26+
Macro name: MBED_CONF_PLATFORM_CTHUNK_COUNT_MAX
27+
Value: 8 (set by library:platform)
1528
Name: platform.default-serial-baud-rate
1629
Description: Default baud rate for a Serial or RawSerial instance (if not specified in the constructor)
1730
Defined by: library:platform
@@ -25,7 +38,7 @@ Name: platform.error-decode-http-url-str
2538
Description: HTTP URL string for ARM Mbed-OS Error Decode microsite
2639
Defined by: library:platform
2740
Macro name: MBED_CONF_PLATFORM_ERROR_DECODE_HTTP_URL_STR
28-
Value: "\nFor more info, visit: https:/\/armmbed.github.io/mbedos-error/?error=0x%08X" (set by library:platform)
41+
Value: "\nFor more info, visit: https://armmbed.github.io/mbedos-error/?error=0x%08X" (set by library:platform)
2942
Name: platform.error-filename-capture-enabled
3043
Description: Enables capture of filename and line number as part of error context capture, this works only for debug and develop builds. On release builds, filename capture is always disabled
3144
Defined by: library:platform
@@ -39,6 +52,15 @@ Name: platform.error-hist-size
3952
Defined by: library:platform
4053
Macro name: MBED_CONF_PLATFORM_ERROR_HIST_SIZE
4154
Value: 4 (set by library:platform)
55+
Name: platform.error-reboot-max
56+
Description: Maximum number of auto reboots permitted when an error happens.
57+
Defined by: library:platform
58+
Macro name: MBED_CONF_PLATFORM_ERROR_REBOOT_MAX
59+
Value: 1 (set by library:platform)
60+
Name: platform.fatal-error-auto-reboot-enabled
61+
Description: Setting this to true enables auto-reboot on a fatal error.
62+
Defined by: library:platform
63+
No value set
4264
Name: platform.force-non-copyable-error
4365
Description: Force compile time error when a NonCopyable object is copied
4466
Defined by: library:platform
@@ -94,4 +116,9 @@ Name: platform.thread-stats-enabled
94116
Description: Set to 1 to enable thread stats. When enabled the function mbed_stats_thread_get_each returns non-zero data. See mbed_stats.h for more information
95117
Defined by: library:platform
96118
No value set
119+
Name: platform.use-mpu
120+
Description: Use the MPU if available to fault execution from RAM and writes to ROM. Can be disabled to reduce image size.
121+
Defined by: library:platform
122+
Macro name: MBED_CONF_PLATFORM_USE_MPU
123+
Value: 1 (set by library:platform)
97124
```

0 commit comments

Comments
 (0)