开发者

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

开发者 https://www.devze.com 2023-01-30 06:17 出处:网络
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 -

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,开发者_Python百科
               const char * sNewName);

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号