RT-Thread/rt-thread — pull request #39 by prife (2013-02-26 19:04:23+00:00)
Title: simulator: mingw and  app module support

Now, simulator support 3 toochain in rtconfig.py: msvc(win32), mingw(win32), gcc(linux)
msvc features:
kernel, finsh, rtgui, DFS/fat/uffs/dfs_win32/jffs2, lwip, app module
mingw features:
kernel, finsh, rtgui, DFS/fat/uffs/dfs_win32, app module
gcc:
kernel, finsh, rtgui, DFS/fat/uffs

app module:
1) build the master program, you can use MingW or MSVC
1. MingW
Please enable mingw in rtconfig.py, RT_USING_MODULE in rtconfig.h, then run
`scons -j4`
will build rtthread.dll and rtthread.exe
2. MSVC
you can also use MSVC to build simulator.
In order to use MSVC to create rtthread.dll, you had better create rtthread.def at frist, while it need MingW.
Firstly, enable mingw in rtconfig.py, run
`scons --def`
this will create rtthread.def, this file is needed by msvc
Then, change mingw to msvc in rtconfig.py, run
`scons -j4`
rtthread.dll, rthtread.lib and rtthread-win32.exe will built out by cl.

2) build app module
cd `testdll`, run
`scons --app=snake` or `scons --app=basicapp` or `scons --app=lable`
then snake.dll will be created in snake\build\, copy the dll to simulator\, run rtthread-win32.exe, in finsh, run command
`exec("/snake.dll")
PS1: `scons --app=xxx` just will use MSVC, not support MingW yet
PS2: you have to disalbe `//#define RTGUI_USING_CAST_CHECK` in rtgui_config.h to make sure snake can be alive.