From 1f27546480dfa6435c720f7e0c85ab032bcff9c7 Mon Sep 17 00:00:00 2001 From: cyliangtw Date: Tue, 4 Jul 2017 11:32:16 +0800 Subject: [PATCH] [M2351] Support GCC & IAR toolchain --- .../TARGET_M2351/device/M2351_funcs.S | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/targets/TARGET_NUVOTON/TARGET_M2351/device/M2351_funcs.S b/targets/TARGET_NUVOTON/TARGET_M2351/device/M2351_funcs.S index 6e3c933266..0c06e08a0b 100644 --- a/targets/TARGET_NUVOTON/TARGET_M2351/device/M2351_funcs.S +++ b/targets/TARGET_NUVOTON/TARGET_M2351/device/M2351_funcs.S @@ -2,10 +2,6 @@ AREA |.text|, CODE, READONLY __PC PROC EXPORT __PC -#elif defined(__ICCARM__) - SECTION .text:CODE:REORDER:NOROOT(1) - PUBLIC __PC -__PC #elif defined(__GNUC__) .text .thumb @@ -13,20 +9,28 @@ __PC .globl __PC .type __PC, %function __PC: +#else ;; for IAR, __ICCARM__ seems not defined in IAR asm + MODULE nvtfunc + + SECTION .text:CODE:REORDER:NOROOT(1) + THUMB + + PUBLIC __PC +__PC #endif MOV r0, lr BLX lr + #if defined(__CC_ARM) ALIGN END -#elif defined(__ICCARM__) - ALIGNROM - END #elif defined(__GNUC__) .align .pool .size __PC, . - __PC .end +#else ;; for IAR, __ICCARM__ seems not defined in IAR asm + END #endif \ No newline at end of file