Build: Fix IAR build when TFM_EXCEPTION_INFO_DUMP=ON
IAR build fails if TFM_EXCEPTION_INFO_DUMP=ON is
defined. Added the missing IAR specific pragma
which solved the issue.
Signed-off-by: Dávid Házi <david.hazi@arm.com>
Change-Id: I1e92f05d6e9d7fecaedcb2b762ead09eb9a4ef99
diff --git a/platform/ext/common/exception_info.c b/platform/ext/common/exception_info.c
index 25e7e7c..f4fc17c 100644
--- a/platform/ext/common/exception_info.c
+++ b/platform/ext/common/exception_info.c
@@ -6,8 +6,9 @@
#include <string.h>
#include "tfm_arch.h"
-#include "exception_info.h"
#include "tfm_spm_log.h"
+/* "exception_info.h" must be the last include because of the IAR pragma */
+#include "exception_info.h"
struct exception_info_t {
uint32_t EXC_RETURN; /* EXC_RETURN value in LR. */
diff --git a/platform/ext/common/faults.c b/platform/ext/common/faults.c
index d9f1595..148b302 100644
--- a/platform/ext/common/faults.c
+++ b/platform/ext/common/faults.c
@@ -5,8 +5,9 @@
*
*/
#include "cmsis.h"
-#include "exception_info.h"
#include "utilities.h"
+/* "exception_info.h" must be the last include because of the IAR pragma */
+#include "exception_info.h"
void C_HardFault_Handler(void)
{
diff --git a/platform/ext/common/mpc_ppc_faults.c b/platform/ext/common/mpc_ppc_faults.c
index e1cd118..95c7d78 100644
--- a/platform/ext/common/mpc_ppc_faults.c
+++ b/platform/ext/common/mpc_ppc_faults.c
@@ -8,6 +8,7 @@
#include "cmsis.h"
#include "common_target_cfg.h"
#include "utilities.h"
+/* "exception_info.h" must be the last include because of the IAR pragma */
#include "exception_info.h"
void C_MPC_Handler(void)