read/write files from USB memory stick in uC-OS/II

952 Views Asked by At

I have a board with ARM processor and micrium RTOS on it. I need to read/write files from the USB memory stick. For example standard function, which renames file is next -

int FS_Rename (const char * sExistingName,
               const char * sNewName);

which path i need to write into sExistingName to point file on my USB memory stick?

1

There are 1 best solutions below

0
On

It is not as simple are having the 'correct path'; The RTOS itself does not include either file-system or USB support, if you are using Micrium's file-system, you will still need USB mass storage device support to access such a device.

It would help if you revealed what ARM device you are using (or even what board if it is COTS); the ARM core itself does not define any particular peripheral set; that is decided by the chip vendor using the ARM core under license.

If the USB controller is on-chip, the micro-controller vendor may have example mass storage device code for free. However USB host or OTG stacks (as opposed to device stacks), which is what you need, are more complex and are seldom free and often expensive.

Moreover, your micro will require a host or OTG controller rather than a simpler and more common device controller. With a device controller, your target could be a mass storage device, but it could not access one.


[edit]

Micrium provide a USB host stack that is compatible with their file-system. If you are using their file system, that would be the path of least resistance, but you will still need host controller hardware on your target.