diff options
| author | qiuyiuestc <[email protected]> | 2010-09-13 00:58:56 +0000 |
|---|---|---|
| committer | qiuyiuestc <[email protected]> | 2010-09-13 00:58:56 +0000 |
| commit | e78285e76f9a1ea6197e2d121a81cef443aa84dc (patch) | |
| tree | dad13c5a6e21fc6b46b1b460298e31c236a24993 /components/module/rtconfig.py | |
| parent | 322b7d21db6a41282f97246ae4408bfabe91248c (diff) | |
add tetris module
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@904 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/module/rtconfig.py')
| -rw-r--r-- | components/module/rtconfig.py | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/components/module/rtconfig.py b/components/module/rtconfig.py new file mode 100644 index 0000000000..2340038cfb --- /dev/null +++ b/components/module/rtconfig.py @@ -0,0 +1,83 @@ +import SCons.cpp
+
+# component options
+
+# toolchains options
+ARCH = 'arm'
+CPU = 's3c24x0'
+TextBase = '0x30000000'
+
+CROSS_TOOL = 'gcc'
+
+if CROSS_TOOL == 'gcc':
+ PLATFORM = 'gcc'
+ EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
+elif CROSS_TOOL == 'keil':
+ PLATFORM = 'armcc'
+ EXEC_PATH = 'E:/Keil'
+BUILD = 'debug'
+
+if PLATFORM == 'gcc':
+ # toolchains
+ PREFIX = 'arm-none-eabi-'
+ CC = PREFIX + 'gcc'
+ AS = PREFIX + 'gcc'
+ AR = PREFIX + 'ar'
+ LINK = PREFIX + 'gcc'
+ TARGET_EXT = 'axf'
+ SIZE = PREFIX + 'size'
+ OBJDUMP = PREFIX + 'objdump'
+ OBJCPY = PREFIX + 'objcopy'
+
+ DEVICE = ' -mcpu=arm920t'
+ CFLAGS = DEVICE
+ AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' + ' -DTEXT_BASE=' + TextBase
+ LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread_mini2440.map,-cref,-u,_start -T mini2440_ram.ld' + ' -Ttext ' + TextBase
+
+ CPATH = ''
+ LPATH = ''
+
+ if BUILD == 'debug':
+ CFLAGS += ' -O0 -gdwarf-2'
+ AFLAGS += ' -gdwarf-2'
+ else:
+ CFLAGS += ' -O2'
+
+ POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
+
+elif PLATFORM == 'armcc':
+ # toolchains
+ CC = 'armcc'
+ AS = 'armasm'
+ AR = 'armar'
+ LINK = 'armlink'
+ TARGET_EXT = 'axf'
+
+ DEVICE = ' --device DARMSS9'
+ CFLAGS = DEVICE + ' --apcs=interwork --diag_suppress=870'
+ AFLAGS = DEVICE
+ LFLAGS = DEVICE + ' --strict --info sizes --info totals --info unused --info veneers --list rtthread-mini2440.map --ro-base 0x30000000 --entry Entry_Point --first Entry_Point'
+
+ CFLAGS += ' -I"' + EXEC_PATH + '/ARM/RV31/INC"'
+ LFLAGS += ' --libpath "' + EXEC_PATH + '/ARM/RV31/LIB"' + ' --keep __RTMsym_*'
+
+ EXEC_PATH += '/arm/bin40/'
+
+ if BUILD == 'debug':
+ CFLAGS += ' -g -O0'
+ AFLAGS += ' -g'
+ else:
+ CFLAGS += ' -O2'
+
+ POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
+
+elif PLATFORM == 'iar':
+ # toolchains
+ CC = 'armcc'
+ AS = 'armasm'
+ AR = 'armar'
+ LINK = 'armlink'
+
+ CFLAGS = ''
+ AFLAGS = ''
+ LFLAGS = ''
|
