simulator: update to support simulator for linux

This commit is contained in:
prife 2013-07-22 23:02:03 +08:00
parent b96b35613f
commit 8846ac8c40
4 changed files with 13 additions and 0 deletions

View File

@ -75,6 +75,7 @@ elif rtconfig.PLATFORM == 'mingw':
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
else: else:
TARGET = 'rtthread' TARGET = 'rtthread'
env['CC']=rtconfig.CC
env.Append(CCFLAGS=rtconfig.CFLAGS) env.Append(CCFLAGS=rtconfig.CFLAGS)
env.Append(LINKFLAGS=rtconfig.LFLAGS) env.Append(LINKFLAGS=rtconfig.LFLAGS)
env.Append(LIBS=['m']) env.Append(LIBS=['m'])

View File

@ -1,3 +1,4 @@
import sys
from building import * from building import *
cwd = GetCurrentDir() cwd = GetCurrentDir()
@ -16,6 +17,9 @@ if GetDepend('RT_USING_DFS_WINSHAREDIR') == False:
SrcRemove(src, 'dfs_win32.c') SrcRemove(src, 'dfs_win32.c')
if GetDepend('RT_USING_MODULE') == False: if GetDepend('RT_USING_MODULE') == False:
SrcRemove(src, ['module_win32.c']) SrcRemove(src, ['module_win32.c'])
if sys.platform[0:5]=="linux": #check whether under linux
SrcRemove(src, ['module_win32.c', 'dfs_win32.c'])
CPPPATH = [cwd] CPPPATH = [cwd]
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)

View File

@ -81,6 +81,8 @@ static pthread_t OSKey_Thread;
void rt_hw_usart_init(void) void rt_hw_usart_init(void)
{ {
int res; int res;
rt_hw_serial_init(&serial1, RT_CONSOLE_DEVICE_NAME);
res = pthread_create(&OSKey_Thread, NULL, &ThreadforKeyGet, NULL); res = pthread_create(&OSKey_Thread, NULL, &ThreadforKeyGet, NULL);
if (res) if (res)
{ {

View File

@ -79,6 +79,12 @@ SECTIONS
__vsymtab_end = .; __vsymtab_end = .;
} }
. = ALIGN(4); . = ALIGN(4);
rti_fn : {
__rt_init_start = .;
KEEP(*(SORT(.rti_fn*)))
__rt_init_end = .;
}
. = ALIGN(4);
/* setction information for finsh shell end */ /* setction information for finsh shell end */
.eh_frame_hdr : { *(.eh_frame_hdr) } .eh_frame_hdr : { *(.eh_frame_hdr) }