zephyr/samples/mpu/mpu_test
Ulf Magnusson 984bfae831 global: Remove leading/trailing blank lines in files
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.

Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.

Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 19:17:27 +01:00
..
src global: Remove leading/trailing blank lines in files 2019-12-11 19:17:27 +01:00
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
README.rst doc: fix misspellings in documentation 2019-06-18 15:08:19 -04:00
prj.conf samples: mpu: migrate sample to the new shell 2018-10-15 13:03:23 -04:00
prj_single.conf samples: mpu: migrate sample to the new shell 2018-10-15 13:03:23 -04:00
sample.yaml samples: add test identifier 2019-03-29 17:44:11 -04:00

README.rst

.. _mpu_test:

Memory Protection Unit (MPU) TEST
#################################

Overview
********
This test provides a set options to check the correct MPU configuration
against the following security issues:

* Read at an address that is reserved in the memory map.
* Write into the boot Flash/ROM.
* Run code located in SRAM.

If the MPU configuration is correct each option selected ends up in an MPU
fault.

Building and Running
********************

This project can be built and executed as follows:

.. zephyr-app-commands::
   :zephyr-app: samples/mpu/mpu_test
   :board: v2m_beetle
   :goals: build flash
   :compact:

To build the single thread version, use the supplied configuration file for
single thread: :file:`prj_single.conf`:

.. zephyr-app-commands::
   :zephyr-app: samples/mpu/mpu_test
   :board: v2m_beetle
   :conf: prj_single.conf
   :goals: run
   :compact:

To build a version that allows writes to the flash device, edit
``prj.conf``, and follow the directions in the comments to enable the
proper configs.

Sample Output
=============

.. code-block:: console

  uart:~$ mpu read
  ***** BUS FAULT *****
    Precise data bus error
    BFAR Address: 0x24000000
  ***** Hardware exception *****
  Current thread ID = 0x20000400
  Faulting instruction address = 0x80004a8
  Fatal fault in thread 0x20000400! Aborting.