rtt-f030/bsp/simulator
goprife@gmail.com 2eefeab242 update app code in simulator
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2421 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-11-16 12:21:28 +00:00
..
SDL add SDL library to simulator 2012-11-15 15:56:46 +00:00
applications update app code in simulator 2012-11-16 12:21:28 +00:00
drivers update bsp/simulator/SConscript to auto remove drivers according to rtconfig.h 2012-11-16 07:15:03 +00:00
pcap merge prife's patch for exclusive access pcap driver. 2012-11-13 01:44:34 +00:00
SConscript change simulator directory organization 2012-11-04 05:49:49 +00:00
SConstruct lib_path should be list no string in bsp/simulator/SConstruct 2012-11-16 06:42:28 +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 pcap driver(for win32) in simulator porting. 2012-11-04 16:29:36 +00:00
rtconfig.py add sdl driver for simulator; update scripts in simulator 2012-11-15 16:31:51 +00:00
template.vcproj add template.vcproj for bsp/simulator; modify SConstruct for auto-generation 2012-11-07 05:32:29 +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