readme_en.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. compile bsp:
  2. There are two ways.
  3. 1). Visual Studio(2005 or newer version), open vs2005.vcproj with visual studio
  4. compile, then run it.
  5. 2). use scons, open cmd console, change to current path, then do
  6. scons -j4
  7. 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.
  8. run:
  9. Run, then you can see the following message on CMD window.
  10. \ | /
  11. - RT - Thread Operating System
  12. / | \ 1.1.0 build Oct 21 2012
  13. 2006 - 2012 Copyright by rt-thread team
  14. init jffs2 lock mutex okay
  15. hello, world
  16. finsh>>fatfs initialzation failed!
  17. uffs initialzation failed!
  18. jffs2 initialzation failed!
  19. thread 29e4 exit
  20. hello, world
  21. hello, world
  22. hello, world
  23. hello, world
  24. hello, world
  25. hello, world
  26. hello, world
  27. hello, world
  28. hello, world
  29. thread 2898 exit
  30. 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.
  31. sd.bin--SD card, fatfs, 16M
  32. nand.bin--nand flash, uffs, page=2048+64bytes, block=64pages, 16M
  33. nor.bin--nor flash, jffs2, block size is 64K, 2M
  34. 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.
  35. So, we should mount sd card at first.
  36. Press ENTER, and run the command "mkfs", like,
  37. finsh>>mkfs("elm", "sd0")
  38. 0, 0x00000000
  39. finsh>>
  40. 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.
  41. \ | /
  42. - RT - Thread Operating System
  43. / | \ 1.1.0 build Oct 21 2012
  44. 2006 - 2012 Copyright by rt-thread team
  45. init jffs2 lock mutex okay
  46. hello, world
  47. finsh>>fatfs initialized!
  48. uffs initialzation failed!
  49. jffs2 initialzation failed!
  50. so, in order to mount uffs and jffs2, we should create directories for them. Do the following commands.
  51. finsh>>mkdir("/nand")
  52. 0, 0x00000000
  53. finsh>>mkdir("/nor")
  54. 0, 0x00000000
  55. finsh>>
  56. Close the CMD console, and restart, then you can see this:
  57. \ | /
  58. - RT - Thread Operating System
  59. / | \ 1.1.0 build Oct 21 2012
  60. 2006 - 2012 Copyright by rt-thread team
  61. init jffs2 lock mutex okay
  62. hello, world
  63. finsh>>fatfs initialized!
  64. os : system memory alloc 320 bytes
  65. flsh: ECC size 24
  66. flsh: UFFS consume spare data size 34
  67. os : system memory alloc 83520 bytes
  68. os : system memory alloc 52400 bytes
  69. os : system memory alloc 2048 bytes
  70. tree: DIR 0, FILE 0, DATA 0
  71. uffs initialized!
  72. jffs2 initialized!
  73. thread 2fb4 exit
  74. hello, world
  75. hello, world
  76. hello, world
  77. hello, world
  78. hello, world
  79. hello, world
  80. hello, world
  81. hello, world
  82. hello, world
  83. thread 312c exit
  84. Ok, everything is okay, you can develop rt-thread with visual studio.
  85. Any questions about this bsp, please email me, goprife@gmail.com
  86. Enjoy~~
  87. prife 2012/10/21