rt-thread/bsp/simulator
goprife@gmail.com 68ead993ad add English version readme for bsp/simulator
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2363 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-10-21 09:37:29 +00:00
..
SConscript add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
SConstruct add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
application.c clean code under bsp/simulator 2012-10-21 05:55:36 +00:00
board.c add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
board.h add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
nand_sim.c add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
platform.c add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
readme.txt add readme.txt for bsp/simulator 2012-10-21 05:16:02 +00:00
readme_en.txt add English version readme for bsp/simulator 2012-10-21 09:37:29 +00:00
rtconfig.h add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
rtconfig.py update bsp/simulator, fix the include path in vs2005.vcproj, clean code in rtconfig.py 2012-10-21 04:50:50 +00:00
sd_sim.c add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
serial.c clean code under bsp/simulator 2012-10-21 05:55:36 +00:00
serial.h add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
sst25vfxx_mtd.h add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
sst25vfxx_mtd_sim.c clean code under bsp/simulator 2012-10-21 05:55:36 +00:00
startup.c add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
usart_sim.c add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
vc.sln add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
vc.suo add simulator bsp for win32, which can be compiled by visual studio (2005 or newer version) 2012-10-21 04:33:52 +00:00
vs2005.vcproj clean code under bsp/simulator 2012-10-21 05:55:36 +00:00

readme.txt

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

两种方法编译当前bsp

编译:
1). 使用Visual Studio(2005以上版本打开vs2005.vcproj
    编译后运行
   
2). 使用scons编译在当前目录中打开cmd输入
    scons -j4
    编译完成后会在当前目录下生成 rtthrad-win32.exe双击即可运行。

运行:
	编译后运行会弹出CMD命令行窗口可以看到控制台的输出信息如下所示

	 \ | /
	- RT -     Thread Operating System
	 / | \     1.1.0 build Oct 21 2012
	 2006 - 2012 Copyright by rt-thread team
	init jffs2 lock mutex okay
	hello, world
	finsh>>fatfs initialzation failed!
	uffs initialzation failed!
	jffs2 initialzation failed!
	thread 29e4 exit
	hello, world
	hello, world
	hello, world
	hello, world
	hello, world
	hello, world
	hello, world
	hello, world
	hello, world
	thread 2898 exit

	注意上面的信息显示fatfs/uffs/jffs2均挂载失败这是因为我们还没有为sd.bin创建fat分区并且sd上也没有目录用于挂载jffs2和uffs。

	并且此时当前bsp目录下新增了三个文件用于模拟sd卡nand flash与nor flash它们是
		sd.bin--模拟SD卡挂载fat大小为16M
		nand.bin-模拟nand flash挂载uffs参数page=2048+64bytesblock=64pages16M
		nor.bin--模拟nor flash挂载jffs2型号为sst25vf2M
	
	按下回车出现finsh然后输入如下命令格式化sd.bin

	finsh>>mkfs("elm", "sd0")
			0, 0x00000000
	finsh>>

	关闭程序重新运行此时可以看到fatfs挂载成功不过jffs2和uffs依然失败如下所示。
	 \ | /
	- RT -     Thread Operating System
	 / | \     1.1.0 build Oct 21 2012
	 2006 - 2012 Copyright by rt-thread team
	init jffs2 lock mutex okay
	hello, world
	finsh>>fatfs initialized!
	uffs initialzation failed!
	jffs2 initialzation failed!
	
	这是因为sd上还没有目录来用于挂载jffs2和uffs在finsh中输入如下命令在sd上创建nand与nor文件夹分别用于挂载uffs与jffs2文件系统。

	finsh>>mkdir("/nand")
			0, 0x00000000
	finsh>>mkdir("/nor")
			0, 0x00000000
	finsh>>
	然后再次关闭程序后重新运行此时可以看到jffs2与uffs挂载成功。	

	最终输出如下所示:

	 \ | /
	- RT -     Thread Operating System
	 / | \     1.1.0 build Oct 21 2012
	 2006 - 2012 Copyright by rt-thread team
	init jffs2 lock mutex okay
	hello, world
	finsh>>fatfs initialized!
	os  : system memory alloc 320 bytes
	flsh: ECC size 24
	flsh: UFFS consume spare data size 34
	os  : system memory alloc 83520 bytes
	os  : system memory alloc 52400 bytes
	os  : system memory alloc 2048 bytes
	tree: DIR 0, FILE 0, DATA 0
	uffs initialized!
	jffs2 initialized!
	thread 2fb4 exit
	hello, world
	hello, world
	hello, world
	hello, world
	hello, world
	hello, world
	hello, world
	hello, world
	hello, world
	thread 312c exit

Ok到现在一个完整的文件系统测试环境就搭建完毕了enjoy