提交 ffd65c60 编写于 作者: D dzzxzz@gmail.com

using components initialize in mb9bf506 branch

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2101 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 cbd32a0c
...@@ -15,12 +15,17 @@ ...@@ -15,12 +15,17 @@
/** /**
* @addtogroup FM3 * @addtogroup FM3
*/ */
/*@{*/ /*@{*/
#include <rtthread.h> #include <rtthread.h>
#include "board.h" #include "board.h"
#include "led.h" #include "led.h"
#ifdef RT_USING_COMPONENTS_INIT
#include <components_init.h>
#endif
#ifdef RT_USING_DFS #ifdef RT_USING_DFS
/* dfs init */ /* dfs init */
#include <dfs_init.h> #include <dfs_init.h>
...@@ -32,40 +37,34 @@ ...@@ -32,40 +37,34 @@
void rt_init_thread_entry(void *parameter) void rt_init_thread_entry(void *parameter)
{ {
/* Filesystem Initialization */ /* LED Initialization */
#ifdef RT_USING_DFS rt_hw_led_init();
{
/* init the device filesystem */
dfs_init();
#ifdef RT_USING_DFS_ELMFAT
/* init the elm chan FatFs filesystam*/
elm_init();
/* mount ELM FatFs on NAND flash as root directory */ #ifdef RT_USING_COMPONENTS_INIT
if (dfs_mount("nand", "/", "elm", 0, 0) == 0) /* initialization RT-Thread Components */
{ rt_components_init();
rt_kprintf("File System initialized!\n");
}
else
rt_kprintf("File System initialzation failed!\n");
#endif #endif
}
/* Filesystem Initialization */
#ifdef RT_USING_DFS
/* mount nand fat partition 1 as root directory */
if (dfs_mount("nand", "/", "elm", 0, 0) == 0)
rt_kprintf("File System initialized!\n");
else
rt_kprintf("File System init failed!\n");
#endif #endif
/* LED Initialization */
rt_hw_led_init();
} }
int rt_application_init() int rt_application_init(void)
{ {
rt_thread_t tid; rt_thread_t tid;
tid = rt_thread_create("init", tid = rt_thread_create("init",
rt_init_thread_entry, RT_NULL, rt_init_thread_entry, RT_NULL,
2048, 8, 20); 2048, RT_THREAD_PRIORITY_MAX/3, 20);
if (tid != RT_NULL) rt_thread_startup(tid); if (tid != RT_NULL) rt_thread_startup(tid);
return 0; return 0;
} }
/*@}*/ /*@}*/
...@@ -17,25 +17,13 @@ ...@@ -17,25 +17,13 @@
#include "board.h" #include "board.h"
#ifdef RT_USING_FINSH
#include <finsh.h>
#endif
/** /**
* @addtogroup FM3 * @addtogroup FM3
*/ */
extern struct serial_device uart0;
extern struct rt_device uart0_device;
extern struct serial_device uart2;
extern struct rt_device uart2_device;
/*@{*/ /*@{*/
extern int rt_application_init(void); extern int rt_application_init(void);
#ifdef RT_USING_FINSH
extern void finsh_system_init(void);
#endif
#ifdef __CC_ARM #ifdef __CC_ARM
extern int Image$$RW_IRAM1$$ZI$$Limit; extern int Image$$RW_IRAM1$$ZI$$Limit;
...@@ -50,17 +38,12 @@ extern int __bss_end; ...@@ -50,17 +38,12 @@ extern int __bss_end;
*/ */
void rtthread_startup(void) void rtthread_startup(void)
{ {
/* init board */ /* initialize board */
rt_hw_board_init(); rt_hw_board_init();
/* show version */ /* show version */
rt_show_version(); rt_show_version();
/* init tick */
rt_system_tick_init();
/* init timer system */
rt_system_timer_init();
#ifdef RT_USING_HEAP #ifdef RT_USING_HEAP
#ifdef __CC_ARM #ifdef __CC_ARM
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)FM3_SRAM_END); rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)FM3_SRAM_END);
...@@ -75,27 +58,23 @@ void rtthread_startup(void) ...@@ -75,27 +58,23 @@ void rtthread_startup(void)
/* init scheduler system */ /* init scheduler system */
rt_system_scheduler_init(); rt_system_scheduler_init();
#ifdef RT_USING_DEVICE
#ifdef RT_USING_DFS #ifdef RT_USING_DFS
#ifdef RT_USING_DFS_UFFS #ifdef RT_USING_DFS_UFFS
rt_hw_nand_init(); rt_hw_nand_init();
#endif #endif
#endif
/* initialize all device */
rt_device_init_all();
#endif #endif
/* init application */ /* initialize application */
rt_application_init(); rt_application_init();
#ifdef RT_USING_FINSH /* initialize timer thread */
/* init finsh */ rt_system_timer_thread_init();
finsh_system_init();
#ifdef RT_USING_DEVICE
finsh_set_device(FINSH_DEVICE_NAME);
#endif
#endif
/* init timer thread */
rt_system_timer_thread_init();
/* init idle thread */ /* initialize idle thread */
rt_thread_idle_init(); rt_thread_idle_init();
/* start scheduler */ /* start scheduler */
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#ifndef __BOARD_H__ #ifndef __BOARD_H__
#define __BOARD_H__ #define __BOARD_H__
#include "serial.h"
//Internal SRAM memory size[Kbytes] <8-64> //Internal SRAM memory size[Kbytes] <8-64>
//MB9BF500 : 32 //MB9BF500 : 32
//MB9BF504 : 32 //MB9BF504 : 32
......
...@@ -294,16 +294,15 @@ ...@@ -294,16 +294,15 @@
<option> <option>
<name>CCIncludePath2</name> <name>CCIncludePath2</name>
<state></state> <state></state>
<state>$PROJ_DIR$\..\..\components\dfs\include</state>
<state>$PROJ_DIR$\libraries\CMSIS\Include</state> <state>$PROJ_DIR$\libraries\CMSIS\Include</state>
<state>$PROJ_DIR$\..\..\include</state> <state>$PROJ_DIR$\..\..\include</state>
<state>$PROJ_DIR$\drivers</state> <state>$PROJ_DIR$\drivers</state>
<state>$PROJ_DIR$\..\..\components\dfs</state>
<state>$PROJ_DIR$\.</state> <state>$PROJ_DIR$\.</state>
<state>$PROJ_DIR$\applications</state> <state>$PROJ_DIR$\applications</state>
<state>$PROJ_DIR$\libraries\CMSIS\RTOS</state> <state>$PROJ_DIR$\libraries\CMSIS\RTOS</state>
<state>$PROJ_DIR$\..\..\libcpu\arm\cortex-m3</state> <state>$PROJ_DIR$\..\..\libcpu\arm\cortex-m3</state>
<state>$PROJ_DIR$\..\..\libcpu\arm\common</state> <state>$PROJ_DIR$\..\..\libcpu\arm\common</state>
<state>$PROJ_DIR$\..\..\components\init</state>
<state>$PROJ_DIR$\..\..\components\finsh</state> <state>$PROJ_DIR$\..\..\components\finsh</state>
<state>$PROJ_DIR$\libraries\Device\FUJISTU\MB9BF50x\Include</state> <state>$PROJ_DIR$\libraries\Device\FUJISTU\MB9BF50x\Include</state>
</option> </option>
...@@ -1212,16 +1211,15 @@ ...@@ -1212,16 +1211,15 @@
<option> <option>
<name>CCIncludePath2</name> <name>CCIncludePath2</name>
<state></state> <state></state>
<state>$PROJ_DIR$\..\..\components\dfs\include</state>
<state>$PROJ_DIR$\libraries\CMSIS\Include</state> <state>$PROJ_DIR$\libraries\CMSIS\Include</state>
<state>$PROJ_DIR$\..\..\include</state> <state>$PROJ_DIR$\..\..\include</state>
<state>$PROJ_DIR$\drivers</state> <state>$PROJ_DIR$\drivers</state>
<state>$PROJ_DIR$\..\..\components\dfs</state>
<state>$PROJ_DIR$\.</state> <state>$PROJ_DIR$\.</state>
<state>$PROJ_DIR$\applications</state> <state>$PROJ_DIR$\applications</state>
<state>$PROJ_DIR$\libraries\CMSIS\RTOS</state> <state>$PROJ_DIR$\libraries\CMSIS\RTOS</state>
<state>$PROJ_DIR$\..\..\libcpu\arm\cortex-m3</state> <state>$PROJ_DIR$\..\..\libcpu\arm\cortex-m3</state>
<state>$PROJ_DIR$\..\..\libcpu\arm\common</state> <state>$PROJ_DIR$\..\..\libcpu\arm\common</state>
<state>$PROJ_DIR$\..\..\components\init</state>
<state>$PROJ_DIR$\..\..\components\finsh</state> <state>$PROJ_DIR$\..\..\components\finsh</state>
<state>$PROJ_DIR$\libraries\Device\FUJISTU\MB9BF50x\Include</state> <state>$PROJ_DIR$\libraries\Device\FUJISTU\MB9BF50x\Include</state>
</option> </option>
...@@ -1856,6 +1854,12 @@ ...@@ -1856,6 +1854,12 @@
<name>$PROJ_DIR$\libraries\Device\FUJISTU\MB9BF50x\Source\system_mb9bf50x.c</name> <name>$PROJ_DIR$\libraries\Device\FUJISTU\MB9BF50x\Source\system_mb9bf50x.c</name>
</file> </file>
</group> </group>
<group>
<name>Components</name>
<file>
<name>$PROJ_DIR$\..\..\components\init\components_init.c</name>
</file>
</group>
<group> <group>
<name>CORTEX-M3</name> <name>CORTEX-M3</name>
<file> <file>
...@@ -1892,27 +1896,6 @@ ...@@ -1892,27 +1896,6 @@
<name>$PROJ_DIR$\drivers\serial.c</name> <name>$PROJ_DIR$\drivers\serial.c</name>
</file> </file>
</group> </group>
<group>
<name>Filesystem</name>
<file>
<name>$PROJ_DIR$\..\..\components\dfs\src\dfs.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\dfs_elm.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\dfs\src\dfs_file.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\dfs\src\dfs_fs.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\dfs\src\dfs_posix.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\ff.c</name>
</file>
</group>
<group> <group>
<name>finsh</name> <name>finsh</name>
<file> <file>
......
...@@ -185,8 +185,8 @@ ...@@ -185,8 +185,8 @@
<Focus>0</Focus> <Focus>0</Focus>
<ColumnNumber>48</ColumnNumber> <ColumnNumber>48</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<TopLine>43</TopLine> <TopLine>3</TopLine>
<CurrentLine>43</CurrentLine> <CurrentLine>12</CurrentLine>
<bDave2>0</bDave2> <bDave2>0</bDave2>
<PathWithFileName>applications\application.c</PathWithFileName> <PathWithFileName>applications\application.c</PathWithFileName>
<FilenameWithoutPath>application.c</FilenameWithoutPath> <FilenameWithoutPath>application.c</FilenameWithoutPath>
...@@ -199,8 +199,8 @@ ...@@ -199,8 +199,8 @@
<Focus>0</Focus> <Focus>0</Focus>
<ColumnNumber>0</ColumnNumber> <ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<TopLine>78</TopLine> <TopLine>66</TopLine>
<CurrentLine>109</CurrentLine> <CurrentLine>89</CurrentLine>
<bDave2>0</bDave2> <bDave2>0</bDave2>
<PathWithFileName>applications\startup.c</PathWithFileName> <PathWithFileName>applications\startup.c</PathWithFileName>
<FilenameWithoutPath>startup.c</FilenameWithoutPath> <FilenameWithoutPath>startup.c</FilenameWithoutPath>
...@@ -311,7 +311,7 @@ ...@@ -311,7 +311,7 @@
<Focus>0</Focus> <Focus>0</Focus>
<ColumnNumber>0</ColumnNumber> <ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<TopLine>138</TopLine> <TopLine>139</TopLine>
<CurrentLine>149</CurrentLine> <CurrentLine>149</CurrentLine>
<bDave2>0</bDave2> <bDave2>0</bDave2>
<PathWithFileName>libraries\Device\FUJISTU\MB9BF50x\Source\ARM\startup_mb9bf50x.S</PathWithFileName> <PathWithFileName>libraries\Device\FUJISTU\MB9BF50x\Source\ARM\startup_mb9bf50x.S</PathWithFileName>
...@@ -360,8 +360,8 @@ ...@@ -360,8 +360,8 @@
<Focus>0</Focus> <Focus>0</Focus>
<ColumnNumber>0</ColumnNumber> <ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<TopLine>140</TopLine> <TopLine>141</TopLine>
<CurrentLine>159</CurrentLine> <CurrentLine>148</CurrentLine>
<bDave2>0</bDave2> <bDave2>0</bDave2>
<PathWithFileName>..\..\src\idle.c</PathWithFileName> <PathWithFileName>..\..\src\idle.c</PathWithFileName>
<FilenameWithoutPath>idle.c</FilenameWithoutPath> <FilenameWithoutPath>idle.c</FilenameWithoutPath>
...@@ -586,7 +586,7 @@ ...@@ -586,7 +586,7 @@
</Group> </Group>
<Group> <Group>
<GroupName>Filesystem</GroupName> <GroupName>finsh</GroupName>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel> <cbSel>0</cbSel>
...@@ -601,103 +601,12 @@ ...@@ -601,103 +601,12 @@
<TopLine>0</TopLine> <TopLine>0</TopLine>
<CurrentLine>0</CurrentLine> <CurrentLine>0</CurrentLine>
<bDave2>0</bDave2> <bDave2>0</bDave2>
<PathWithFileName>..\..\components\dfs\src\dfs.c</PathWithFileName>
<FilenameWithoutPath>dfs.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>29</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\components\dfs\src\dfs_fs.c</PathWithFileName>
<FilenameWithoutPath>dfs_fs.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>30</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\components\dfs\src\dfs_file.c</PathWithFileName>
<FilenameWithoutPath>dfs_file.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>31</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\components\dfs\src\dfs_posix.c</PathWithFileName>
<FilenameWithoutPath>dfs_posix.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>32</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\components\dfs\filesystems\elmfat\dfs_elm.c</PathWithFileName>
<FilenameWithoutPath>dfs_elm.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>33</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\components\dfs\filesystems\elmfat\ff.c</PathWithFileName>
<FilenameWithoutPath>ff.c</FilenameWithoutPath>
</File>
</Group>
<Group>
<GroupName>finsh</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>34</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\components\finsh\cmd.c</PathWithFileName> <PathWithFileName>..\..\components\finsh\cmd.c</PathWithFileName>
<FilenameWithoutPath>cmd.c</FilenameWithoutPath> <FilenameWithoutPath>cmd.c</FilenameWithoutPath>
</File> </File>
<File> <File>
<GroupNumber>7</GroupNumber> <GroupNumber>6</GroupNumber>
<FileNumber>35</FileNumber> <FileNumber>29</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
...@@ -710,8 +619,8 @@ ...@@ -710,8 +619,8 @@
<FilenameWithoutPath>finsh_compiler.c</FilenameWithoutPath> <FilenameWithoutPath>finsh_compiler.c</FilenameWithoutPath>
</File> </File>
<File> <File>
<GroupNumber>7</GroupNumber> <GroupNumber>6</GroupNumber>
<FileNumber>36</FileNumber> <FileNumber>30</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
...@@ -724,8 +633,8 @@ ...@@ -724,8 +633,8 @@
<FilenameWithoutPath>finsh_error.c</FilenameWithoutPath> <FilenameWithoutPath>finsh_error.c</FilenameWithoutPath>
</File> </File>
<File> <File>
<GroupNumber>7</GroupNumber> <GroupNumber>6</GroupNumber>
<FileNumber>37</FileNumber> <FileNumber>31</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
...@@ -738,8 +647,8 @@ ...@@ -738,8 +647,8 @@
<FilenameWithoutPath>finsh_heap.c</FilenameWithoutPath> <FilenameWithoutPath>finsh_heap.c</FilenameWithoutPath>
</File> </File>
<File> <File>
<GroupNumber>7</GroupNumber> <GroupNumber>6</GroupNumber>
<FileNumber>38</FileNumber> <FileNumber>32</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
...@@ -752,8 +661,8 @@ ...@@ -752,8 +661,8 @@
<FilenameWithoutPath>finsh_init.c</FilenameWithoutPath> <FilenameWithoutPath>finsh_init.c</FilenameWithoutPath>
</File> </File>
<File> <File>
<GroupNumber>7</GroupNumber> <GroupNumber>6</GroupNumber>
<FileNumber>39</FileNumber> <FileNumber>33</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
...@@ -766,8 +675,8 @@ ...@@ -766,8 +675,8 @@
<FilenameWithoutPath>finsh_node.c</FilenameWithoutPath> <FilenameWithoutPath>finsh_node.c</FilenameWithoutPath>
</File> </File>
<File> <File>
<GroupNumber>7</GroupNumber> <GroupNumber>6</GroupNumber>
<FileNumber>40</FileNumber> <FileNumber>34</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
...@@ -780,8 +689,8 @@ ...@@ -780,8 +689,8 @@
<FilenameWithoutPath>finsh_ops.c</FilenameWithoutPath> <FilenameWithoutPath>finsh_ops.c</FilenameWithoutPath>
</File> </File>
<File> <File>
<GroupNumber>7</GroupNumber> <GroupNumber>6</GroupNumber>
<FileNumber>41</FileNumber> <FileNumber>35</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
...@@ -794,8 +703,8 @@ ...@@ -794,8 +703,8 @@
<FilenameWithoutPath>finsh_parser.c</FilenameWithoutPath> <FilenameWithoutPath>finsh_parser.c</FilenameWithoutPath>
</File> </File>
<File> <File>
<GroupNumber>7</GroupNumber> <GroupNumber>6</GroupNumber>
<FileNumber>42</FileNumber> <FileNumber>36</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
...@@ -808,8 +717,8 @@ ...@@ -808,8 +717,8 @@
<FilenameWithoutPath>finsh_token.c</FilenameWithoutPath> <FilenameWithoutPath>finsh_token.c</FilenameWithoutPath>
</File> </File>
<File> <File>
<GroupNumber>7</GroupNumber> <GroupNumber>6</GroupNumber>
<FileNumber>43</FileNumber> <FileNumber>37</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
...@@ -822,8 +731,8 @@ ...@@ -822,8 +731,8 @@
<FilenameWithoutPath>finsh_var.c</FilenameWithoutPath> <FilenameWithoutPath>finsh_var.c</FilenameWithoutPath>
</File> </File>
<File> <File>
<GroupNumber>7</GroupNumber> <GroupNumber>6</GroupNumber>
<FileNumber>44</FileNumber> <FileNumber>38</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
...@@ -836,8 +745,8 @@ ...@@ -836,8 +745,8 @@
<FilenameWithoutPath>finsh_vm.c</FilenameWithoutPath> <FilenameWithoutPath>finsh_vm.c</FilenameWithoutPath>
</File> </File>
<File> <File>
<GroupNumber>7</GroupNumber> <GroupNumber>6</GroupNumber>
<FileNumber>45</FileNumber> <FileNumber>39</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
...@@ -850,8 +759,8 @@ ...@@ -850,8 +759,8 @@
<FilenameWithoutPath>shell.c</FilenameWithoutPath> <FilenameWithoutPath>shell.c</FilenameWithoutPath>
</File> </File>
<File> <File>
<GroupNumber>7</GroupNumber> <GroupNumber>6</GroupNumber>
<FileNumber>46</FileNumber> <FileNumber>40</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
...@@ -865,4 +774,25 @@ ...@@ -865,4 +774,25 @@
</File> </File>
</Group> </Group>
<Group>
<GroupName>Components</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>41</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>15</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>3</TopLine>
<CurrentLine>20</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\components\init\components_init.c</PathWithFileName>
<FilenameWithoutPath>components_init.c</FilenameWithoutPath>
</File>
</Group>
</ProjectOpt> </ProjectOpt>
...@@ -348,7 +348,7 @@ ...@@ -348,7 +348,7 @@
<MiscControls></MiscControls> <MiscControls></MiscControls>
<Define></Define> <Define></Define>
<Undefine></Undefine> <Undefine></Undefine>
<IncludePath>.;..\..\components\dfs;..\..\components\dfs\include;..\..\components\finsh;..\..\include;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m3;applications;drivers;libraries\CMSIS\Include;libraries\CMSIS\RTOS;libraries\Device\FUJISTU\MB9BF50x\Include</IncludePath> <IncludePath>.;..\..\components\finsh;..\..\components\init;..\..\include;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m3;applications;drivers;libraries\CMSIS\Include;libraries\CMSIS\RTOS;libraries\Device\FUJISTU\MB9BF50x\Include</IncludePath>
</VariousControls> </VariousControls>
</Cads> </Cads>
<Aads> <Aads>
...@@ -545,41 +545,6 @@ ...@@ -545,41 +545,6 @@
</File> </File>
</Files> </Files>
</Group> </Group>
<Group>
<GroupName>Filesystem</GroupName>
<Files>
<File>
<FileName>dfs.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\dfs\src\dfs.c</FilePath>
</File>
<File>
<FileName>dfs_fs.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\dfs\src\dfs_fs.c</FilePath>
</File>
<File>
<FileName>dfs_file.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\dfs\src\dfs_file.c</FilePath>
</File>
<File>
<FileName>dfs_posix.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\dfs\src\dfs_posix.c</FilePath>
</File>
<File>
<FileName>dfs_elm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\dfs\filesystems\elmfat\dfs_elm.c</FilePath>
</File>
<File>
<FileName>ff.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\dfs\filesystems\elmfat\ff.c</FilePath>
</File>
</Files>
</Group>
<Group> <Group>
<GroupName>finsh</GroupName> <GroupName>finsh</GroupName>
<Files> <Files>
...@@ -650,6 +615,16 @@ ...@@ -650,6 +615,16 @@
</File> </File>
</Files> </Files>
</Group> </Group>
<Group>
<GroupName>Components</GroupName>
<Files>
<File>
<FileName>components_init.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\components\init\components_init.c</FilePath>
</File>
</Files>
</Group>
</Groups> </Groups>
</Target> </Target>
</Targets> </Targets>
......
...@@ -2,92 +2,128 @@ ...@@ -2,92 +2,128 @@
#ifndef __RTTHREAD_CFG_H__ #ifndef __RTTHREAD_CFG_H__
#define __RTTHREAD_CFG_H__ #define __RTTHREAD_CFG_H__
/* RT_NAME_MAX */ // <RDTConfigurator URL="http://www.rt-thread.com/eclipse">
#define RT_NAME_MAX 8
// <integer name="RT_NAME_MAX" description="Maximal size of kernel object name length" default="6" />
/* RT_ALIGN_SIZE */ #define RT_NAME_MAX 8
#define RT_ALIGN_SIZE 8 // <integer name="RT_ALIGN_SIZE" description="Alignment size for CPU architecture data access" default="4" />
#define RT_ALIGN_SIZE 8
/* PRIORITY_MAX */ // <integer name="RT_THREAD_PRIORITY_MAX" description="Maximal level of thread priority" default="2">
// <item description="8">8</item>
// <item description="32">32</item>
// <item description="256">256</item>
// </integer>
#define RT_THREAD_PRIORITY_MAX 32 #define RT_THREAD_PRIORITY_MAX 32
// <integer name="RT_TICK_PER_SECOND" description="OS tick per second" default="100" />
/* Tick per Second */ #define RT_TICK_PER_SECOND 100
#define RT_TICK_PER_SECOND 100 // <section name="RT_DEBUG" description="Kernel Debug Configuration" default="true" >
// #define RT_DEBUG
/* SECTION: RT_DEBUG */ // <bool name="RT_THREAD_DEBUG" description="Thread debug enable" default="false" />
/* Thread Debug */ // #define RT_THREAD_DEBUG
#define RT_DEBUG // <bool name="RT_USING_OVERFLOW_CHECK" description="Thread stack over flow detect" default="true" />
#define RT_USING_OVERFLOW_CHECK #define RT_USING_OVERFLOW_CHECK
// </section>
/* Using Hook */ // <bool name="RT_USING_HOOK" description="Using hook functions" default="true" />
#define RT_USING_HOOK #define RT_USING_HOOK
// <section name="RT_USING_TIMER_SOFT" description="Using software timer which will start a thread to handle soft-timer" default="true" >
/* SECTION: IPC */ // #define RT_USING_TIMER_SOFT
/* Using Semaphore */ // <integer name="RT_TIMER_THREAD_PRIO" description="The priority level of timer thread" default="4" />
#define RT_TIMER_THREAD_PRIO 8
// <integer name="RT_TIMER_THREAD_STACK_SIZE" description="The stack size of timer thread" default="512" />
#define RT_TIMER_THREAD_STACK_SIZE 512
// <integer name="RT_TIMER_TICK_PER_SECOND" description="The soft-timer tick per second" default="10" />
#define RT_TIMER_TICK_PER_SECOND 10
// </section>
// <section name="IPC" description="Inter-Thread communication" default="always" >
// <bool name="RT_USING_SEMAPHORE" description="Using semaphore in the system" default="true" />
#define RT_USING_SEMAPHORE #define RT_USING_SEMAPHORE
// <bool name="RT_USING_MUTEX" description="Using mutex in the system" default="true" />
/* Using Mutex */
#define RT_USING_MUTEX #define RT_USING_MUTEX
// <bool name="RT_USING_EVENT" description="Using event group in the system" default="true" />
/* Using Event */
#define RT_USING_EVENT #define RT_USING_EVENT
// <bool name="RT_USING_MAILBOX" description="Using mailbox in the system" default="true" />
/* Using MailBox */
#define RT_USING_MAILBOX #define RT_USING_MAILBOX
// <bool name="RT_USING_MESSAGEQUEUE" description="Using message queue in the system" default="true" />
/* Using Message Queue */
#define RT_USING_MESSAGEQUEUE #define RT_USING_MESSAGEQUEUE
// </section>
/* SECTION: Memory Management */ // <section name="MM" description="Memory Management" default="always" >
/* Using Memory Pool Management*/ // <bool name="RT_USING_MEMPOOL" description="Using Memory Pool Management in the system" default="true" />
#define RT_USING_MEMPOOL #define RT_USING_MEMPOOL
// <bool name="RT_USING_HEAP" description="Using Dynamic Heap Management in the system" default="true" />
/* Using Dynamic Heap Management */
#define RT_USING_HEAP #define RT_USING_HEAP
// <bool name="RT_USING_SMALL_MEM" description="Optimizing for small memory" default="false" />
/* Using Small MM */
#define RT_USING_SMALL_MEM #define RT_USING_SMALL_MEM
// <bool name="RT_USING_SLAB" description="Using SLAB memory management for large memory" default="false" />
// #define RT_USING_SLAB
// </section>
/* SECTION: Device System */ // <section name="RT_USING_DEVICE" description="Using Device Driver Framework" default="true" >
/* Using Device System */
#define RT_USING_DEVICE #define RT_USING_DEVICE
/* RT_USING_UART */ // <bool name="RT_USING_UART0" description="Using UART0" default="true" />
#define RT_USING_UART0 #define RT_USING_UART0
// <integer name="RT_UART_RX_BUFFER_SIZE" description="The buffer size for UART reception" default="64" />
#define RT_UART_RX_BUFFER_SIZE 64 #define RT_UART_RX_BUFFER_SIZE 64
// </section>
/* SECTION: Console options */ // <section name="RT_USING_CONSOLE" description="Using console" default="true" >
/* #define RT_TINY_SIZE */
#define RT_USING_CONSOLE #define RT_USING_CONSOLE
/* the buffer size of console */ // <integer name="RT_CONSOLEBUF_SIZE" description="The buffer size for console output" default="128" />
#define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLEBUF_SIZE 128
/* the device used by console */ // <string name="RT_CONSOLE_DEVICE_NAME" description="The device name for console" default="uart" />
#define RT_CONSOLE_DEVICE_NAME "uart0" #define RT_CONSOLE_DEVICE_NAME "uart0"
// </section>
/* SECTION: finsh, a C-Express shell */ // <bool name="RT_USING_COMPONENTS_INIT" description="Using RT-Thread components initialization" default="true" />
/* Using FinSH as Shell*/ #define RT_USING_COMPONENTS_INIT
// <section name="RT_USING_FINSH" description="Using finsh as shell, which is a C-Express shell" default="true" >
#define RT_USING_FINSH #define RT_USING_FINSH
/* Using symbol table */ // <bool name="FINSH_USING_SYMTAB" description="Using symbol table in finsh shell" default="true" />
#define FINSH_USING_SYMTAB #define FINSH_USING_SYMTAB
// <bool name="FINSH_USING_DESCRIPTION" description="Keeping description in symbol table" default="true" />
#define FINSH_USING_DESCRIPTION #define FINSH_USING_DESCRIPTION
#define FINSH_THREAD_STACK_SIZE 1024 // <integer name="FINSH_THREAD_STACK_SIZE" description="The stack size for finsh thread" default="4096" />
#define FINSH_DEVICE_NAME RT_CONSOLE_DEVICE_NAME #define FINSH_THREAD_STACK_SIZE 4096
// </section>
/* SECTION: Device filesystem support */
/* using DFS support */ // <section name="LIBC" description="C Runtime library setting" default="always" >
#define RT_USING_DFS // <bool name="RT_USING_NEWLIB" description="Using newlib library, only available under GNU GCC" default="true" />
// #define RT_USING_NEWLIB
// <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
// #define RT_USING_PTHREADS
// </section>
// <section name="RT_USING_DFS" description="Device file system" default="true" >
// #define RT_USING_DFS
// <bool name="DFS_USING_WORKDIR" description="Using working directory" default="true" />
// #define DFS_USING_WORKDIR
// <integer name="DFS_FILESYSTEMS_MAX" description="The maximal number of mounted file system" default="4" />
#define DFS_FILESYSTEMS_MAX 2
// <integer name="DFS_FD_MAX" description="The maximal number of opened files" default="4" />
#define DFS_FD_MAX 4
// <bool name="RT_USING_DFS_ELMFAT" description="Using ELM FatFs" default="true" />
#define RT_USING_DFS_ELMFAT #define RT_USING_DFS_ELMFAT
/* use long file name feature */ // <integer name="RT_DFS_ELM_USE_LFN" description="Support long file name" default="0">
/* #define RT_DFS_ELM_USE_LFN */ // <item description="LFN1">1</item>
/* the max number of file length */ // <item description="LFN1">2</item>
#define RT_DFS_ELM_MAX_LFN 32 // </integer>
/* #define RT_USING_DFS_UFFS */ #define RT_DFS_ELM_USE_LFN 1
/* #define RT_USING_DFS_DEVFS */ // <integer name="RT_DFS_ELM_MAX_LFN" description="Maximal size of file name length" default="256" />
#define RT_DFS_ELM_MAX_LFN 64
/* the max number of mounted filesystem */ // <bool name="RT_USING_DFS_YAFFS2" description="Using YAFFS2" default="false" />
#define DFS_FILESYSTEMS_MAX 2 // #define RT_USING_DFS_YAFFS2
/* the max number of opened files */ // <bool name="RT_USING_DFS_UFFS" description="Using UFFS" default="false" />
#define DFS_FD_MAX 8 // #define RT_USING_DFS_UFFS
/* using working directory */ // <bool name="RT_USING_DFS_DEVFS" description="Using devfs for device objects" default="true" />
#define DFS_USING_WORKDIR // #define RT_USING_DFS_DEVFS
// <bool name="RT_USING_DFS_NFS" description="Using NFS v3 client file system" default="false" />
// #define RT_USING_DFS_NFS
// <string name="RT_NFS_HOST_EXPORT" description="NFSv3 host export" default="192.168.1.5:/" />
#define RT_NFS_HOST_EXPORT "192.168.1.5:/"
// </section>
// </RDTConfigurator>
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册