diff options
| author | [email protected] <[email protected]> | 2011-01-16 13:44:04 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2011-01-16 13:44:04 +0000 |
| commit | ef0d03aaff0cd9f956d6f4374787ab9a9f557708 (patch) | |
| tree | 5a7f6484c93360d8673a49ea24473e3c4ade5643 | |
| parent | 0030a2d396187a9fb9e665fa2f535eeeedd601a5 (diff) | |
add UFFS compiler switch
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1244 bbd45198-f89e-11dd-88c7-29a3b14d5316
| -rw-r--r-- | bsp/mini2440/application.c | 15 | ||||
| -rw-r--r-- | bsp/mini2440/rtconfig.h | 1 | ||||
| -rw-r--r-- | bsp/mini2440/startup.c | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/bsp/mini2440/application.c b/bsp/mini2440/application.c index ed7e407722..b95e602eb4 100644 --- a/bsp/mini2440/application.c +++ b/bsp/mini2440/application.c @@ -31,6 +31,8 @@ #include <dfs_elm.h>
/* dfs Filesystem APIs */
#include <dfs_fs.h>
+/* dfs filesystem:UFFS filesystem init */
+#include <dfs_uffs.h>
#endif
#ifdef RT_USING_LWIP
@@ -94,6 +96,19 @@ void rt_init_thread_entry(void* parameter) libc_system_init("uart0");
#endif
#endif
+
+#if defined(RT_USING_UFFS)
+ {
+ /* init the uffs filesystem */
+ dfs_uffs_init();
+
+ /* mount flash device as flash directory */
+ if(dfs_mount("nand0", "/nand0", "uffs", 0, 0) == 0)
+ rt_kprintf("UFFS File System initialized!\n");
+ else
+ rt_kprintf("UFFS File System initialzation failed!\n");
+ }
+#endif
}
#endif
diff --git a/bsp/mini2440/rtconfig.h b/bsp/mini2440/rtconfig.h index ceb10a5ac3..71e55f074d 100644 --- a/bsp/mini2440/rtconfig.h +++ b/bsp/mini2440/rtconfig.h @@ -96,6 +96,7 @@ /* the max number of file length */
#define RT_DFS_ELM_MAX_LFN 32
/* #define RT_USING_DFS_YAFFS2 */
+#define RT_USING_UFFS
#define RT_USING_DFS_NFS
#define RT_NFS_HOST_EXPORT "192.168.1.5:/"
diff --git a/bsp/mini2440/startup.c b/bsp/mini2440/startup.c index db7b267f7b..24a6ef56ac 100644 --- a/bsp/mini2440/startup.c +++ b/bsp/mini2440/startup.c @@ -119,6 +119,9 @@ void rtthread_startup(void) #ifdef RT_USING_DFS rt_hw_sdcard_init(); +#ifdef RT_USING_UFFS
+ rt_hw_nand_init();
+#endif #endif /* rtc init */ |
