Improve the Device File System of the POSIX compatibility

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1017 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong 2010-10-19 08:20:42 +00:00
parent e7fb6e7be2
commit ad3d42106a
3 changed files with 13 additions and 11 deletions

View File

@ -8,12 +8,15 @@ RT_USING_DFS = False
RT_USING_DFS_ELMFAT = False RT_USING_DFS_ELMFAT = False
RT_USING_DFS_YAFFS2 = False RT_USING_DFS_YAFFS2 = False
RT_USING_DFS_NFS = False RT_USING_DFS_NFS = False
RT_USING_DFS_ROMFS = False
RT_USING_LWIP = False RT_USING_LWIP = False
RT_USING_WEBSERVER = False RT_USING_WEBSERVER = False
RT_USING_RTGUI = False RT_USING_RTGUI = False
RT_USING_MODBUS = False RT_USING_MODBUS = False
RT_USING_MODULE = False RT_USING_MODULE = False
RT_USING_FTK = False RT_USING_FTK = False
RT_USING_NEWLIB = False
RT_USING_PTHREAD = False
# parse rtconfig.h to get used component # parse rtconfig.h to get used component
PreProcessor = SCons.cpp.PreProcessor() PreProcessor = SCons.cpp.PreProcessor()
@ -27,6 +30,9 @@ rtconfig_ns = PreProcessor.cpp_namespace
if rtconfig_ns.has_key('RT_USING_NEWLIB'): if rtconfig_ns.has_key('RT_USING_NEWLIB'):
RT_USING_NEWLIB = True RT_USING_NEWLIB = True
if rtconfig_ns.has_key('RT_USING_PTHREAD'):
RT_USING_PTHREAD = True
# finsh shell options # finsh shell options
if rtconfig_ns.has_key('RT_USING_FINSH'): if rtconfig_ns.has_key('RT_USING_FINSH'):
RT_USING_FINSH = True RT_USING_FINSH = True
@ -43,6 +49,8 @@ if rtconfig_ns.has_key('RT_USING_DFS'):
RT_USING_DFS_YAFFS2 = True RT_USING_DFS_YAFFS2 = True
if rtconfig_ns.has_key('RT_USING_DFS_NFS'): if rtconfig_ns.has_key('RT_USING_DFS_NFS'):
RT_USING_DFS_NFS = True RT_USING_DFS_NFS = True
if rtconfig_ns.has_key('RT_USING_DFS_ROMFS'):
RT_USING_DFS_ROMFS = True
# lwip options # lwip options
if rtconfig_ns.has_key('RT_USING_LWIP'): if rtconfig_ns.has_key('RT_USING_LWIP'):
@ -74,7 +82,7 @@ CROSS_TOOL = 'gcc'
if CROSS_TOOL == 'gcc': if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc' PLATFORM = 'gcc'
EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
elif CROSS_TOOL == 'keil': elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = 'E:/Keil' EXEC_PATH = 'E:/Keil'
@ -136,9 +144,6 @@ elif PLATFORM == 'armcc':
CFLAGS += ' -O2' CFLAGS += ' -O2'
RT_USING_MINILIBC = False RT_USING_MINILIBC = False
if RT_USING_FINSH:
CFLAGS += ' -D FINSH_USING_SYMTAB -DFINSH_USING_DESCRIPTION'
LFLAGS += ' --keep __fsym_* --keep __vsym_*'
if RT_USING_WEBSERVER: if RT_USING_WEBSERVER:
CFLAGS += ' -DWEBS -DUEMF -DRTT -D__NO_FCNTL=1 -DRT_USING_WEBSERVER' CFLAGS += ' -DWEBS -DUEMF -DRTT -D__NO_FCNTL=1 -DRT_USING_WEBSERVER'
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET' POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'

View File

@ -25,6 +25,9 @@
/*@{*/ /*@{*/
extern struct rt_thread *rt_current_thread; extern struct rt_thread *rt_current_thread;
#ifdef RT_USING_FINSH
extern long list_thread(void);
#endif
/** /**
* this function will show registers of CPU * this function will show registers of CPU
@ -61,8 +64,6 @@ void rt_hw_trap_udef(struct rt_hw_register *regs)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
list_thread(); list_thread();
#endif #endif
while (1);
rt_hw_cpu_shutdown(); rt_hw_cpu_shutdown();
} }
@ -101,8 +102,6 @@ void rt_hw_trap_pabt(struct rt_hw_register *regs)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
list_thread(); list_thread();
#endif #endif
while (1);
rt_hw_cpu_shutdown(); rt_hw_cpu_shutdown();
} }
@ -124,8 +123,6 @@ void rt_hw_trap_dabt(struct rt_hw_register *regs)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
list_thread(); list_thread();
#endif #endif
while (1);
rt_hw_cpu_shutdown(); rt_hw_cpu_shutdown();
} }

View File

@ -308,7 +308,7 @@ rt_module_t rt_module_load_from_file(const rt_uint8_t* name, const char* filenam
{ {
int fd, length; int fd, length;
struct rt_module* module; struct rt_module* module;
struct _stat s; struct stat s;
char *buffer; char *buffer;
stat(filename, &s); stat(filename, &s);