• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

src/11-Mar-2024-163111

CMakeLists.txtD11-Mar-2024226 106

README.rstD11-Mar-20241.3 KiB5642

prj.confD11-Mar-2024570 162

prj_single.confD11-Mar-202452 43

sample.yamlD11-Mar-2024163 98

README.rst

1.. _mpu_test:
2
3Memory Protection Unit (MPU) TEST
4#################################
5
6Overview
7********
8This test provides a set options to check the correct MPU configuration
9against the following security issues:
10
11* Read at an address that is reserved in the memory map.
12* Write into the boot Flash/ROM.
13* Run code located in SRAM.
14
15If the MPU configuration is correct each option selected ends up in an MPU
16fault.
17
18Building and Running
19********************
20
21This project can be built and executed as follows:
22
23.. zephyr-app-commands::
24   :zephyr-app: samples/mpu/mpu_test
25   :board: v2m_beetle
26   :goals: build flash
27   :compact:
28
29To build the single thread version, use the supplied configuration file for
30single thread: :file:`prj_single.conf`:
31
32.. zephyr-app-commands::
33   :zephyr-app: samples/mpu/mpu_test
34   :board: v2m_beetle
35   :conf: prj_single.conf
36   :goals: run
37   :compact:
38
39To build a version that allows writes to the flash device, edit
40``prj.conf``, and follow the directions in the comments to enable the
41proper configs.
42
43Sample Output
44=============
45
46.. code-block:: console
47
48  uart:~$ mpu read
49  ***** BUS FAULT *****
50    Precise data bus error
51    BFAR Address: 0x24000000
52  ***** Hardware exception *****
53  Current thread ID = 0x20000400
54  Faulting instruction address = 0x80004a8
55  Fatal fault in thread 0x20000400! Aborting.
56