From 45b59b442bd94cda44a7307ccdb042bebf8c0818 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Wed, 13 Sep 2017 09:48:55 -0500 Subject: [PATCH] Correct long call macros for ARMC6 --- .../TARGET_RTL8195A/device/rtl8195a_compiler.h | 6 ++++++ .../sdk/soc/realtek/common/bsp/basic_types.h | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/rtl8195a_compiler.h b/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/rtl8195a_compiler.h index 52e74b491f..3d0dee3dcb 100644 --- a/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/rtl8195a_compiler.h +++ b/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/rtl8195a_compiler.h @@ -29,6 +29,12 @@ #define __romcall #define __longcall +#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + +#ifndef __longcall +#define __longcall +#endif + #elif defined(__CC_ARM) #ifndef __longcall diff --git a/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/common/bsp/basic_types.h b/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/common/bsp/basic_types.h index da881fcabc..bdadd0e0bd 100644 --- a/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/common/bsp/basic_types.h +++ b/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/common/bsp/basic_types.h @@ -206,6 +206,23 @@ typedef __kernel_ssize_t SSIZE_T; #define _LONG_CALL_ROM_ _LONG_CALL_ +#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) +#define SECTION(_name) __attribute__ ((__section__(_name))) +#define ALIGNMTO(_bound) __attribute__ ((aligned (_bound))) +#define _PACKED_ __attribute__ ((packed)) +#ifdef CONFIG_RELEASE_BUILD_LIBRARIES +#define _LONG_CALL_ +#define _LONG_CALL_ROM_ +#ifdef E_CUT_ROM_DOMAIN +#undef _LONG_CALL_ROM_ +#define _LONG_CALL_ROM_ +#endif +#else +#define _LONG_CALL_ +#define _LONG_CALL_ROM_ _LONG_CALL_ +#endif +#define _WEAK __attribute__ ((weak)) + #else #define SECTION(_name) __attribute__ ((__section__(_name))) #define ALIGNMTO(_bound) __attribute__ ((aligned (_bound)))