diff --git a/bsp/mb9bf506r/SConscript b/bsp/mb9bf506r/SConscript
index d09b858deb..d9c64eb9f9 100644
--- a/bsp/mb9bf506r/SConscript
+++ b/bsp/mb9bf506r/SConscript
@@ -1,16 +1,12 @@
-import rtconfig
-Import('RTT_ROOT')
-from building import *
-
-src_bsp = ['application.c', 'startup.c', 'board.c', 'led.c', 'console.c']
-src_drv = ['serial.c', 'nand.c']
-
-if GetDepend('RT_USING_RTGUI'):
- src_drv += ['info.c']
-
-src = src_bsp + src_drv
-CPPPATH = [GetCurrentDir()]
-CPPDEFINES = []
-group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
-
-Return('group')
+from building import *
+
+cwd = GetCurrentDir()
+objs = []
+list = os.listdir(cwd)
+
+for d in list:
+ path = os.path.join(cwd, d)
+ if os.path.isfile(os.path.join(path, 'SConscript')):
+ objs = objs + SConscript(os.path.join(d, 'SConscript'))
+
+Return('objs')
diff --git a/bsp/mb9bf506r/SConstruct b/bsp/mb9bf506r/SConstruct
index ad6f3dcd6f..d3d392a19a 100644
--- a/bsp/mb9bf506r/SConstruct
+++ b/bsp/mb9bf506r/SConstruct
@@ -30,8 +30,6 @@ Export('rtconfig')
# prepare building environment
objs = PrepareBuilding(env, RTT_ROOT)
-objs = objs + SConscript('CMSIS/SConscript', variant_dir='build/bsp/Libraries', duplicate=0)
-
# build program
env.Program(TARGET, objs)
diff --git a/bsp/mb9bf506r/applications/SConscript b/bsp/mb9bf506r/applications/SConscript
new file mode 100644
index 0000000000..4fe38ed0cf
--- /dev/null
+++ b/bsp/mb9bf506r/applications/SConscript
@@ -0,0 +1,9 @@
+from building import *
+
+cwd = GetCurrentDir()
+src = Glob('*.c')
+CPPPATH = [cwd, str(Dir('#'))]
+
+group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
+
+Return('group')
diff --git a/bsp/mb9bf506r/application.c b/bsp/mb9bf506r/applications/application.c
similarity index 100%
rename from bsp/mb9bf506r/application.c
rename to bsp/mb9bf506r/applications/application.c
diff --git a/bsp/mb9bf506r/startup.c b/bsp/mb9bf506r/applications/startup.c
similarity index 100%
rename from bsp/mb9bf506r/startup.c
rename to bsp/mb9bf506r/applications/startup.c
diff --git a/bsp/mb9bf506r/drivers/SConscript b/bsp/mb9bf506r/drivers/SConscript
new file mode 100644
index 0000000000..6a3cfe2b47
--- /dev/null
+++ b/bsp/mb9bf506r/drivers/SConscript
@@ -0,0 +1,16 @@
+from building import *
+
+cwd = GetCurrentDir()
+src = Glob('*.c')
+
+# remove no need file.
+if GetDepend('RT_USING_LWIP') == False:
+ SrcRemove(src, 'emac.c')
+if GetDepend('RT_USING_DFS') == False:
+ SrcRemove(src, 'sd.c')
+
+CPPPATH = [cwd]
+
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
+
+Return('group')
diff --git a/bsp/mb9bf506r/board.c b/bsp/mb9bf506r/drivers/board.c
similarity index 100%
rename from bsp/mb9bf506r/board.c
rename to bsp/mb9bf506r/drivers/board.c
diff --git a/bsp/mb9bf506r/board.h b/bsp/mb9bf506r/drivers/board.h
similarity index 100%
rename from bsp/mb9bf506r/board.h
rename to bsp/mb9bf506r/drivers/board.h
diff --git a/bsp/mb9bf506r/console.c b/bsp/mb9bf506r/drivers/console.c
similarity index 100%
rename from bsp/mb9bf506r/console.c
rename to bsp/mb9bf506r/drivers/console.c
diff --git a/bsp/mb9bf506r/led.c b/bsp/mb9bf506r/drivers/led.c
similarity index 100%
rename from bsp/mb9bf506r/led.c
rename to bsp/mb9bf506r/drivers/led.c
diff --git a/bsp/mb9bf506r/led.h b/bsp/mb9bf506r/drivers/led.h
similarity index 100%
rename from bsp/mb9bf506r/led.h
rename to bsp/mb9bf506r/drivers/led.h
diff --git a/bsp/mb9bf506r/nand.c b/bsp/mb9bf506r/drivers/nand.c
similarity index 100%
rename from bsp/mb9bf506r/nand.c
rename to bsp/mb9bf506r/drivers/nand.c
diff --git a/bsp/mb9bf506r/nand.h b/bsp/mb9bf506r/drivers/nand.h
similarity index 100%
rename from bsp/mb9bf506r/nand.h
rename to bsp/mb9bf506r/drivers/nand.h
diff --git a/bsp/mb9bf506r/serial.c b/bsp/mb9bf506r/drivers/serial.c
similarity index 100%
rename from bsp/mb9bf506r/serial.c
rename to bsp/mb9bf506r/drivers/serial.c
diff --git a/bsp/mb9bf506r/serial.h b/bsp/mb9bf506r/drivers/serial.h
similarity index 100%
rename from bsp/mb9bf506r/serial.h
rename to bsp/mb9bf506r/drivers/serial.h
diff --git a/bsp/mb9bf506r/fm3_easy_kit.ewp b/bsp/mb9bf506r/project.ewp
similarity index 90%
rename from bsp/mb9bf506r/fm3_easy_kit.ewp
rename to bsp/mb9bf506r/project.ewp
index 6036a59faf..8799fb18f4 100644
--- a/bsp/mb9bf506r/fm3_easy_kit.ewp
+++ b/bsp/mb9bf506r/project.ewp
@@ -1,1894 +1,1917 @@
-
-
-
- 2
-
- Debug
-
- ARM
-
- 1
-
- General
- 3
-
- 20
- 1
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ICCARM
- 2
-
- 26
- 1
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AARM
- 2
-
- 8
- 1
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- OBJCOPY
- 0
-
- 1
- 1
- 1
-
-
-
-
-
-
-
-
- CUSTOM
- 3
-
-
-
-
-
-
- BICOMP
- 0
-
-
-
- BUILDACTION
- 1
-
-
-
-
-
-
- ILINK
- 0
-
- 11
- 1
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- IARCHIVE
- 0
-
- 0
- 1
- 1
-
-
-
-
-
-
- BILINK
- 0
-
-
-
-
- Release
-
- ARM
-
- 0
-
- General
- 3
-
- 20
- 1
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ICCARM
- 2
-
- 26
- 1
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AARM
- 2
-
- 8
- 1
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- OBJCOPY
- 0
-
- 1
- 1
- 0
-
-
-
-
-
-
-
-
- CUSTOM
- 3
-
-
-
-
-
-
- BICOMP
- 0
-
-
-
- BUILDACTION
- 1
-
-
-
-
-
-
- ILINK
- 0
-
- 11
- 1
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- IARCHIVE
- 0
-
- 0
- 1
- 0
-
-
-
-
-
-
- BILINK
- 0
-
-
-
-
- CMSIS
-
- $PROJ_DIR$\CMSIS\start_iar.S
-
-
- $PROJ_DIR$\CMSIS\system_mb9bf50x.c
-
-
-
- Filesystem
-
- $PROJ_DIR$\..\..\components\dfs\src\dfs.c
-
-
- $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\dfs_elm.c
-
-
- $PROJ_DIR$\..\..\components\dfs\src\dfs_file.c
-
-
- $PROJ_DIR$\..\..\components\dfs\src\dfs_fs.c
-
-
- $PROJ_DIR$\..\..\components\dfs\src\dfs_posix.c
-
-
- $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\ff.c
-
-
-
- Finsh
-
- $PROJ_DIR$\..\..\components\finsh\cmd.c
-
-
- $PROJ_DIR$\..\..\components\finsh\finsh_compiler.c
-
-
- $PROJ_DIR$\..\..\components\finsh\finsh_error.c
-
-
- $PROJ_DIR$\..\..\components\finsh\finsh_heap.c
-
-
- $PROJ_DIR$\..\..\components\finsh\finsh_init.c
-
-
- $PROJ_DIR$\..\..\components\finsh\finsh_node.c
-
-
- $PROJ_DIR$\..\..\components\finsh\finsh_ops.c
-
-
- $PROJ_DIR$\..\..\components\finsh\finsh_parser.c
-
-
- $PROJ_DIR$\..\..\components\finsh\finsh_token.c
-
-
- $PROJ_DIR$\..\..\components\finsh\finsh_var.c
-
-
- $PROJ_DIR$\..\..\components\finsh\finsh_vm.c
-
-
- $PROJ_DIR$\..\..\components\finsh\shell.c
-
-
- $PROJ_DIR$\..\..\components\finsh\symbol.c
-
-
-
- FM3
-
- $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\context_iar.S
-
-
- $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\cpuport.c
-
-
-
- Kernel
-
- $PROJ_DIR$\..\..\src\clock.c
-
-
- $PROJ_DIR$\..\..\src\device.c
-
-
- $PROJ_DIR$\..\..\src\idle.c
-
-
- $PROJ_DIR$\..\..\src\ipc.c
-
-
- $PROJ_DIR$\..\..\src\irq.c
-
-
- $PROJ_DIR$\..\..\src\kservice.c
-
-
- $PROJ_DIR$\..\..\src\mem.c
-
-
- $PROJ_DIR$\..\..\src\mempool.c
-
-
- $PROJ_DIR$\..\..\src\module.c
-
-
- $PROJ_DIR$\..\..\src\object.c
-
-
- $PROJ_DIR$\..\..\src\rtm.c
-
-
- $PROJ_DIR$\..\..\src\scheduler.c
-
-
- $PROJ_DIR$\..\..\src\slab.c
-
-
- $PROJ_DIR$\..\..\src\thread.c
-
-
- $PROJ_D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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AARM
+ 2
+
+ 8
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OBJCOPY
+ 0
+
+ 1
+ 1
+ 0
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ ILINK
+ 0
+
+ 11
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ IARCHIVE
+ 0
+
+ 0
+ 1
+ 0
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ Applications
+
+ $PROJ_DIR$\applications\application.c
+
+
+ $PROJ_DIR$\applications\startup.c
+
+
+
+ CMSIS
+
+ $PROJ_DIR$\CMSIS\core_cm3.c
+
+
+ $PROJ_DIR$\CMSIS\system_mb9bf50x.c
+
+
+ $PROJ_DIR$\CMSIS\start_iar.S
+
+
+
+ Drivers
+
+ $PROJ_DIR$\drivers\board.c
+
+
+ $PROJ_DIR$\drivers\console.c
+
+
+ $PROJ_DIR$\drivers\led.c
+
+
+ $PROJ_DIR$\drivers\nand.c
+
+
+ $PROJ_DIR$\drivers\serial.c
+
+
+
+ Kernel
+
+ $PROJ_DIR$\..\..\src\clock.c
+
+
+ $PROJ_DIR$\..\..\src\device.c
+
+
+ $PROJ_DIR$\..\..\src\idle.c
+
+
+ $PROJ_DIR$\..\..\src\ipc.c
+
+
+ $PROJ_DIR$\..\..\src\irq.c
+
+
+ $PROJ_DIR$\..\..\src\kservice.c
+
+
+ $PROJ_DIR$\..\..\src\mem.c
+
+
+ $PROJ_DIR$\..\..\src\memheap.c
+
+
+ $PROJ_DIR$\..\..\src\mempool.c
+
+
+ $PROJ_DIR$\..\..\src\object.c
+
+
+ $PROJ_DIR$\..\..\src\scheduler.c
+
+
+ $PROJ_DIR$\..\..\src\thread.c
+
+
+ $PROJ_DIR$\..\..\src\timer.c
+
+
+
+ CORTEX-M3
+
+ $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\cpuport.c
+
+
+ $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\context_iar.S
+
+
+ $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c
+
+
+ $PROJ_DIR$\..\..\libcpu\arm\common\div0.c
+
+
+ $PROJ_DIR$\..\..\libcpu\arm\common\showmem.c
+
+
+
+ Filesystem
+
+ $PROJ_DIR$\..\..\components\dfs\src\dfs.c
+
+
+ $PROJ_DIR$\..\..\components\dfs\src\dfs_fs.c
+
+
+ $PROJ_DIR$\..\..\components\dfs\src\dfs_file.c
+
+
+ $PROJ_DIR$\..\..\components\dfs\src\dfs_posix.c
+
+
+ $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\dfs_elm.c
+
+
+ $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\ff.c
+
+
+
+ finsh
+
+ $PROJ_DIR$\..\..\components\finsh\cmd.c
+
+
+ $PROJ_DIR$\..\..\components\finsh\finsh_compiler.c
+
+
+ $PROJ_DIR$\..\..\components\finsh\finsh_error.c
+
+
+ $PROJ_DIR$\..\..\components\finsh\finsh_heap.c
+
+
+ $PROJ_DIR$\..\..\components\finsh\finsh_init.c
+
+
+ $PROJ_DIR$\..\..\components\finsh\finsh_node.c
+
+
+ $PROJ_DIR$\..\..\components\finsh\finsh_ops.c
+
+
+ $PROJ_DIR$\..\..\components\finsh\finsh_parser.c
+
+
+ $PROJ_DIR$\..\..\components\finsh\finsh_token.c
+
+
+ $PROJ_DIR$\..\..\components\finsh\finsh_var.c
+
+
+ $PROJ_DIR$\..\..\components\finsh\finsh_vm.c
+
+
+ $PROJ_DIR$\..\..\components\finsh\shell.c
+
+
+ $PROJ_DIR$\..\..\components\finsh\symbol.c
+
+
+
diff --git a/bsp/mb9bf506r/fm3_easy_kit.eww b/bsp/mb9bf506r/project.eww
similarity index 68%
rename from bsp/mb9bf506r/fm3_easy_kit.eww
rename to bsp/mb9bf506r/project.eww
index bdaf802ebd..faa93f37cd 100644
--- a/bsp/mb9bf506r/fm3_easy_kit.eww
+++ b/bsp/mb9bf506r/project.eww
@@ -1,10 +1,10 @@
-
-
-
-
- $WS_DIR$\fm3_easy_kit.ewp
-
-
-
-
-
+
+
+
+
+ $WS_DIR$\project.ewp
+
+
+
+
+
diff --git a/bsp/mb9bf506r/project.uvopt b/bsp/mb9bf506r/project.uvopt
index c19657c825..08005113f2 100644
--- a/bsp/mb9bf506r/project.uvopt
+++ b/bsp/mb9bf506r/project.uvopt
@@ -172,7 +172,7 @@
- Startup
+ Applications
0
0
0
@@ -187,7 +187,7 @@
0
0
0
- .\application.c
+ applications\application.c
application.c
@@ -201,11 +201,18 @@
0
0
0
- .\startup.c
+ applications\startup.c
startup.c
+
+
+
+ CMSIS
+ 0
+ 0
+ 0
- 1
+ 2
3
1
0
@@ -215,11 +222,11 @@
0
0
0
- .\board.c
- board.c
+ CMSIS\core_cm3.c
+ core_cm3.c
- 1
+ 2
4
1
0
@@ -229,13 +236,13 @@
0
0
0
- .\led.c
- led.c
+ CMSIS\system_mb9bf50x.c
+ system_mb9bf50x.c
- 1
+ 2
5
- 1
+ 2
0
0
0
@@ -243,11 +250,18 @@
0
0
0
- .\console.c
- console.c
+ CMSIS\start_rvds.S
+ start_rvds.S
+
+
+
+ Drivers
+ 0
+ 0
+ 0
- 1
+ 3
6
1
0
@@ -257,11 +271,11 @@
0
0
0
- .\serial.c
- serial.c
+ drivers\board.c
+ board.c
- 1
+ 3
7
1
0
@@ -271,9 +285,51 @@
0
0
0
- .\nand.c
+ drivers\console.c
+ console.c
+
+
+ 3
+ 8
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ drivers\led.c
+ led.c
+
+
+ 3
+ 9
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ drivers\nand.c
nand.c
+
+ 3
+ 10
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ drivers\serial.c
+ serial.c
+
@@ -282,8 +338,8 @@
0
0
- 2
- 8
+ 4
+ 11
1
0
0
@@ -296,8 +352,8 @@
clock.c
- 2
- 9
+ 4
+ 12
1
0
0
@@ -310,8 +366,8 @@
device.c
- 2
- 10
+ 4
+ 13
1
0
0
@@ -324,8 +380,8 @@
idle.c
- 2
- 11
+ 4
+ 14
1
0
0
@@ -338,8 +394,8 @@
ipc.c
- 2
- 12
+ 4
+ 15
1
0
0
@@ -352,8 +408,8 @@
irq.c
- 2
- 13
+ 4
+ 16
1
0
0
@@ -366,8 +422,8 @@
kservice.c
- 2
- 14
+ 4
+ 17
1
0
0
@@ -380,8 +436,22 @@
mem.c
- 2
- 15
+ 4
+ 18
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ ..\..\src\memheap.c
+ memheap.c
+
+
+ 4
+ 19
1
0
0
@@ -394,8 +464,8 @@
mempool.c
- 2
- 16
+ 4
+ 20
1
0
0
@@ -408,8 +478,8 @@
object.c
- 2
- 17
+ 4
+ 21
1
0
0
@@ -422,8 +492,8 @@
scheduler.c
- 2
- 18
+ 4
+ 22
1
0
0
@@ -436,8 +506,8 @@
thread.c
- 2
- 19
+ 4
+ 23
1
0
0
@@ -457,8 +527,8 @@
0
0
- 3
- 20
+ 5
+ 24
1
0
0
@@ -471,8 +541,8 @@
cpuport.c
- 3
- 21
+ 5
+ 25
2
0
0
@@ -485,8 +555,8 @@
context_rvds.S
- 3
- 22
+ 5
+ 26
1
0
0
@@ -499,8 +569,8 @@
backtrace.c
- 3
- 23
+ 5
+ 27
1
0
0
@@ -513,8 +583,8 @@
div0.c
- 3
- 24
+ 5
+ 28
1
0
0
@@ -534,8 +604,8 @@
0
0
- 4
- 25
+ 6
+ 29
1
0
0
@@ -548,8 +618,8 @@
dfs.c
- 4
- 26
+ 6
+ 30
1
0
0
@@ -562,8 +632,8 @@
dfs_fs.c
- 4
- 27
+ 6
+ 31
1
0
0
@@ -576,8 +646,8 @@
dfs_file.c
- 4
- 28
+ 6
+ 32
1
0
0
@@ -590,8 +660,8 @@
dfs_posix.c
- 4
- 29
+ 6
+ 33
1
0
0
@@ -604,8 +674,8 @@
dfs_elm.c
- 4
- 30
+ 6
+ 34
1
0
0
@@ -625,8 +695,8 @@
0
0
- 5
- 31
+ 7
+ 35
1
0
0
@@ -639,8 +709,8 @@
cmd.c
- 5
- 32
+ 7
+ 36
1
0
0
@@ -653,8 +723,8 @@
finsh_compiler.c
- 5
- 33
+ 7
+ 37
1
0
0
@@ -667,8 +737,8 @@
finsh_error.c
- 5
- 34
+ 7
+ 38
1
0
0
@@ -681,8 +751,8 @@
finsh_heap.c
- 5
- 35
+ 7
+ 39
1
0
0
@@ -695,8 +765,8 @@
finsh_init.c
- 5
- 36
+ 7
+ 40
1
0
0
@@ -709,8 +779,8 @@
finsh_node.c
- 5
- 37
+ 7
+ 41
1
0
0
@@ -723,8 +793,8 @@
finsh_ops.c
- 5
- 38
+ 7
+ 42
1
0
0
@@ -737,8 +807,8 @@
finsh_parser.c
- 5
- 39
+ 7
+ 43
1
0
0
@@ -751,8 +821,8 @@
finsh_token.c
- 5
- 40
+ 7
+ 44
1
0
0
@@ -765,8 +835,8 @@
finsh_var.c
- 5
- 41
+ 7
+ 45
1
0
0
@@ -779,8 +849,8 @@
finsh_vm.c
- 5
- 42
+ 7
+ 46
1
0
0
@@ -793,8 +863,8 @@
shell.c
- 5
- 43
+ 7
+ 47
1
0
0
@@ -808,53 +878,4 @@
-
- CMSIS
- 0
- 0
- 0
-
- 6
- 44
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- CMSIS\core_cm3.c
- core_cm3.c
-
-
- 6
- 45
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- CMSIS\system_mb9bf50x.c
- system_mb9bf50x.c
-
-
- 6
- 46
- 2
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- CMSIS\start_rvds.S
- start_rvds.S
-
-
-
diff --git a/bsp/mb9bf506r/project.uvproj b/bsp/mb9bf506r/project.uvproj
index 9fff79cecd..fe10c8c00c 100644
--- a/bsp/mb9bf506r/project.uvproj
+++ b/bsp/mb9bf506r/project.uvproj
@@ -1,7 +1,10 @@
+
1.1
+
### uVision Project, (C) Keil Software
+
rtthread-fm3
@@ -9,28 +12,28 @@
ARM-ADS
- MB9BF506N
+ MB9BF506R
Fujitsu Semiconductors
IRAM(0x20000000-0x20007FFF) IRAM2(0x1FFF8000-0x1FFFFFFF) IROM(0x00000000-0x0007FFFF) CLOCK(4000000) CPUTYPE("Cortex-M3")
-
+
"Startup\Fujitsu\MB9B500\startup_MB9BF50x.s" ("Fujitsu MB9BF50x Startup Code")
UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0MB9BFx06_512 -FS00 -FL080000)
- 5215
- MB9BF506N.h
-
-
-
-
-
-
-
-
-
- SFD\Fujitsu\MB9B500\MB9BF506N.SFR
+ 5216
+ MB9BF506R.h
+
+
+
+
+
+
+
+
+
+ SFD\Fujitsu\MB9B500\MB9BF506R.SFR
0
-
-
-
+
+
+
Fujitsu\MB9B500\
Fujitsu\MB9B500\
@@ -54,29 +57,29 @@
0
0
-
-
+
+
0
0
0
0
-
-
+
+
0
0
0
0
-
-
+
+
0
0
0
-
+
0
@@ -90,8 +93,8 @@
0
0
3
-
-
+
+
SARMCM3.DLL
@@ -125,7 +128,7 @@
1
1
- 0
+ 1
1
1
1
@@ -135,18 +138,18 @@
0
7
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
Segger\JL2CM3.dll
@@ -161,7 +164,7 @@
Segger\JL2CM3.dll
"" ()
-
+
@@ -193,7 +196,7 @@
0
0
"Cortex-M3"
-
+
0
0
0
@@ -324,7 +327,7 @@
0x8000
-
+
1
@@ -340,10 +343,10 @@
0
0
-
-
-
- .;..\..\components\dfs;..\..\components\dfs\include;..\..\components\finsh;..\..\include;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m3;CMSIS
+
+
+
+ .;..\..\components\dfs;..\..\components\dfs\include;..\..\components\finsh;..\..\include;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m3;CMSIS;applications;drivers
@@ -355,10 +358,10 @@
0
0
-
-
-
-
+
+
+
+
@@ -370,65 +373,78 @@
0
0x08000000
0x20000000
-
-
-
- --keep __fsym_* --keep __vsym_*
-
-
+
+
+
+ --keep __fsym_* --keep __vsym_*
+
+
- Startup
+ Applications
application.c
1
- .\application.c
+ applications\application.c
-
-
startup.c
1
- .\startup.c
+ applications\startup.c
+
+
+ CMSIS
+
+
+ core_cm3.c
+ 1
+ CMSIS\core_cm3.c
+
+
+ system_mb9bf50x.c
+ 1
+ CMSIS\system_mb9bf50x.c
+
+
+ start_rvds.S
+ 2
+ CMSIS\start_rvds.S
+
+
+
+
+ Drivers
board.c
1
- .\board.c
+ drivers\board.c
-
-
-
- led.c
- 1
- .\led.c
-
-
-
console.c
1
- .\console.c
+ drivers\console.c
-
-
- serial.c
+ led.c
1
- .\serial.c
+ drivers\led.c
-
-
nand.c
1
- .\nand.c
+ drivers\nand.c
+
+
+ serial.c
+ 1
+ drivers\serial.c
@@ -440,85 +456,61 @@
1
..\..\src\clock.c
-
-
device.c
1
..\..\src\device.c
-
-
idle.c
1
..\..\src\idle.c
-
-
ipc.c
1
..\..\src\ipc.c
-
-
irq.c
1
..\..\src\irq.c
-
-
kservice.c
1
..\..\src\kservice.c
-
-
mem.c
1
..\..\src\mem.c
-
-
memheap.c
1
..\..\src\memheap.c
-
-
mempool.c
1
..\..\src\mempool.c
-
-
object.c
1
..\..\src\object.c
-
-
scheduler.c
1
..\..\src\scheduler.c
-
-
thread.c
1
..\..\src\thread.c
-
-
timer.c
1
@@ -534,29 +526,21 @@
1
..\..\libcpu\arm\cortex-m3\cpuport.c
-
-
context_rvds.S
2
..\..\libcpu\arm\cortex-m3\context_rvds.S
-
-
backtrace.c
1
..\..\libcpu\arm\common\backtrace.c
-
-
div0.c
1
..\..\libcpu\arm\common\div0.c
-
-
showmem.c
1
@@ -572,36 +556,26 @@
1
..\..\components\dfs\src\dfs.c
-
-
dfs_fs.c
1
..\..\components\dfs\src\dfs_fs.c
-
-
dfs_file.c
1
..\..\components\dfs\src\dfs_file.c
-
-
dfs_posix.c
1
..\..\components\dfs\src\dfs_posix.c
-
-
dfs_elm.c
1
..\..\components\dfs\filesystems\elmfat\dfs_elm.c
-
-
ff.c
1
@@ -617,85 +591,61 @@
1
..\..\components\finsh\cmd.c
-
-
finsh_compiler.c
1
..\..\components\finsh\finsh_compiler.c
-
-
finsh_error.c
1
..\..\components\finsh\finsh_error.c
-
-
finsh_heap.c
1
..\..\components\finsh\finsh_heap.c
-
-
finsh_init.c
1
..\..\components\finsh\finsh_init.c
-
-
finsh_node.c
1
..\..\components\finsh\finsh_node.c
-
-
finsh_ops.c
1
..\..\components\finsh\finsh_ops.c
-
-
finsh_parser.c
1
..\..\components\finsh\finsh_parser.c
-
-
finsh_token.c
1
..\..\components\finsh\finsh_token.c
-
-
finsh_var.c
1
..\..\components\finsh\finsh_var.c
-
-
finsh_vm.c
1
..\..\components\finsh\finsh_vm.c
-
-
shell.c
1
..\..\components\finsh\shell.c
-
-
symbol.c
1
@@ -703,31 +653,8 @@
-
- CMSIS
-
-
- core_cm3.c
- 1
- CMSIS\core_cm3.c
-
-
-
-
- system_mb9bf50x.c
- 1
- CMSIS\system_mb9bf50x.c
-
-
-
-
- start_rvds.S
- 2
- CMSIS\start_rvds.S
-
-
-
+
diff --git a/bsp/mb9bf506r/rtconfig.py b/bsp/mb9bf506r/rtconfig.py
index ccc29b05ff..30ae9033df 100644
--- a/bsp/mb9bf506r/rtconfig.py
+++ b/bsp/mb9bf506r/rtconfig.py
@@ -3,7 +3,7 @@ import os
# toolchains options
ARCH='arm'
CPU='cortex-m3'
-CROSS_TOOL='gcc'
+CROSS_TOOL='iar'
if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
@@ -41,7 +41,7 @@ if PLATFORM == 'gcc':
DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
CFLAGS = DEVICE
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
- LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-fm3.map,-cref,-u,Reset_Handler -T fm3_rom.ld'
+ LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-fm3.map,-cref,-u,Reset_Handler -T rtthread-mb9bf506.ld'
CPATH = ''
LPATH = ''
@@ -64,7 +64,7 @@ elif PLATFORM == 'armcc':
DEVICE = ' --device DARMSTM'
CFLAGS = DEVICE + ' --apcs=interwork'
AFLAGS = DEVICE
- LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-fm3.map --scatter fm3_rom.sct'
+ LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-fm3.map --scatter rtthread-mb9bf506.sct'
CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC'
LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB'
@@ -113,7 +113,7 @@ elif PLATFORM == 'iar':
AFLAGS += ' --fpu None'
AFLAGS += ' -I"' + IAR_PATH + '/arm/INC"'
- LFLAGS = ' --config mb9bf506.icf'
+ LFLAGS = ' --config rtthread-mb9bf506.icf'
LFLAGS += ' --semihosting'
LFLAGS += ' --entry __iar_program_start'
diff --git a/bsp/mb9bf506r/mb9bf506.icf b/bsp/mb9bf506r/rtthread-mb9bf506.icf
similarity index 93%
rename from bsp/mb9bf506r/mb9bf506.icf
rename to bsp/mb9bf506r/rtthread-mb9bf506.icf
index 63518e1ee9..66b859d099 100644
--- a/bsp/mb9bf506r/mb9bf506.icf
+++ b/bsp/mb9bf506r/rtthread-mb9bf506.icf
@@ -26,6 +26,7 @@ do not initialize { section .noinit };
keep { section FSymTab };
keep { section VSymTab };
+
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly };
diff --git a/bsp/mb9bf506r/fm3_rom.ld b/bsp/mb9bf506r/rtthread-mb9bf506.ld
similarity index 100%
rename from bsp/mb9bf506r/fm3_rom.ld
rename to bsp/mb9bf506r/rtthread-mb9bf506.ld
diff --git a/bsp/mb9bf506r/fm3_rom.sct b/bsp/mb9bf506r/rtthread-mb9bf506.sct
similarity index 100%
rename from bsp/mb9bf506r/fm3_rom.sct
rename to bsp/mb9bf506r/rtthread-mb9bf506.sct
diff --git a/bsp/mb9bf506r/template.ewp b/bsp/mb9bf506r/template.ewp
new file mode 100644
index 0000000000..40100eb5cb
--- /dev/null
+++ b/bsp/mb9bf506r/template.ewp
@@ -0,0 +1,1739 @@
+
+
+
+ 2
+
+ Debug
+
+ ARM
+
+ 1
+
+ General
+ 3
+
+ 20
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICCARM
+ 2
+
+ 26
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AARM
+ 2
+
+ 8
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OBJCOPY
+ 0
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
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/bsp/mb9bf506r/template.uvproj
+++ b/bsp/mb9bf506r/template.uvproj
@@ -12,14 +12,14 @@
ARM-ADS
- MB9BF506N
+ MB9BF506R
Fujitsu Semiconductors
IRAM(0x20000000-0x20007FFF) IRAM2(0x1FFF8000-0x1FFFFFFF) IROM(0x00000000-0x0007FFFF) CLOCK(4000000) CPUTYPE("Cortex-M3")
"Startup\Fujitsu\MB9B500\startup_MB9BF50x.s" ("Fujitsu MB9BF50x Startup Code")
UL2CM3(-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0MB9BFx06_512 -FS00 -FL080000)
- 5215
- MB9BF506N.h
+ 5216
+ MB9BF506R.h
@@ -29,7 +29,7 @@
- SFD\Fujitsu\MB9B500\MB9BF506N.SFR
+ SFD\Fujitsu\MB9B500\MB9BF506R.SFR
0