Browse Source

Merge remote-tracking branch 'upstream/master'

Bernard Xiong 10 years ago
parent
commit
9e3c42273d

+ 14 - 4
bsp/stm32f7-disco/applications/application.c

@@ -1,11 +1,21 @@
 /*
 /*
  * File      : application.c
  * File      : application.c
  * This file is part of RT-Thread RTOS
  * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006, RT-Thread Development Team
+ * COPYRIGHT (C) 2015, 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
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  *
  * Change Logs:
  * Change Logs:
  * Date           Author       Notes
  * Date           Author       Notes

+ 18 - 8
bsp/stm32f7-disco/applications/sram.c

@@ -1,13 +1,23 @@
 /*
 /*
 * File      : sram.c
 * File      : sram.c
-* This file is part of RT-Thread RTOS
-* COPYRIGHT (C) 2015 RT-Thread Develop 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
-*
-* Change Logs:
+ * This file is part of RT-Thread RTOS
+ * COPYRIGHT (C) 2015, RT-Thread Development Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Change Logs:
 * Date           Author       Notes
 * Date           Author       Notes
 * 2015-08-03     xiaonong     The first version for STM32F7
 * 2015-08-03     xiaonong     The first version for STM32F7
 */
 */

+ 14 - 4
bsp/stm32f7-disco/applications/startup.c

@@ -1,11 +1,21 @@
 /*
 /*
  * File      : startup.c
  * File      : startup.c
  * This file is part of RT-Thread RTOS
  * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2015, RT-Thread Develop Team
+ * COPYRIGHT (C) 2015, 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://openlab.rt-thread.com/license/LICENSE
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  *
  * Change Logs:
  * Change Logs:
  * Date           Author       Notes
  * Date           Author       Notes

+ 14 - 4
bsp/stm32f7-disco/drivers/board.c

@@ -1,11 +1,21 @@
 /*
 /*
  * File      : board.c
  * File      : board.c
  * This file is part of RT-Thread RTOS
  * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2015 RT-Thread Develop Team
+ * COPYRIGHT (C) 2015, 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
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  *
  * Change Logs:
  * Change Logs:
  * Date           Author       Notes
  * Date           Author       Notes

+ 13 - 3
bsp/stm32f7-disco/drivers/drv_led.c

@@ -3,9 +3,19 @@
  * This file is part of RT-Thread RTOS
  * This file is part of RT-Thread RTOS
  * COPYRIGHT (C) 2015, RT-Thread Development Team
  * COPYRIGHT (C) 2015, 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
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  *
  * Change Logs:
  * Change Logs:
  * Date           Author       Notes
  * Date           Author       Notes

+ 24 - 0
bsp/stm32f7-disco/drivers/drv_mpu.c

@@ -1,3 +1,27 @@
+/*
+ * File      : drv_mpu.c
+ * This file is part of RT-Thread RTOS
+ * COPYRIGHT (C) 2015, RT-Thread Development Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Change Logs:
+ * Date           Author       Notes
+ * 2015-08-01     xiaonong     the first version for stm32f7xx
+ */ 
+
 #include "drv_mpu.h"
 #include "drv_mpu.h"
 
 
 
 

+ 14 - 4
bsp/stm32f7-disco/drivers/drv_sdram.c

@@ -1,11 +1,21 @@
 /*
 /*
  * File      : drv_sdram.c
  * File      : drv_sdram.c
  * This file is part of RT-Thread RTOS
  * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2015 RT-Thread Develop Team
+ * COPYRIGHT (C) 2015, 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
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  *
  * Change Logs:
  * Change Logs:
  * Date           Author       Notes
  * Date           Author       Notes

+ 15 - 5
bsp/stm32f7-disco/drivers/drv_usart.c

@@ -1,11 +1,21 @@
 /*
 /*
- * File      : usart.c
+ * File      : drv_usart.c
  * This file is part of RT-Thread RTOS
  * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2009, RT-Thread Development Team
+ * COPYRIGHT (C) 2015, 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
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  *
  * Change Logs:
  * Change Logs:
  * Date           Author       Notes
  * Date           Author       Notes

+ 1 - 1
bsp/stm32f7-disco/rtconfig.h

@@ -114,7 +114,7 @@
 
 
 // <section name="LIBC" description="C Runtime library setting" default="always" >
 // <section name="LIBC" description="C Runtime library setting" default="always" >
 // <bool name="RT_USING_LIBC" description="Using libc library" default="true" />
 // <bool name="RT_USING_LIBC" description="Using libc library" default="true" />
-#define RT_USING_NEWLIB
+#define RT_USING_LIBC
 // <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
 // <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
 //#define RT_USING_PTHREADS
 //#define RT_USING_PTHREADS
 // </section>
 // </section>

+ 4 - 4
components/finsh/finsh.h

@@ -229,8 +229,8 @@ struct finsh_sysvar* finsh_sysvar_lookup(const char* name);
             
             
         #else
         #else
             #define FINSH_FUNCTION_EXPORT_CMD(name, cmd, desc)      \
             #define FINSH_FUNCTION_EXPORT_CMD(name, cmd, desc)      \
-                const char __fsym_##cmd##_name[] = #cmd;            \
-                const char __fsym_##cmd##_desc[] = #desc;           \
+                const char __fsym_##cmd##_name[] SECTION(".name") = #cmd;   \
+                const char __fsym_##cmd##_desc[] SECTION(".name") = #desc;  \
                 const struct finsh_syscall __fsym_##cmd SECTION("FSymTab")= \
                 const struct finsh_syscall __fsym_##cmd SECTION("FSymTab")= \
                 {                           \
                 {                           \
                     __fsym_##cmd##_name,    \
                     __fsym_##cmd##_name,    \
@@ -239,8 +239,8 @@ struct finsh_sysvar* finsh_sysvar_lookup(const char* name);
                 };
                 };
 
 
             #define FINSH_VAR_EXPORT(name, type, desc)              \
             #define FINSH_VAR_EXPORT(name, type, desc)              \
-                const char __vsym_##name##_name[] = #name;          \
-                const char __vsym_##name##_desc[] = #desc;          \
+                const char __vsym_##name##_name[] SECTION(".name") = #name; \
+                const char __vsym_##name##_desc[] SECTION(".name") = #desc; \
                 const struct finsh_sysvar __vsym_##name SECTION("VSymTab")= \
                 const struct finsh_sysvar __vsym_##name SECTION("VSymTab")= \
                 {                           \
                 {                           \
                     __vsym_##name##_name,   \
                     __vsym_##name##_name,   \

+ 1 - 0
components/finsh/msh.c

@@ -253,6 +253,7 @@ int system(const char *command)
 {
 {
     return msh_exec_module(command, rt_strlen(command));
     return msh_exec_module(command, rt_strlen(command));
 }
 }
+RTM_EXPORT(system);
 #endif
 #endif
 
 
 static int _msh_exec_cmd(char* cmd, rt_size_t length, int *retp)
 static int _msh_exec_cmd(char* cmd, rt_size_t length, int *retp)

+ 14 - 0
components/net/lwip-1.4.1/src/arch/sys_arch.c

@@ -695,3 +695,17 @@ RTM_EXPORT(dhcp_stop);
 #include <lwip/netifapi.h>
 #include <lwip/netifapi.h>
 RTM_EXPORT(netifapi_netif_set_addr);
 RTM_EXPORT(netifapi_netif_set_addr);
 #endif
 #endif
+
+#if LWIP_NETIF_LINK_CALLBACK
+RTM_EXPORT(netif_set_link_callback);
+#endif
+
+#if LWIP_NETIF_STATUS_CALLBACK
+RTM_EXPORT(netif_set_status_callback);
+#endif
+
+RTM_EXPORT(netif_find);
+RTM_EXPORT(netif_set_addr);
+RTM_EXPORT(netif_set_ipaddr);
+RTM_EXPORT(netif_set_gw);
+RTM_EXPORT(netif_set_netmask);

+ 1 - 1
include/rtm.h

@@ -42,7 +42,7 @@ __declspec(allocate("RTMSymTab$f"))const char __rtmsym_##symbol##_name[] = "__vs
 
 
 #else
 #else
 #define RTM_EXPORT(symbol)                                            \
 #define RTM_EXPORT(symbol)                                            \
-const char __rtmsym_##symbol##_name[] = #symbol;                      \
+const char __rtmsym_##symbol##_name[] SECTION(".name") = #symbol;     \
 const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \
 const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \
 {                                                                     \
 {                                                                     \
     (void *)&symbol,                                                  \
     (void *)&symbol,                                                  \