[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 AREA |.text|, CODE, READONLY
__PC PROC __PC PROC
EXPORT __PC EXPORT __PC
#elif defined(__ICCARM__)
SECTION .text:CODE:REORDER:NOROOT(1)
PUBLIC __PC
__PC
#elif defined(__GNUC__) #elif defined(__GNUC__)
.text .text
.thumb .thumb
@ -13,20 +9,28 @@ __PC
.globl __PC .globl __PC
.type __PC, %function .type __PC, %function
__PC: __PC:
#else ;; for IAR, __ICCARM__ seems not defined in IAR asm
MODULE nvtfunc
SECTION .text:CODE:REORDER:NOROOT(1)
THUMB
PUBLIC __PC
__PC
#endif #endif
MOV r0, lr MOV r0, lr
BLX lr BLX lr
#if defined(__CC_ARM) #if defined(__CC_ARM)
ALIGN ALIGN
END END
#elif defined(__ICCARM__)
ALIGNROM
END
#elif defined(__GNUC__) #elif defined(__GNUC__)
.align .align
.pool .pool
.size __PC, . - __PC .size __PC, . - __PC
.end .end
#else ;; for IAR, __ICCARM__ seems not defined in IAR asm
END
#endif #endif