zephyr/samples/subsys/debug/debugmon
Gerard Marull-Paretas 9c961571a2 modules: cmsis: move glue code to modules/cmsis
The CMSIS module glue code was part of arch/ directory. Move it to
modules/cmsis, and provide a single entry point for it: cmsis_core.h.
This entry header will include the right CMSIS header (M or A/R).

To make this change possible, CMSIS module Kconfig/CMake are declared as
external, allowing us to add a new Zephyr include directory.

All files including CMSIS have been updated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-08-24 13:20:21 +02:00
..
src modules: cmsis: move glue code to modules/cmsis 2023-08-24 13:20:21 +02:00
CMakeLists.txt
prj.conf
README.rst
sample.yaml

.. _debugmon-sample:

Debug monitor
#############

Overview
********

The Debug Monitor sample shows a basic configuration of debug monitor feature.


The source code shows how to:

#. Configure registers to enable degugging in debug monitor mode
#. Specify custom interrupt to be executed when entering a breakpoint

.. _debugmon-sample-requirements:

Requirements
************

Your board must:

#. Support Debug Monitor feature (available on Cortex-M processors with the exception of Cortex-M0)
#. Have an LED connected via a GPIO pin (these are called "User LEDs" on many of
   Zephyr's :ref:`boards`).
#. Have the LED configured using the ``led0`` devicetree alias.

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

Build and flash Debug Monitor as follows, changing ``reel_board`` for your board:

.. zephyr-app-commands::
   :zephyr-app: samples/subsys/debug/debugmon
   :board: reel_board
   :goals: build flash
   :compact:

After flashing the board enters a breakpoint and executes debug monitor exception code.
The LED starts to blink, indicating that even though the processor spins in debug monitor
interrupt, other higher priority interrupts continue to execute.