The "ram disk" is a test application supplied to verify / debug the USB-Mass Storage package. The minimal functionality of this test case is to create a tiny "ram disk" device large of around 32 sectors of 512 bytes each. The disk devtab entry is "/dev/ramdisk0". A FAT12 filesystem is created on top of it as the first partition of the disk. The partition is therefore accessible from "/dev/ramdisk0/1". The default behavior of the application is to start the USB MSD thread. Once plugged into the host machine, an empty drive called eCos-3.0 shall appear in the host explorer. To test further, the FAT filesystem package can be included while compiling the test application. If included, before the MSD driver is started, the application will create 2 files (fee and foo) and 1 directory (bar) in the filesystem. Both files and directory shall appear in the host explorer.
The test application was primarly tested with the AT91 architecture. The control endpoint is set to "usbs_at91_ep0" and the buffer size to 8 bytes. The TX endpoint is set to "usbs_at91_ep1" and the buffer size to 64 bytes (with Tx (USB IN) endpoint number set to 1). The RX endpoint is set to "usbs_at91_ep2" and the buffer size to 64 bytes (with Rx (USB OUT) endpoint number set to 2).