From b98a0ba804f388f531106ff9602eb22ee66fe751 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Sun, 23 Sep 2018 12:08:44 +0800 Subject: [Kernel] Add ARMCC 6.x support. --- components/libc/compilers/armlibc/mem_std.c | 3 +++ components/libc/compilers/armlibc/stubs.c | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'components/libc/compilers') diff --git a/components/libc/compilers/armlibc/mem_std.c b/components/libc/compilers/armlibc/mem_std.c index 138ebe9773..4393b5f2af 100644 --- a/components/libc/compilers/armlibc/mem_std.c +++ b/components/libc/compilers/armlibc/mem_std.c @@ -16,8 +16,11 @@ #include "rtthread.h" #ifdef RT_USING_HEAP + +#ifdef __CC_ARM /* avoid the heap and heap-using library functions supplied by arm */ #pragma import(__use_no_heap) +#endif void *malloc(size_t n) { diff --git a/components/libc/compilers/armlibc/stubs.c b/components/libc/compilers/armlibc/stubs.c index b292cd7629..c826c8a0ec 100644 --- a/components/libc/compilers/armlibc/stubs.c +++ b/components/libc/compilers/armlibc/stubs.c @@ -37,7 +37,11 @@ #include "dfs_posix.h" #endif +#ifdef __CLANG_ARM +__asm(".global __use_no_semihosting\n\t"); +#else #pragma import(__use_no_semihosting_swi) +#endif /* Standard IO device handles. */ #define STDIN 0 -- cgit v1.3.1