diff options
| author | [email protected] <[email protected]> | 2011-05-16 00:29:28 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2011-05-16 00:29:28 +0000 |
| commit | c99ca774a1fc441cf4f24a48a565ccd564d55cf0 (patch) | |
| tree | b1449d661531e472297745ac1fbacdd7085f9d2a /bsp/mini2440 | |
| parent | 7a6949f248d3f1139825451a672bc41d9efc6d52 (diff) | |
Modify the link mode, compile each component to static library first and then link them
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1405 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/mini2440')
| -rw-r--r-- | bsp/mini2440/SConstruct | 20 | ||||
| -rw-r--r-- | bsp/mini2440/calibration.c | 4 | ||||
| -rw-r--r-- | bsp/mini2440/rtconfig.h | 7 | ||||
| -rw-r--r-- | bsp/mini2440/rtconfig.py | 6 |
4 files changed, 24 insertions, 13 deletions
diff --git a/bsp/mini2440/SConstruct b/bsp/mini2440/SConstruct index 4910b1ea92..a6a9f37c61 100644 --- a/bsp/mini2440/SConstruct +++ b/bsp/mini2440/SConstruct @@ -15,6 +15,7 @@ TARGET = 'rtthread-mini2440.' + rtconfig.TARGET_EXT env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
+ CXX = rtconfig.CXX,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
@@ -22,20 +23,25 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) Export('RTT_ROOT')
Export('rtconfig')
-# prepare building environment
-objs = PrepareBuilding(env, RTT_ROOT)
+if rtconfig.PLATFORM == 'gcc':
+ start_obj = 'build/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU + '/start_gcc.o',
+elif rtconfig.PLATFORM == 'armcc':
+ start_obj = 'build/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU + '/start_rvds.o',
-if GetDepend('RT_USING_WEBSERVER'):
- objs = objs + SConscript(RTT_ROOT + '/components/net/webserver/SConscript', variant_dir='build/net/webserver', duplicate=0)
+# prepare building environment
+libs = PrepareBuilding(env, RTT_ROOT)
if GetDepend('RT_USING_RTGUI'):
- objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
+ libs = 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)
+# libs = libs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0)
# build program
-env.Program(TARGET, objs)
+if GetDepend('RT_USING_NEWLIB'):
+ env.Program(target = TARGET, source = [start_obj, 'build/components/libc/newlib/syscalls.o', 'build/components/libc/newlib/libc.o'], LIBS = libs)
+else:
+ env.Program(target = TARGET, source = start_obj, LIBS = libs)
# end building
EndBuilding(TARGET)
diff --git a/bsp/mini2440/calibration.c b/bsp/mini2440/calibration.c index d15270bffd..5e691ab23b 100644 --- a/bsp/mini2440/calibration.c +++ b/bsp/mini2440/calibration.c @@ -224,10 +224,12 @@ void calibration_init() 2048, 20, 5);
if (calibration_ptr->tid != RT_NULL) rt_thread_startup(calibration_ptr->tid);
}
+
+#ifdef RT_USING_FINSH
#include <finsh.h>
void calibration()
{
calibration_init();
}
FINSH_FUNCTION_EXPORT(calibration, perform touch calibration);
-
+#endif
diff --git a/bsp/mini2440/rtconfig.h b/bsp/mini2440/rtconfig.h index 7884d8596c..7ae26d9c15 100644 --- a/bsp/mini2440/rtconfig.h +++ b/bsp/mini2440/rtconfig.h @@ -96,12 +96,12 @@ /* use long file name feature */
#define RT_DFS_ELM_USE_LFN 1
/* the max number of file length */
-#define RT_DFS_ELM_MAX_LFN 32
+#define RT_DFS_ELM_MAX_LFN 128
/* #define RT_USING_DFS_YAFFS2 */
/* #define RT_USING_DFS_UFFS */
/* #define RT_USING_DFS_DEVFS */
-#define RT_USING_DFS_NFS
+/* #define RT_USING_DFS_NFS */
#define RT_NFS_HOST_EXPORT "192.168.1.5:/"
/* #define DFS_USING_WORKDIR */
@@ -220,11 +220,12 @@ /* RTGUI image options */
#define RTGUI_IMAGE_XPM
#define RTGUI_IMAGE_JPEG
+#define RTGUI_IMAGE_PNG
#define RTGUI_IMAGE_BMP
/* SECTION: FTK support */
/* using FTK support */
-/* #define RT_USING_FTK */
+/* #define RT_USING_FTK */
/*
* Note on FTK:
diff --git a/bsp/mini2440/rtconfig.py b/bsp/mini2440/rtconfig.py index dce03130e1..cf6637b481 100644 --- a/bsp/mini2440/rtconfig.py +++ b/bsp/mini2440/rtconfig.py @@ -11,16 +11,17 @@ CROSS_TOOL = 'gcc' if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
- EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
+ EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc'
- EXEC_PATH = 'E:/Keil'
+ EXEC_PATH = 'C:/Keil'
BUILD = 'debug'
if PLATFORM == 'gcc':
# toolchains
PREFIX = 'arm-none-eabi-'
CC = PREFIX + 'gcc'
+ CXX = PREFIX + 'g++'
AS = PREFIX + 'gcc'
AR = PREFIX + 'ar'
LINK = PREFIX + 'gcc'
@@ -48,6 +49,7 @@ if PLATFORM == 'gcc': elif PLATFORM == 'armcc':
# toolchains
CC = 'armcc'
+ CXX = 'armcc'
AS = 'armasm'
AR = 'armar'
LINK = 'armlink'
|
