From 1a1df7cc642edf07075621362f8f6b37ec987907 Mon Sep 17 00:00:00 2001 From: Vincenzo Frascino Date: Wed, 29 Mar 2017 11:39:17 +0100 Subject: [PATCH] samples: synch: Add Thread Stack Guards conf This patch adds the Thread Stack Guards configuration option to the synchronization sample. This is meant to be an easy way to prove that the MPU can be dynamically programmed on the supported platforms. Change-Id: I77fbe6af3303ff8a2904768abd4cc9797f03c092 Signed-off-by: Vincenzo Frascino --- samples/synchronization/README.rst | 8 ++++++++ samples/synchronization/prj_stack_guard.conf | 5 +++++ samples/synchronization/testcase.ini | 7 +++++++ 3 files changed, 20 insertions(+) create mode 100644 samples/synchronization/prj_stack_guard.conf diff --git a/samples/synchronization/README.rst b/samples/synchronization/README.rst index 14052a1f4d3..ea5f2971949 100644 --- a/samples/synchronization/README.rst +++ b/samples/synchronization/README.rst @@ -23,6 +23,14 @@ on QEMU as follows: $ cd samples/synchronization $ make run +On the supported ARM MCUs the project can be built with the MPU and the Thread +Stack Guard feature enabled: + +.. code-block:: console + + $ cd samples/synchronization + $ make BOARD=v2m_beetle CONF_FILE=prj_stack_guard.conf + Sample Output ============= diff --git a/samples/synchronization/prj_stack_guard.conf b/samples/synchronization/prj_stack_guard.conf new file mode 100644 index 00000000000..cdc1dbe8ddb --- /dev/null +++ b/samples/synchronization/prj_stack_guard.conf @@ -0,0 +1,5 @@ +CONFIG_STDOUT_CONSOLE=y +CONFIG_MPU_STACK_GUARD=y +CONFIG_SYS_LOG=y +CONFIG_SYS_LOG_DEFAULT_LEVEL=4 +CONFIG_SYS_LOG_OVERRIDE_LEVEL=4 diff --git a/samples/synchronization/testcase.ini b/samples/synchronization/testcase.ini index a59fa3757ad..1de64db74af 100644 --- a/samples/synchronization/testcase.ini +++ b/samples/synchronization/testcase.ini @@ -1,3 +1,10 @@ [test] build_only = true tags = apps + +[test_stack_guard] +build_only = true +extra_args = CONF_FILE=prj_stack_guard.conf +tags = apps +arch_whitelist = arm +filter = CONFIG_MPU_STACK_GUARD and CONFIG_ARM_MPU