Skip to content

Commit 8bdec2b

Browse files
0xc0170Martin Kojtal
authored andcommitted
retarget: move compat header for ARMClang prior any cmsis headers
Reference: CMSIS 5.8.0 known issues and ARM-software/CMSIS_5#1211 This fixes the error about redefinition of enable/disable irq. we need compat header because of semihosting (not yet provided in CMSIS).
1 parent 218e93c commit 8bdec2b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

platform/source/mbed_retarget.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
* limitations under the License.
1616
*/
1717

18+
// Workaround for CMSIS 5.8.0, compat header must be placed before any CMSIS header inclusion
19+
#if defined(__ARMCC_VERSION)
20+
# include <arm_compat.h>
21+
#endif
22+
1823
#include <mstd_mutex>
1924
#include <time.h>
2025
#include "platform/platform.h"
@@ -53,7 +58,6 @@ struct DIR_impl {
5358
};
5459

5560
#if defined(__ARMCC_VERSION)
56-
# include <arm_compat.h>
5761
# include <rt_sys.h>
5862
# include <rt_misc.h>
5963
# include <stdint.h>

0 commit comments

Comments
 (0)