summaryrefslogtreecommitdiff
path: root/bsp/simulator/rtconfig.py
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-10-21 04:33:52 +0000
committer[email protected] <[email protected]>2012-10-21 04:33:52 +0000
commitc3b741d010b488f9051e8fca5fe49396f334c826 (patch)
tree10c83da982d22d6b0dd3ebf2b8b1725aa8c32794 /bsp/simulator/rtconfig.py
parentd9b0bec989a0ef61b8e88147b618a46e763fb3b7 (diff)
add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version)
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2357 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/simulator/rtconfig.py')
-rw-r--r--bsp/simulator/rtconfig.py80
1 files changed, 80 insertions, 0 deletions
diff --git a/bsp/simulator/rtconfig.py b/bsp/simulator/rtconfig.py
new file mode 100644
index 0000000000..057332b705
--- /dev/null
+++ b/bsp/simulator/rtconfig.py
@@ -0,0 +1,80 @@
+# toolchains options
+ARCH='x86'
+#CPU='posix'
+CPU='win32'
+CROSS_TOOL='msvc' #win32
+
+# lcd panel options
+# 'FMT0371','ILI932X', 'SSD1289'
+# RT_USING_LCD_TYPE = 'SSD1289'
+
+# cross_tool provides the cross compiler
+# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
+if CROSS_TOOL == 'gcc':
+ PLATFORM = 'gcc'
+ EXEC_PATH = '/usr/bin/gcc'
+
+
+if CROSS_TOOL == '':
+ PLATFORM = 'gcc'
+ EXEC_PATH = '/usr/bin/gcc'
+
+if CROSS_TOOL == 'msvc':
+ PLATFORM = 'cl'
+ EXEC_PATH = ''
+
+BUILD = 'debug'
+#BUILD = ''
+
+if PLATFORM == 'gcc':
+ # toolchains
+ PREFIX = ''
+ 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 = ' -ffunction-sections -fdata-sections'
+ CFLAGS = DEVICE
+ AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
+ #LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-linux.map,-cref,-u,Reset_Handler -T stm32_rom.ld'
+ LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-linux.map -lpthread'
+
+ 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 == 'cl':
+ # toolchains
+ PREFIX = ''
+ TARGET_EXT = 'exe'
+ AS = PREFIX + 'cl'
+ CC = PREFIX + 'cl'
+ AR = PREFIX + 'cl'
+ LINK = PREFIX + 'cl'
+ AFLAGS = ''
+
+ CFLAGS = '/MT /ZI /Od /W 3 /WL /DMSVC /D_TIME_T_DEFINED'
+ #LFLAGS = '/SUBSYSTEM:WINDOWS /NODEFAULTLIB /MACHINE:X86 /DEBUG'
+ LFLAGS = '/SUBSYSTEM:CONSOLE /NODEFAULTLIB /MACHINE:X86 '
+
+ CPATH = ''
+ LPATH = ''
+
+ if BUILD == 'debug':
+ CFLAGS += ' /DEBUG'
+ else:
+ CFLAGS += ''
+
+ POST_ACTION = ''