mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-09 20:45:41 +08:00
add sdl driver for simulator; update scripts in simulator
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2415 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
1 parent
518f29e55b
commit
3112b09c8f
4 files changed
+327
-14
No files matched your search
@@ -7,6 +7,11 @@ if os.getenv('RTT_ROOT'):
|
||||
else:
|
||||
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
|
||||
|
||||
# if you want use the rtgui in the svn (in google code), you should
|
||||
# comment the following line
|
||||
RTT_RTGUI = os.path.normpath('F:/Project/git/rt-gui')
|
||||
#RTT_RTGUI =''
|
||||
|
||||
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
||||
from building import *
|
||||
|
||||
@@ -17,8 +22,6 @@ env = Environment()
|
||||
Export('RTT_ROOT')
|
||||
Export('rtconfig')
|
||||
|
||||
# prepare building environment
|
||||
|
||||
libs = Split('''
|
||||
kernel32
|
||||
msvcrt
|
||||
@@ -48,13 +51,29 @@ env.Append(LINKFLAGS=rtconfig.LFLAGS)
|
||||
env['LIBS']=libs
|
||||
env['CPPDEFINES']=definitions
|
||||
|
||||
objs = PrepareBuilding(env, RTT_ROOT)
|
||||
|
||||
# firemare library building script
|
||||
# objs = objs + SConscript( GetCurrentDir() + '/Libraries/SConscript', variant_dir='build/bsp/Libraries', duplicate=0)
|
||||
# prepare building environment
|
||||
if RTT_RTGUI:
|
||||
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False, remove_components=['rtgui'])
|
||||
objs += SConscript(os.path.join(RTT_RTGUI + '/components/rtgui', 'SConscript'),
|
||||
variant_dir='build/components/rtgui',
|
||||
duplicate=0)
|
||||
else:
|
||||
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
||||
|
||||
if GetDepend('RT_USING_RTGUI'):
|
||||
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
|
||||
sdl_lib = ['SDL', 'SDLmain']
|
||||
sdl_lib_path = os.path.normpath('SDL/lib/x86')
|
||||
sdl_include_path = os.path.normpath('SDL/include')
|
||||
env.Append(LIBS=sdl_lib)
|
||||
env.Append(LIBPATH=sdl_lib_path)
|
||||
env.Append(CPPPATH=sdl_include_path)
|
||||
|
||||
if RTT_RTGUI:
|
||||
objs = objs + SConscript(RTT_RTGUI+'/demo/examples/SConscript',
|
||||
variant_dir='build/examples/gui', duplicate=0)
|
||||
else:
|
||||
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript',
|
||||
variant_dir='build/examples/gui', duplicate=0)
|
||||
|
||||
# build program
|
||||
env.Program(TARGET, objs)
|
||||
|
||||
@@ -20,14 +20,10 @@ void rt_platform_init(void)
|
||||
#endif /* RT_USING_DFS */
|
||||
|
||||
#ifdef RT_USING_RTGUI
|
||||
/* initilize touch panel */
|
||||
rtgui_touch_hw_init("spi21");
|
||||
|
||||
/* initilize ra8875 lcd controller */
|
||||
ra8875_init();
|
||||
/* initilize sdl */
|
||||
sdl_start();
|
||||
|
||||
/* initilize key module */
|
||||
rt_hw_key_init();
|
||||
#endif /* RT_USING_RTGUI */
|
||||
|
||||
rt_thread_delay(50);
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -59,7 +59,7 @@ elif PLATFORM == 'cl':
|
||||
LINK = PREFIX + 'cl'
|
||||
AFLAGS = ''
|
||||
|
||||
CFLAGS = '/MT /ZI /Od /W 3 /WL /DMSVC /D_TIME_T_DEFINED'
|
||||
CFLAGS = '/MT /ZI /Od /W 3 /WL '
|
||||
#LFLAGS = '/SUBSYSTEM:WINDOWS /NODEFAULTLIB /MACHINE:X86 /DEBUG'
|
||||
LFLAGS = '/SUBSYSTEM:CONSOLE /NODEFAULTLIB /MACHINE:X86 '
|
||||
|
||||
|
||||
Reference in new issue
Block a user