rt-thread-official/bsp/simulator
Meco Man 7fc707d99c [sal][kconfig] 重新梳理sal的依赖关系 2022-05-16 10:02:22 +08:00
..
SDL2 [simulator] upgrade SDL2.0 to 2.0.20 2022-04-13 22:37:59 +08:00
applications [sal][kconfig] 重新梳理sal的依赖关系 2022-05-16 10:02:22 +08:00
disk create disk/{ad, nor, nand in bsp/simulator 2013-01-28 18:05:19 +08:00
drivers [simulator] avoid conflicts between winsock.h and sys/time.h 2022-05-16 10:02:22 +08:00
pcap [simulator] 手动-自动格式化整理 2021-03-20 22:39:32 +08:00
.config [simulator] 解决simulator模拟器不能挂在sd卡的问题,并更新文档 2022-04-11 14:07:55 +08:00
.gdbinit add .gdbinit to bsp/simulator 2013-01-22 17:45:06 +08:00
.gitignore Update .gitignore file. 2017-12-14 09:58:40 +08:00
Kconfig [sal][kconfig] 重新梳理sal的依赖关系 2022-05-16 10:02:22 +08:00
SConscript Re-normalizing the repo 2013-01-08 22:40:58 +08:00
SConstruct [update] CFLAGS 2021-12-17 14:28:40 +08:00
createdef.py simulator: add createdef.py to generate def file for VS 2013-10-14 22:53:59 +08:00
dummy.c [simulator] 手动-自动格式化整理 2021-03-20 22:39:32 +08:00
gcc.ld simulator: update to support simulator for linux 2013-07-22 23:02:03 +08:00
mingw.ld simulator: update code for new component initialization support on mingw 2013-07-11 23:31:34 +08:00
readme.md [fcntl] create new fcntl.h file for vs (#5860) 2022-04-24 10:52:57 +08:00
readme_en.md [simulator] 解决simulator模拟器不能挂在sd卡的问题,并更新文档 2022-04-11 14:07:55 +08:00
rtconfig.h [simulator] 解决simulator模拟器不能挂在sd卡的问题,并更新文档 2022-04-11 14:07:55 +08:00
rtconfig.py [bsp][simulator] update project 2021-10-29 09:59:45 -04:00
rtconfig_project.h improve libc time and MSVC simulator (#5775) 2022-04-07 14:24:11 +08:00
template_vs2005.vcproj scons script: support to generate vs2012 project xml 2013-10-01 15:37:34 +08:00
template_vs2012.vcxproj [simulator] 解决““Gm”选项已否决,并将在将来的版本中移除”的警告 2022-01-08 17:40:26 -05:00

readme_en.md

compile bsp: There are two ways. 1). Visual Studio(2005 or newer version), open vs2005.vcproj with visual studio compile, then run it.

2). use scons, open cmd console, change to current path, then do scons -j4 scons will compile this bsp with cl(the compiler of vs), then rtthrad-win32.exe will be created in current directory. Run it by double click it.

run: Run, then you can see the following message on CMD window.

 \ | /
- 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

Then you may note that, three file (sd.bin, nand.bin, nor.bin) are created. These three files are used to simulate as SD CARD, nand flash and nor flash. sd.bin--SD card, fatfs, 16M nand.bin--nand flash, uffs, page=2048+64bytes, block=64pages, 16M nor.bin--nor flash, jffs2, block size is 64K, 2M

Note, it failed to mount fatfs,uffs and jffs2, because there is valid partition on sd card, and there is no directory to mount uffs and jffs2.

So, we should mount sd card at first. Press ENTER, and run the command "mkfs", like,

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

Then close CMD, and then re-run it. This time, you can see that fatfs is mounted correctly, While uffs and jffs2 are still failed to mount for the reason that there is no any directories for uffs and jffs2. \ | / - 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!

so, in order to mount uffs and jffs2, we should create directories for them. Do the following commands.

finsh>>mkdir("/nand")
		0, 0x00000000
finsh>>mkdir("/nor")
		0, 0x00000000
finsh>>

Close the CMD console, and restart, then you can see this:

 \ | /
- 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, everything is okay, you can develop rt-thread with visual studio.

Any questions about this bsp, please email me, goprife@gmail.com

Enjoy~~ prife 2012/10/21