[M2351] Support GCC & IAR toolchain

pull/7302/head
cyliangtw 2017-07-04 11:32:16 +08:00 committed by ccli8
parent dcdd9fb56e
commit 1f27546480
1 changed files with 11 additions and 7 deletions

View File

@ -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