retarget: move compat header for ARMClang prior any cmsis headers

Reference: CMSIS 5.8.0 known issues and https://github.com/ARM-software/CMSIS_5/issues/1211

This fixes the error about redefinition of enable/disable irq. we need compat header because of
semihosting (not yet provided in CMSIS).
pull/14900/head
Martin Kojtal 2021-07-12 14:25:21 +01:00 committed by Martin Kojtal
parent 218e93c97f
commit 8bdec2b4db
1 changed files with 5 additions and 1 deletions

View File

@ -15,6 +15,11 @@
* limitations under the License.
*/
// Workaround for CMSIS 5.8.0, compat header must be placed before any CMSIS header inclusion
#if defined(__ARMCC_VERSION)
# include <arm_compat.h>
#endif
#include <mstd_mutex>
#include <time.h>
#include "platform/platform.h"
@ -53,7 +58,6 @@ struct DIR_impl {
};
#if defined(__ARMCC_VERSION)
# include <arm_compat.h>
# include <rt_sys.h>
# include <rt_misc.h>
# include <stdint.h>