Skip to content

Commit 00580ce

Browse files
author
Martin Kojtal
committed
cmsis: fix rtx_def inclusion in .S files for Gcc Arm
rtx_def includes two CMSIS headers that pull in C/C++ headers in our case. As I found out, they should only define macros. We can fix it but it will require some refactoring as our targets use mbed rtx headers to define heap using stdin header, plus some other offenders. Workaround is to exclude the headers we do not need in irq assembly files. Tracking issue ARMmbed#14962
1 parent 38ca4bd commit 00580ce

File tree

6 files changed

+18
-0
lines changed

6 files changed

+18
-0
lines changed

cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M0/irq_cm0.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626

2727
.syntax unified
2828

29+
// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files
30+
#define RTX_CONFIG_H_
31+
#undef _RTE_
2932
#include "rtx_def.h"
3033

3134
.equ I_T_RUN_OFS, 20 // osRtxInfo.thread.run offset

cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M0P/irq_cm0.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626

2727
.syntax unified
2828

29+
// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files
30+
#define RTX_CONFIG_H_
31+
#undef _RTE_
2932
#include "rtx_def.h"
3033

3134
.equ I_T_RUN_OFS, 20 // osRtxInfo.thread.run offset

cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M23/irq_armv8mbl.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626

2727
.syntax unified
2828

29+
// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files
30+
#define RTX_CONFIG_H_
31+
#undef _RTE_
2932
#include "rtx_def.h"
3033

3134
#ifndef DOMAIN_NS

cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M3/irq_cm3.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626

2727
.syntax unified
2828

29+
// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files
30+
#define RTX_CONFIG_H_
31+
#undef _RTE_
2932
#include "rtx_def.h"
3033

3134
#if (defined(__ARM_FP) && (__ARM_FP > 0))

cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_M33/irq_armv8mml.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626

2727
.syntax unified
2828

29+
// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files
30+
#define RTX_CONFIG_H_
31+
#undef _RTE_
2932
#include "rtx_def.h"
3033

3134
#ifndef DOMAIN_NS

cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source/TOOLCHAIN_GCC/TARGET_RTOS_M4_M7/irq_cm4f.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626

2727
.syntax unified
2828

29+
// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files
30+
#define RTX_CONFIG_H_
31+
#undef _RTE_
2932
#include "rtx_def.h"
3033

3134
#if (defined(__ARM_FP) && (__ARM_FP > 0))

0 commit comments

Comments
 (0)