From 65874b21bdef35bb11bde0316b7b788005b14f5c Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Sun, 17 Sep 2017 17:07:33 +0000 Subject: Added SAMA_HAL_IS_SECURE switch git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10620 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/mcuconf.h | 1 + os/hal/ports/SAMA/SAMA5D2x/hal_lld.h | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/mcuconf.h b/demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/mcuconf.h index c633e5454..0827eda96 100644 --- a/demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/mcuconf.h +++ b/demos/ATSAMA5D2/RT-SAMA5D2-XPLAINED/mcuconf.h @@ -22,6 +22,7 @@ /* * HAL driver system settings. */ +#define SAMA_HAL_IS_SECURE TRUE #define SAMA_NO_INIT FALSE #define SAMA_MOSCRC_ENABLED TRUE #define SAMA_MOSCXT_ENABLED FALSE diff --git a/os/hal/ports/SAMA/SAMA5D2x/hal_lld.h b/os/hal/ports/SAMA/SAMA5D2x/hal_lld.h index 7669ad25e..2144ea8fe 100644 --- a/os/hal/ports/SAMA/SAMA5D2x/hal_lld.h +++ b/os/hal/ports/SAMA/SAMA5D2x/hal_lld.h @@ -196,6 +196,15 @@ * @name Configuration options * @{ */ +/** + * @brief Defines if the code is running in the secure side of the ARM Trust + * Zone. It must be @p TRUE whenever the code is compiled for the + * secure side. + */ +#if !defined(SAMA_NO_INIT) || defined(__DOXYGEN__) +#define SAMA_HAL_IS_SECURE TRUE +#endif + /** * @brief Disables the PMC initialization in the HAL. */ -- cgit v1.2.3