From 77f8a30749defdf3094d9731372cd6f095250566 Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Fri, 20 Aug 2021 12:17:25 +0100 Subject: [PATCH 1/2] cmsis: fix iar asm build error with including header mbed-cli1 does not pass -I to IAR for iarasm (comparing to other toolchains). Because old tools are frozen, we implement this workaround for fixing the build. We use preprocessor macros that are passed to .S files anyway, so we do not loose anything but we do diverge again from CMSIS, for now.. --- .../CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0/irq_cm0.S | 1 - .../CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0P/irq_cm0.S | 1 - .../RTX/Source/TOOLCHAIN_IAR/TARGET_M23/irq_armv8mbl_common.S | 1 - .../CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M3/irq_cm3.S | 1 - .../RTX/Source/TOOLCHAIN_IAR/TARGET_M33/irq_armv8mml_common.S | 1 - .../RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/irq_cm4f.S | 2 +- 6 files changed, 1 insertion(+), 6 deletions(-) diff --git a/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0/irq_cm0.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0/irq_cm0.S index 29b8bb02743..0a6ae7da9bd 100644 --- a/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0/irq_cm0.S +++ b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0/irq_cm0.S @@ -27,7 +27,6 @@ NAME irq_armv6m.s - #include "rtx_def.h" I_T_RUN_OFS EQU 20 ; osRtxInfo.thread.run offset TCB_SP_OFS EQU 56 ; TCB.SP offset diff --git a/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0P/irq_cm0.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0P/irq_cm0.S index 29b8bb02743..0a6ae7da9bd 100644 --- a/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0P/irq_cm0.S +++ b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M0P/irq_cm0.S @@ -27,7 +27,6 @@ NAME irq_armv6m.s - #include "rtx_def.h" I_T_RUN_OFS EQU 20 ; osRtxInfo.thread.run offset TCB_SP_OFS EQU 56 ; TCB.SP offset diff --git a/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M23/irq_armv8mbl_common.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M23/irq_armv8mbl_common.S index 9f0bf8effa0..ee26d8edd74 100644 --- a/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M23/irq_armv8mbl_common.S +++ b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M23/irq_armv8mbl_common.S @@ -27,7 +27,6 @@ NAME irq_armv8mbl.s - #include "rtx_def.h" #ifndef DOMAIN_NS #define DOMAIN_NS 0 diff --git a/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M3/irq_cm3.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M3/irq_cm3.S index 3b6f9cf1d33..46a6a67a596 100644 --- a/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M3/irq_cm3.S +++ b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M3/irq_cm3.S @@ -27,7 +27,6 @@ NAME irq_armv7m.s - #include "rtx_def.h" #ifdef __ARMVFP__ FPU_USED EQU 1 diff --git a/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M33/irq_armv8mml_common.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M33/irq_armv8mml_common.S index 00a84225cc5..c8da9547dc5 100644 --- a/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M33/irq_armv8mml_common.S +++ b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_M33/irq_armv8mml_common.S @@ -27,7 +27,6 @@ NAME irq_armv8mml.s - #include "rtx_def.h" #ifndef DOMAIN_NS #define DOMAIN_NS 0 diff --git a/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/irq_cm4f.S b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/irq_cm4f.S index 3b6f9cf1d33..485433c46f4 100644 --- a/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/irq_cm4f.S +++ b/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_IAR/TARGET_RTOS_M4_M7/irq_cm4f.S @@ -27,7 +27,7 @@ NAME irq_armv7m.s - #include "rtx_def.h" + #ifdef __ARMVFP__ FPU_USED EQU 1 From 19f2138ef329edfacb75210621aaed2f5cf62bda Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Fri, 20 Aug 2021 12:20:32 +0100 Subject: [PATCH 2/2] cmsis importer: add IAR fix for .S files --- tools/importer/cmsis_importer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/importer/cmsis_importer.json b/tools/importer/cmsis_importer.json index fa81fce7522..b56fd5cce11 100644 --- a/tools/importer/cmsis_importer.json +++ b/tools/importer/cmsis_importer.json @@ -148,7 +148,8 @@ "fb354752eb69403ad503c8e53da67da6483776d6", "08ab8cc47d8722bf0c767990cd615cf1c427d006", "00580ce3f5d64b76342b7f26deed55e842056ea0", - "c122158d496d59fbd723bdb17bbc7bd5cc95245e" + "c122158d496d59fbd723bdb17bbc7bd5cc95245e", + "43a86f30450f8e9cec366434f6f752430847b4cf" ] }