summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-09-23 12:08:44 +0800
committerBernard Xiong <[email protected]>2018-09-23 12:08:44 +0800
commitb98a0ba804f388f531106ff9602eb22ee66fe751 (patch)
treea132d93019f1d6d0ac77c2c34b44ad78f757b134 /components
parentcf13f84c61c9a38458df0fb9c3ed81679e560ba1 (diff)
[Kernel] Add ARMCC 6.x support.
Diffstat (limited to 'components')
-rw-r--r--components/finsh/shell.c8
-rw-r--r--components/libc/compilers/armlibc/mem_std.c3
-rw-r--r--components/libc/compilers/armlibc/stubs.c4
-rw-r--r--components/net/lwip-2.0.2/src/arch/include/arch/cc.h2
4 files changed, 11 insertions, 6 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c
index ccd5b97306..441f6c3241 100644
--- a/components/finsh/shell.c
+++ b/components/finsh/shell.c
@@ -55,7 +55,9 @@
static struct rt_thread finsh_thread;
ALIGN(RT_ALIGN_SIZE)
static char finsh_thread_stack[FINSH_THREAD_STACK_SIZE];
+struct finsh_shell _shell;
#endif
+
struct finsh_shell *shell;
static char *finsh_prompt_custom = RT_NULL;
@@ -473,9 +475,6 @@ static void shell_push_history(struct finsh_shell *shell)
}
#endif
-#ifndef RT_USING_HEAP
-struct finsh_shell _shell;
-#endif
void finsh_thread_entry(void *parameter)
{
char ch;
@@ -792,7 +791,7 @@ int finsh_system_init(void)
rt_thread_t tid;
#ifdef FINSH_USING_SYMTAB
-#ifdef __CC_ARM /* ARM C Compiler */
+#if defined(__CC_ARM) || defined(__CLANG_ARM) /* ARM C Compiler */
extern const int FSymTab$$Base;
extern const int FSymTab$$Limit;
extern const int VSymTab$$Base;
@@ -867,4 +866,3 @@ int finsh_system_init(void)
return 0;
}
INIT_APP_EXPORT(finsh_system_init);
-
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
diff --git a/components/net/lwip-2.0.2/src/arch/include/arch/cc.h b/components/net/lwip-2.0.2/src/arch/include/arch/cc.h
index 1875d9ab00..77a589276a 100644
--- a/components/net/lwip-2.0.2/src/arch/include/arch/cc.h
+++ b/components/net/lwip-2.0.2/src/arch/include/arch/cc.h
@@ -46,7 +46,7 @@
#define X32_F "lx"
#ifdef RT_USING_LIBC
-#if defined(__CC_ARM) || defined(__IAR_SYSTEMS_ICC__)
+#if defined(__CC_ARM) || defined(__CLANG_ARM) || defined(__IAR_SYSTEMS_ICC__)
#include <sys/errno.h>
#else
#include <errno.h>