Browse Source

Merge pull request #1842 from RT-Thread/fix_fpu

Fix fpu
Bernard Xiong 6 years ago
parent
commit
b013a4baa7

+ 1 - 1
components/libc/compilers/armlibc/stubs.c

@@ -315,7 +315,7 @@ int fputc(int c, FILE *f)
 {
     char ch[2] = {0};
 
-    ch[1] = c;
+    ch[0] = c;
     rt_kprintf(&ch[0]);
     return 1;
 }

+ 4 - 8
libcpu/arm/cortex-m4/context_rvds.S

@@ -1,12 +1,8 @@
 ;/*
-; * File      : context_rvds.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
-; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
-; *
+;* Copyright (c) 2006-2018, RT-Thread Development Team
+;*
+;* SPDX-License-Identifier: Apache-2.0
+;*
 ; * Change Logs:
 ; * Date           Author       Notes
 ; * 2009-01-17     Bernard      first version.

+ 3 - 7
libcpu/arm/cortex-m4/cpuport.c

@@ -1,11 +1,7 @@
 /*
- * File      : cpuport.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
+ * Copyright (c) 2006-2018, RT-Thread Development Team
  *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -23,7 +19,7 @@
 #include <rtthread.h>
 
 #if               /* ARMCC */ (  (defined ( __CC_ARM ) && defined ( __TARGET_FPU_VFP ))    \
-                  /* Clang */ || (defined ( __CLANG_ARM ) && defined ( __TARGET_FPU_VFP )) \
+                  /* Clang */ || (defined ( __CLANG_ARM ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) \
                   /* IAR */   || (defined ( __ICCARM__ ) && defined ( __ARMVFP__ ))        \
                   /* GNU */   || (defined ( __GNUC__ ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) )
 #define USE_FPU   1

+ 3 - 7
libcpu/arm/cortex-m7/cpuport.c

@@ -1,11 +1,7 @@
 /*
- * File      : cpuport.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
+ * Copyright (c) 2006-2018, RT-Thread Development Team
  *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
@@ -23,7 +19,7 @@
 #include <rtthread.h>
 
 #if               /* ARMCC */ (  (defined ( __CC_ARM ) && defined ( __TARGET_FPU_VFP ))    \
-                  /* Clang */ || (defined ( __CLANG_ARM ) && defined ( __TARGET_FPU_VFP )) \
+                  /* Clang */ || (defined ( __CLANG_ARM ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) \
                   /* IAR */   || (defined ( __ICCARM__ ) && defined ( __ARMVFP__ ))        \
                   /* GNU */   || (defined ( __GNUC__ ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) )
 #define USE_FPU   1

+ 0 - 5
src/clock.c

@@ -3,11 +3,6 @@
  *
  * SPDX-License-Identifier: Apache-2.0
  *
- */
-
-/*
- * File      : clock.c
- *
  * Change Logs:
  * Date           Author       Notes
  * 2006-03-12     Bernard      first version

+ 0 - 4
src/components.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : init.c
  *
  * Change Logs:
  * Date           Author       Notes

+ 0 - 4
src/device.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : device.c
  *
  * Change Logs:
  * Date           Author       Notes

+ 0 - 4
src/idle.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : idle.c
  *
  * Change Logs:
  * Date           Author       Notes

+ 0 - 4
src/ipc.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : ipc.c
  *
  * Change Logs:
  * Date           Author       Notes

+ 0 - 4
src/irq.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : irq.c
  *
  * Change Logs:
  * Date           Author       Notes

+ 0 - 4
src/kservice.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : kservice.c
  *
  * Change Logs:
  * Date           Author       Notes

+ 0 - 4
src/mem.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : mem.c
  *
  * Change Logs:
  * Date           Author       Notes

+ 0 - 4
src/mempool.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : mempool.c
  *
  * Change Logs:
  * Date           Author       Notes

+ 0 - 4
src/object.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : object.c
  *
  * Change Logs:
  * Date           Author       Notes

+ 0 - 4
src/scheduler.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : scheduler.c
  *
  * Change Logs:
  * Date           Author       Notes

+ 0 - 4
src/signal.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : signal.c
  *
  * Change Logs:
  * Date           Author       Notes

+ 0 - 4
src/thread.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : thread.c
  *
  * Change Logs:
  * Date           Author       Notes

+ 0 - 4
src/timer.c

@@ -2,10 +2,6 @@
  * Copyright (c) 2006-2018, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
- */
-
-/*
- * File      : timer.c
  *
  * Change Logs:
  * Date           Author       Notes