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 https://github.com/ARMmbed/mbed-os/issues/14962
pull/14900/head
Martin Kojtal 2021-07-19 10:47:21 +01:00
parent 38ca4bdce4
commit 00580ce3f5
6 changed files with 18 additions and 0 deletions

View File

@ -26,6 +26,9 @@
.syntax unified
// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files
#define RTX_CONFIG_H_
#undef _RTE_
#include "rtx_def.h"
.equ I_T_RUN_OFS, 20 // osRtxInfo.thread.run offset

View File

@ -26,6 +26,9 @@
.syntax unified
// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files
#define RTX_CONFIG_H_
#undef _RTE_
#include "rtx_def.h"
.equ I_T_RUN_OFS, 20 // osRtxInfo.thread.run offset

View File

@ -26,6 +26,9 @@
.syntax unified
// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files
#define RTX_CONFIG_H_
#undef _RTE_
#include "rtx_def.h"
#ifndef DOMAIN_NS

View File

@ -26,6 +26,9 @@
.syntax unified
// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files
#define RTX_CONFIG_H_
#undef _RTE_
#include "rtx_def.h"
#if (defined(__ARM_FP) && (__ARM_FP > 0))

View File

@ -26,6 +26,9 @@
.syntax unified
// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files
#define RTX_CONFIG_H_
#undef _RTE_
#include "rtx_def.h"
#ifndef DOMAIN_NS

View File

@ -26,6 +26,9 @@
.syntax unified
// Mbed OS patch: Exclude RTE_Components.h and RTX_Config.h inclusion in .S files
#define RTX_CONFIG_H_
#undef _RTE_
#include "rtx_def.h"
#if (defined(__ARM_FP) && (__ARM_FP > 0))