[compiler] 增加SConscript依赖标志 AddDepend (#6534)
* [compiler] 增加SConscript依赖标志 AddDepend * RT_USING_NEWLIB->RT_USING_NEWLIBC RT_USING_ARM_LIBC->RT_USING_ARMLIBC * 删除过时的板载测试例程 * [gd32] 移除无用的反汇编文件 * [bsp]移除老旧bsp中对RT_USING_NEWLIBC的手动宏定义
This commit is contained in:
parent
7bc744dae9
commit
055267f049
|
@ -26,14 +26,5 @@ Export('rtconfig')
|
||||||
# prepare building environment
|
# prepare building environment
|
||||||
objs = PrepareBuilding(env, RTT_ROOT)
|
objs = PrepareBuilding(env, RTT_ROOT)
|
||||||
|
|
||||||
if GetDepend('RT_USING_WEBSERVER'):
|
|
||||||
objs = objs + SConscript(RTT_ROOT + '/components/net/webserver/SConscript', variant_dir='build/net/webserver', duplicate=0)
|
|
||||||
|
|
||||||
if GetDepend('RT_USING_RTGUI'):
|
|
||||||
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
|
|
||||||
|
|
||||||
# libc testsuite
|
|
||||||
#objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0)
|
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
|
|
@ -26,14 +26,5 @@ Export('rtconfig')
|
||||||
# prepare building environment
|
# prepare building environment
|
||||||
objs = PrepareBuilding(env, RTT_ROOT)
|
objs = PrepareBuilding(env, RTT_ROOT)
|
||||||
|
|
||||||
if GetDepend('RT_USING_WEBSERVER'):
|
|
||||||
objs = objs + SConscript(RTT_ROOT + '/components/net/webserver/SConscript', variant_dir='build/net/webserver', duplicate=0)
|
|
||||||
|
|
||||||
if GetDepend('RT_USING_RTGUI'):
|
|
||||||
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
|
|
||||||
|
|
||||||
# libc testsuite
|
|
||||||
objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0)
|
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
|
|
@ -27,14 +27,5 @@ Export('rtconfig')
|
||||||
# prepare building environment
|
# prepare building environment
|
||||||
objs = PrepareBuilding(env, RTT_ROOT)
|
objs = PrepareBuilding(env, RTT_ROOT)
|
||||||
|
|
||||||
if GetDepend('RT_USING_WEBSERVER'):
|
|
||||||
objs = objs + SConscript(RTT_ROOT + '/components/net/webserver/SConscript', variant_dir='build/net/webserver', duplicate=0)
|
|
||||||
|
|
||||||
if GetDepend('RT_USING_RTGUI'):
|
|
||||||
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
|
|
||||||
|
|
||||||
# libc testsuite
|
|
||||||
objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0)
|
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
|
|
||||||
/* SECTION: a runtime libc library */
|
/* SECTION: a runtime libc library */
|
||||||
/* a runtime libc library */
|
/* a runtime libc library */
|
||||||
//#define RT_USING_NEWLIB
|
//#define RT_USING_NEWLIBC
|
||||||
//#define RT_USING_PTHREADS
|
//#define RT_USING_PTHREADS
|
||||||
|
|
||||||
/* SECTION: C++ support */
|
/* SECTION: C++ support */
|
||||||
|
@ -232,7 +232,7 @@
|
||||||
* Note on FTK:
|
* Note on FTK:
|
||||||
*
|
*
|
||||||
* FTK depends :
|
* FTK depends :
|
||||||
* #define RT_USING_NEWLIB
|
* #define RT_USING_NEWLIBC
|
||||||
* #define DFS_USING_WORKDIR
|
* #define DFS_USING_WORKDIR
|
||||||
*
|
*
|
||||||
* And the maximal length must great than 64
|
* And the maximal length must great than 64
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#define HAVE_SIGVAL
|
#define HAVE_SIGVAL
|
||||||
#define HAVE_SIGEVENT
|
#define HAVE_SIGEVENT
|
||||||
#define HAVE_SIGINFO
|
#define HAVE_SIGINFO
|
||||||
#define RT_USING_NEWLIB
|
#define RT_USING_NEWLIBC
|
||||||
#define CY_USING_HAL
|
#define CY_USING_HAL
|
||||||
#define CY_APPNAME_mtb_example_psoc6_rtthread
|
#define CY_APPNAME_mtb_example_psoc6_rtthread
|
||||||
#define CY_TARGET_DEVICE CY8C624ABZI_S2D44
|
#define CY_TARGET_DEVICE CY8C624ABZI_S2D44
|
||||||
|
|
|
@ -98,7 +98,7 @@ INCLUDES=$(RTT_ROOT_DIR)/include/ \
|
||||||
$(RTT_ROOT_DIR)/components/drivers/include/
|
$(RTT_ROOT_DIR)/components/drivers/include/
|
||||||
|
|
||||||
# Add additional defines to the build process (without a leading -D).
|
# Add additional defines to the build process (without a leading -D).
|
||||||
DEFINES=HAVE_SIGVAL HAVE_SIGEVENT HAVE_SIGINFO RT_USING_NEWLIB
|
DEFINES=HAVE_SIGVAL HAVE_SIGEVENT HAVE_SIGINFO RT_USING_NEWLIBC
|
||||||
|
|
||||||
# Select softfp or hardfp floating point. Default is softfp.
|
# Select softfp or hardfp floating point. Default is softfp.
|
||||||
VFP_SELECT=hardfp
|
VFP_SELECT=hardfp
|
||||||
|
|
|
@ -209,7 +209,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* SECTION: Runtime library */
|
/* SECTION: Runtime library */
|
||||||
// #define RT_USING_NEWLIB
|
|
||||||
#define RT_LIBC_USING_TIME
|
#define RT_LIBC_USING_TIME
|
||||||
|
|
||||||
/* SECTION: Console options */
|
/* SECTION: Console options */
|
||||||
|
@ -265,7 +264,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* SECTION: device filesystem */
|
/* SECTION: device filesystem */
|
||||||
#if (defined(RT_USING_NEWLIB) || defined(EFM32_USING_SPISD))
|
#ifdef EFM32_USING_SPISD
|
||||||
#define RT_USING_DFS
|
#define RT_USING_DFS
|
||||||
/* the max number of mounted filesystem */
|
/* the max number of mounted filesystem */
|
||||||
#define DFS_FILESYSTEMS_MAX (2)
|
#define DFS_FILESYSTEMS_MAX (2)
|
||||||
|
@ -273,14 +272,12 @@
|
||||||
#define DFS_FD_MAX (4)
|
#define DFS_FD_MAX (4)
|
||||||
/* the max number of cached sector */
|
/* the max number of cached sector */
|
||||||
#define DFS_CACHE_MAX_NUM (4)
|
#define DFS_CACHE_MAX_NUM (4)
|
||||||
#endif /* defined(RT_USING_NEWLIB) || defined(EFM32_USING_SPISD) */
|
#endif /* EFM32_USING_SPISD */
|
||||||
#if defined(EFM32_USING_SPISD)
|
#if defined(EFM32_USING_SPISD)
|
||||||
#define RT_USING_DFS_ELMFAT
|
#define RT_USING_DFS_ELMFAT
|
||||||
#define DFS_ELMFAT_INTERFACE_EFM
|
#define DFS_ELMFAT_INTERFACE_EFM
|
||||||
#endif /* defined(EFM32_USING_SPISD) */
|
#endif /* defined(EFM32_USING_SPISD) */
|
||||||
#if defined(RT_USING_NEWLIB)
|
|
||||||
#define RT_USING_DFS_DEVFS
|
#define RT_USING_DFS_DEVFS
|
||||||
#endif /* defined(RT_USING_NEWLIB) */
|
|
||||||
|
|
||||||
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
|
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
|
||||||
#if defined(EFM32_USING_ETHERNET)
|
#if defined(EFM32_USING_ETHERNET)
|
||||||
|
|
|
@ -133,9 +133,6 @@
|
||||||
#define FINSH_THREAD_STACK_SIZE 4096
|
#define FINSH_THREAD_STACK_SIZE 4096
|
||||||
// </section>
|
// </section>
|
||||||
|
|
||||||
// <section name="LIBC" description="C Runtime library setting" default="always" >
|
|
||||||
// <bool name="RT_USING_NEWLIB" description="Using newlib library, only available under GNU GCC" default="true" />
|
|
||||||
// #define RT_USING_NEWLIB
|
|
||||||
// <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>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -8,7 +8,7 @@
|
||||||
#define D45
|
#define D45
|
||||||
#define HAVE_CCONFIG_H
|
#define HAVE_CCONFIG_H
|
||||||
#define HPM6750
|
#define HPM6750
|
||||||
#define RT_USING_NEWLIB
|
#define RT_USING_NEWLIBC
|
||||||
#define _POSIX_C_SOURCE 1
|
#define _POSIX_C_SOURCE 1
|
||||||
#define _REENT_SMALL
|
#define _REENT_SMALL
|
||||||
#define __RTTHREAD__
|
#define __RTTHREAD__
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#define D45
|
#define D45
|
||||||
#define HAVE_CCONFIG_H
|
#define HAVE_CCONFIG_H
|
||||||
#define HPM6750
|
#define HPM6750
|
||||||
#define RT_USING_NEWLIB
|
#define RT_USING_NEWLIBC
|
||||||
#define _POSIX_C_SOURCE 1
|
#define _POSIX_C_SOURCE 1
|
||||||
#define _REENT_SMALL
|
#define _REENT_SMALL
|
||||||
#define __RTTHREAD__
|
#define __RTTHREAD__
|
||||||
|
|
|
@ -27,8 +27,5 @@ Export('rtconfig')
|
||||||
# prepare building environment
|
# prepare building environment
|
||||||
objs = PrepareBuilding(env, RTT_ROOT)
|
objs = PrepareBuilding(env, RTT_ROOT)
|
||||||
|
|
||||||
if GetDepend('RT_USING_RTGUI'):
|
|
||||||
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
|
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
|
|
@ -40,8 +40,5 @@ if GetDepend('RT_USING_FPU'):
|
||||||
env['CXXFLAGS'] = env['CXXFLAGS'].replace('-msoft-float', '-mhard-float')
|
env['CXXFLAGS'] = env['CXXFLAGS'].replace('-msoft-float', '-mhard-float')
|
||||||
env['LINKFLAGS'] = env['LINKFLAGS'].replace('-msoft-float', '-mhard-float')
|
env['LINKFLAGS'] = env['LINKFLAGS'].replace('-msoft-float', '-mhard-float')
|
||||||
|
|
||||||
if GetDepend('RT_USING_RTGUI'):
|
|
||||||
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
|
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
|
|
@ -88,8 +88,8 @@
|
||||||
// </section>
|
// </section>
|
||||||
|
|
||||||
// <section name="LIBC" description="C Runtime library setting" default="always" >
|
// <section name="LIBC" description="C Runtime library setting" default="always" >
|
||||||
// <bool name="RT_USING_NEWLIB" description="Using newlib library, only available under GNU GCC" default="true" />
|
// <bool name="RT_USING_NEWLIBC" description="Using newlib library, only available under GNU GCC" default="true" />
|
||||||
// #define RT_USING_NEWLIB
|
// #define RT_USING_NEWLIBC
|
||||||
// <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>
|
||||||
|
|
|
@ -116,9 +116,6 @@
|
||||||
//#define FINSH_USING_MSH
|
//#define FINSH_USING_MSH
|
||||||
// </section>
|
// </section>
|
||||||
|
|
||||||
// <section name="LIBC" description="C Runtime library setting" default="always" >
|
|
||||||
// <bool name="RT_USING_NEWLIB" description="Using newlib library, only available under GNU GCC" default="true" />
|
|
||||||
// #define RT_USING_NEWLIB
|
|
||||||
// <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>
|
||||||
|
|
|
@ -115,9 +115,6 @@
|
||||||
//#define FINSH_USING_MSH
|
//#define FINSH_USING_MSH
|
||||||
// </section>
|
// </section>
|
||||||
|
|
||||||
// <section name="LIBC" description="C Runtime library setting" default="always" >
|
|
||||||
// <bool name="RT_USING_NEWLIB" description="Using newlib library, only available under GNU GCC" default="true" />
|
|
||||||
// #define RT_USING_NEWLIB
|
|
||||||
// <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>
|
||||||
|
|
|
@ -90,9 +90,6 @@
|
||||||
#define FINSH_THREAD_STACK_SIZE 4096
|
#define FINSH_THREAD_STACK_SIZE 4096
|
||||||
// </section>
|
// </section>
|
||||||
|
|
||||||
// <section name="LIBC" description="C Runtime library setting" default="always" >
|
|
||||||
// <bool name="RT_USING_NEWLIB" description="Using newlib library, only available under GNU GCC" default="true" />
|
|
||||||
// #define RT_USING_NEWLIB
|
|
||||||
// <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>
|
||||||
|
|
|
@ -31,14 +31,5 @@ Export('rtconfig')
|
||||||
# prepare building environment
|
# prepare building environment
|
||||||
objs = PrepareBuilding(env, RTT_ROOT)
|
objs = PrepareBuilding(env, RTT_ROOT)
|
||||||
|
|
||||||
if GetDepend('RT_USING_WEBSERVER'):
|
|
||||||
objs = objs + SConscript(RTT_ROOT + '/components/net/webserver/SConscript', variant_dir='build/net/webserver', duplicate=0)
|
|
||||||
|
|
||||||
if GetDepend('RT_USING_RTGUI'):
|
|
||||||
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
|
|
||||||
|
|
||||||
# libc testsuite
|
|
||||||
# objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0)
|
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
|
|
@ -76,6 +76,4 @@
|
||||||
///#define FINSH_USING_SYMTAB
|
///#define FINSH_USING_SYMTAB
|
||||||
///#define FINSH_USING_DESCRIPTION
|
///#define FINSH_USING_DESCRIPTION
|
||||||
|
|
||||||
//#define RT_USING_NEWLIB
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -91,7 +91,6 @@
|
||||||
|
|
||||||
/* SECTION: a runtime libc library */
|
/* SECTION: a runtime libc library */
|
||||||
/* a runtime libc library*/
|
/* a runtime libc library*/
|
||||||
/* #define RT_USING_NEWLIB */
|
|
||||||
|
|
||||||
/* SECTION: C++ support */
|
/* SECTION: C++ support */
|
||||||
/* Using C++ support*/
|
/* Using C++ support*/
|
||||||
|
|
|
@ -78,7 +78,6 @@
|
||||||
|
|
||||||
/* SECTION: a runtime libc library */
|
/* SECTION: a runtime libc library */
|
||||||
/* a runtime libc library */
|
/* a runtime libc library */
|
||||||
/* #define RT_USING_NEWLIB */
|
|
||||||
|
|
||||||
/* SECTION: a mini libc */
|
/* SECTION: a mini libc */
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,6 @@
|
||||||
/* the buffer size of console*/
|
/* the buffer size of console*/
|
||||||
#define RT_CONSOLEBUF_SIZE 128
|
#define RT_CONSOLEBUF_SIZE 128
|
||||||
|
|
||||||
#define RT_USING_NEWLIB
|
|
||||||
|
|
||||||
/* SECTION: finsh, a C-Express shell */
|
/* SECTION: finsh, a C-Express shell */
|
||||||
#define RT_USING_FINSH
|
#define RT_USING_FINSH
|
||||||
/* Using symbol table */
|
/* Using symbol table */
|
||||||
|
|
|
@ -71,8 +71,6 @@
|
||||||
/* the buffer size of console*/
|
/* the buffer size of console*/
|
||||||
#define RT_CONSOLEBUF_SIZE 128
|
#define RT_CONSOLEBUF_SIZE 128
|
||||||
|
|
||||||
//#define RT_USING_NEWLIB
|
|
||||||
|
|
||||||
/* SECTION: finsh, a C-Express shell */
|
/* SECTION: finsh, a C-Express shell */
|
||||||
#define RT_USING_FINSH
|
#define RT_USING_FINSH
|
||||||
/* Using symbol table */
|
/* Using symbol table */
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.100549972" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.100549972" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||||
<listOptionValue builtIn="false" value="HAVE_CCONFIG_H"/>
|
<listOptionValue builtIn="false" value="HAVE_CCONFIG_H"/>
|
||||||
<listOptionValue builtIn="false" value="RT_USING_NEWLIB"/>
|
<listOptionValue builtIn="false" value="RT_USING_NEWLIBC"/>
|
||||||
</option>
|
</option>
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.2133065240" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value="" valueType="string"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.2133065240" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value="" valueType="string"/>
|
||||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.992053063" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.992053063" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||||
|
|
|
@ -95,9 +95,6 @@
|
||||||
#define FINSH_THREAD_STACK_SIZE 4096
|
#define FINSH_THREAD_STACK_SIZE 4096
|
||||||
// </section>
|
// </section>
|
||||||
|
|
||||||
// <section name="LIBC" description="C Runtime library setting" default="always" >
|
|
||||||
// <bool name="RT_USING_NEWLIB" description="Using newlib library, only available under GNU GCC" default="true" />
|
|
||||||
// #define RT_USING_NEWLIB
|
|
||||||
// <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>
|
||||||
|
|
|
@ -27,9 +27,5 @@ Export('rtconfig')
|
||||||
# prepare building environment
|
# prepare building environment
|
||||||
objs = PrepareBuilding(env, RTT_ROOT)
|
objs = PrepareBuilding(env, RTT_ROOT)
|
||||||
|
|
||||||
|
|
||||||
# kernel testsuite
|
|
||||||
#objs = objs + SConscript(RTT_ROOT + '/examples/kernel/SConscript', variant_dir='build/examples/kernel', duplicate=0)
|
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
|
|
@ -88,7 +88,6 @@
|
||||||
|
|
||||||
/* SECTION: a runtime libc library */
|
/* SECTION: a runtime libc library */
|
||||||
/* a runtime libc library */
|
/* a runtime libc library */
|
||||||
/* #define RT_USING_NEWLIB */
|
|
||||||
|
|
||||||
/* SECTION: a mini libc */
|
/* SECTION: a mini libc */
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/* RT-Thread pre-include file */
|
/* RT-Thread pre-include file */
|
||||||
|
|
||||||
#define HAVE_CCONFIG_H
|
#define HAVE_CCONFIG_H
|
||||||
#define RT_USING_NEWLIB
|
#define RT_USING_NEWLIBC
|
||||||
#define STM32F746xx
|
#define STM32F746xx
|
||||||
#define USE_HAL_DRIVER
|
#define USE_HAL_DRIVER
|
||||||
#define __RTTHREAD__
|
#define __RTTHREAD__
|
||||||
|
|
|
@ -114,9 +114,6 @@
|
||||||
//#define FINSH_USING_MSH
|
//#define FINSH_USING_MSH
|
||||||
// </section>
|
// </section>
|
||||||
|
|
||||||
// <section name="LIBC" description="C Runtime library setting" default="always" >
|
|
||||||
// <bool name="RT_USING_NEWLIB" description="Using newlib library, only available under GNU GCC" default="true" />
|
|
||||||
// #define RT_USING_NEWLIB
|
|
||||||
// <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>
|
||||||
|
|
|
@ -114,9 +114,6 @@
|
||||||
//#define FINSH_USING_MSH
|
//#define FINSH_USING_MSH
|
||||||
// </section>
|
// </section>
|
||||||
|
|
||||||
// <section name="LIBC" description="C Runtime library setting" default="always" >
|
|
||||||
// <bool name="RT_USING_NEWLIB" description="Using newlib library, only available under GNU GCC" default="true" />
|
|
||||||
// #define RT_USING_NEWLIB
|
|
||||||
// <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,9 +4,9 @@ Import('rtconfig')
|
||||||
src = Glob('*.c')
|
src = Glob('*.c')
|
||||||
group = []
|
group = []
|
||||||
|
|
||||||
CPPDEFINES = ['RT_USING_ARM_LIBC', 'RT_USING_LIBC', '__STDC_LIMIT_MACROS']
|
|
||||||
|
|
||||||
if rtconfig.PLATFORM in ['armcc', 'armclang']:
|
if rtconfig.PLATFORM in ['armcc', 'armclang']:
|
||||||
|
CPPDEFINES = ['RT_USING_ARMLIBC', 'RT_USING_LIBC', '__STDC_LIMIT_MACROS']
|
||||||
|
AddDepend(['RT_USING_ARMLIBC', 'RT_USING_LIBC'])
|
||||||
group = DefineGroup('Compiler', src, depend = [''], CPPDEFINES = CPPDEFINES)
|
group = DefineGroup('Compiler', src, depend = [''], CPPDEFINES = CPPDEFINES)
|
||||||
|
|
||||||
Return('group')
|
Return('group')
|
||||||
|
|
|
@ -4,9 +4,10 @@ Import('rtconfig')
|
||||||
src = Glob('*.c')
|
src = Glob('*.c')
|
||||||
group = []
|
group = []
|
||||||
|
|
||||||
CPPDEFINES = ['RT_USING_DLIBC', 'RT_USING_LIBC', '_DLIB_ADD_EXTRA_SYMBOLS=0']
|
|
||||||
|
|
||||||
if rtconfig.PLATFORM in ['iccarm']:
|
if rtconfig.PLATFORM in ['iccarm']:
|
||||||
|
CPPDEFINES = ['RT_USING_DLIBC', 'RT_USING_LIBC', '_DLIB_ADD_EXTRA_SYMBOLS=0']
|
||||||
|
AddDepend(['RT_USING_DLIBC', 'RT_USING_LIBC'])
|
||||||
|
|
||||||
if GetDepend('DFS_USING_POSIX'):
|
if GetDepend('DFS_USING_POSIX'):
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
from iar import IARVersion
|
from iar import IARVersion
|
||||||
|
|
|
@ -17,11 +17,10 @@ if rtconfig.PLATFORM in ['gcc']:
|
||||||
print('Newlib version:' + GetNewLibVersion(rtconfig))
|
print('Newlib version:' + GetNewLibVersion(rtconfig))
|
||||||
|
|
||||||
# identify this is Newlib, and only enable POSIX.1-1990
|
# identify this is Newlib, and only enable POSIX.1-1990
|
||||||
CPPDEFINES = ['RT_USING_NEWLIB', 'RT_USING_LIBC', '_POSIX_C_SOURCE=1']
|
CPPDEFINES = ['RT_USING_NEWLIBC', 'RT_USING_LIBC', '_POSIX_C_SOURCE=1']
|
||||||
|
AddDepend(['RT_USING_NEWLIBC', 'RT_USING_LIBC'])
|
||||||
group = DefineGroup('Compiler', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS)
|
group = DefineGroup('Compiler', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS)
|
||||||
|
|
||||||
|
|
||||||
list = os.listdir(cwd)
|
list = os.listdir(cwd)
|
||||||
for d in list:
|
for d in list:
|
||||||
path = os.path.join(cwd, d)
|
path = os.path.join(cwd, d)
|
||||||
|
|
|
@ -33,7 +33,7 @@ int libc_system_init(void)
|
||||||
}
|
}
|
||||||
INIT_COMPONENT_EXPORT(libc_system_init);
|
INIT_COMPONENT_EXPORT(libc_system_init);
|
||||||
|
|
||||||
#if defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIB)
|
#if defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIBC)
|
||||||
#define STDIO_DEVICE_NAME_MAX 32
|
#define STDIO_DEVICE_NAME_MAX 32
|
||||||
static FILE* std_console = NULL;
|
static FILE* std_console = NULL;
|
||||||
int libc_stdio_set_console(const char* device_name, int mode)
|
int libc_stdio_set_console(const char* device_name, int mode)
|
||||||
|
@ -134,7 +134,7 @@ int libc_stdio_set_console(const char* device_name, int mode)
|
||||||
int libc_stdio_get_console(void) {
|
int libc_stdio_get_console(void) {
|
||||||
return std_fd;
|
return std_fd;
|
||||||
}
|
}
|
||||||
#endif /* defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIB) */
|
#endif /* defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIBC) */
|
||||||
|
|
||||||
int isatty(int fd)
|
int isatty(int fd)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from building import *
|
from building import *
|
||||||
|
|
||||||
src = Glob('*.c')
|
src = Glob('*.c')
|
||||||
group = DefineGroup('UTest', src, depend = ['RT_USING_NEWLIB', 'RT_USING_PTHREADS'])
|
group = DefineGroup('UTest', src, depend = ['RT_USING_NEWLIBC', 'RT_USING_PTHREADS'])
|
||||||
|
|
||||||
Return('group')
|
Return('group')
|
||||||
|
|
|
@ -593,7 +593,7 @@ rt_err_t rt_get_errno(void);
|
||||||
void rt_set_errno(rt_err_t no);
|
void rt_set_errno(rt_err_t no);
|
||||||
int *_rt_errno(void);
|
int *_rt_errno(void);
|
||||||
const char *rt_strerror(rt_err_t error);
|
const char *rt_strerror(rt_err_t error);
|
||||||
#if !defined(RT_USING_NEWLIB) && !defined(_WIN32)
|
#if !defined(RT_USING_NEWLIBC) && !defined(_WIN32)
|
||||||
#ifndef errno
|
#ifndef errno
|
||||||
#define errno *_rt_errno()
|
#define errno *_rt_errno()
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -467,7 +467,17 @@ def GetLocalDepend(options, depend):
|
||||||
return building
|
return building
|
||||||
|
|
||||||
def AddDepend(option):
|
def AddDepend(option):
|
||||||
|
if isinstance(option, str):
|
||||||
BuildOptions[option] = 1
|
BuildOptions[option] = 1
|
||||||
|
elif isinstance(option, list):
|
||||||
|
for obj in option:
|
||||||
|
if isinstance(obj, str):
|
||||||
|
BuildOptions[obj] = 1
|
||||||
|
else:
|
||||||
|
print('AddDepend arguements are illegal!')
|
||||||
|
else:
|
||||||
|
print('AddDepend arguements are illegal!')
|
||||||
|
|
||||||
|
|
||||||
def MergeGroup(src_group, group):
|
def MergeGroup(src_group, group):
|
||||||
src_group['src'] = src_group['src'] + group['src']
|
src_group['src'] = src_group['src'] + group['src']
|
||||||
|
|
Loading…
Reference in New Issue