Skip to content

Commit 1ce1246

Browse files
Merge pull request #5090 from theotherjimmy/fix-realtek-warns
Correct long call macros for ARMC6
2 parents 0906be6 + 45b59b4 commit 1ce1246

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/rtl8195a_compiler.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
#define __romcall
3030
#define __longcall
3131

32+
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
33+
34+
#ifndef __longcall
35+
#define __longcall
36+
#endif
37+
3238
#elif defined(__CC_ARM)
3339

3440
#ifndef __longcall

targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/common/bsp/basic_types.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,23 @@ typedef __kernel_ssize_t SSIZE_T;
206206

207207
#define _LONG_CALL_ROM_ _LONG_CALL_
208208

209+
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
210+
#define SECTION(_name) __attribute__ ((__section__(_name)))
211+
#define ALIGNMTO(_bound) __attribute__ ((aligned (_bound)))
212+
#define _PACKED_ __attribute__ ((packed))
213+
#ifdef CONFIG_RELEASE_BUILD_LIBRARIES
214+
#define _LONG_CALL_
215+
#define _LONG_CALL_ROM_
216+
#ifdef E_CUT_ROM_DOMAIN
217+
#undef _LONG_CALL_ROM_
218+
#define _LONG_CALL_ROM_
219+
#endif
220+
#else
221+
#define _LONG_CALL_
222+
#define _LONG_CALL_ROM_ _LONG_CALL_
223+
#endif
224+
#define _WEAK __attribute__ ((weak))
225+
209226
#else
210227
#define SECTION(_name) __attribute__ ((__section__(_name)))
211228
#define ALIGNMTO(_bound) __attribute__ ((aligned (_bound)))

0 commit comments

Comments
 (0)