From ac1073049287779e3dd223cf02bf261f097be2d8 Mon Sep 17 00:00:00 2001 From: bernard Date: Mon, 29 Jul 2013 14:50:12 +0800 Subject: [PATCH 1/2] fix O_APPEND write issue in RAMFS --- components/dfs/filesystems/ramfs/dfs_ramfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/dfs/filesystems/ramfs/dfs_ramfs.c b/components/dfs/filesystems/ramfs/dfs_ramfs.c index a4552fe38c..117528c1e2 100644 --- a/components/dfs/filesystems/ramfs/dfs_ramfs.c +++ b/components/dfs/filesystems/ramfs/dfs_ramfs.c @@ -264,7 +264,10 @@ int dfs_ramfs_open(struct dfs_fd *file) file->data = dirent; file->size = dirent->size; - file->pos = 0; + if (file->flags & DFS_O_APPEND) + file->pos = file->size; + else + file->pos = 0; return DFS_STATUS_OK; } From dce51ddf053e4173c420dccd5b22d80f57e18a2e Mon Sep 17 00:00:00 2001 From: bernard Date: Fri, 9 Aug 2013 22:26:22 +0800 Subject: [PATCH 2/2] add buildlib for Keil MDK --- tools/building.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/building.py b/tools/building.py index 3a34788809..56b4ebdc8d 100644 --- a/tools/building.py +++ b/tools/building.py @@ -50,6 +50,11 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ rtconfig.EXEC_PATH = rtconfig.EXEC_PATH.replace('bin40', 'armcc/bin') Env['LINKFLAGS']=Env['LINKFLAGS'].replace('RV31', 'armcc') + # reset AR command flags + env['ARCOM'] = '$AR --create $TARGET $SOURCES' + env['LIBPREFIX'] = '' + env['LIBSUFFIX'] = '_rvds.lib' + # patch for win32 spawn if env['PLATFORM'] == 'win32' and rtconfig.PLATFORM == 'gcc': win32_spawn = Win32Spawn() @@ -269,6 +274,7 @@ def DefineGroup(name, src, depend, **parameters): group = parameters group['name'] = name + group['path'] = GetCurrentDir() if type(src) == type(['src1', 'str2']): group['src'] = File(src) else: @@ -327,7 +333,6 @@ def DoBuilding(target, objects): # check whether special buildlib option lib_name = GetOption('buildlib') if lib_name: - print lib_name # build library with special component for Group in Projects: if Group['name'] == lib_name: