mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-05 12:45:22 +00:00
Now that device_api attribute is unmodified at runtime, as well as all the other attributes, it is possible to switch all device driver instance to be constant. A coccinelle rule is used for this: @r_const_dev_1 disable optional_qualifier @ @@ -struct device * +const struct device * @r_const_dev_2 disable optional_qualifier @ @@ -struct device * const +const struct device * Fixes #27399 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> |
||
---|---|---|
.. | ||
src | ||
CMakeLists.txt | ||
prj_single.conf | ||
prj.conf | ||
README.rst | ||
sample.yaml |
.. _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.