USB Mass Storage Device with HPS Stack

Hans Petter Selasky hselasky at c2i.net
Wed Apr 30 16:29:31 UTC 2008


On Wednesday 30 April 2008, Xiaofan Chen wrote:
> On Wed, Apr 30, 2008 at 3:59 AM, Hans Petter Selasky <hselasky at c2i.net> 
wrote:
> >  Maybe you can get my USB stack working on your PIC board? It now
> > supports the Device Side aswell as the host side! See
> > "usbd_handle_request" in:
> >
> > 
> > http://www.selasky.org/hans_petter/isdn4bsd/sources/src/sys/dev/usb/usb_t
> >ransfer.c
> >
> >  Mass storage driver:
> >
> > 
> > http://www.selasky.org/hans_petter/isdn4bsd/sources/src/sys/dev/usb/ustor
> >age_fs.c
>
> The PIC18F4550 is a lowly 8-bit MCU (12MIPS, 32KB Flash, 2KB SRAM including
> USB RAM). So maybe it is too low to run your USB stack's device side.
> What is the minimum requirement to run your USB stack's device side?
>

Hi,

Try and find out. I know that many structures can be optimized for minimal 
memory usage. Currently I reserve space for 128 USB devices and 32 endpoints 
and interfaces. If you reduce those numbers then you will save a lot of 
memory.

BTW: When you are out of paper you buy another paper. If the storage in the 
chip is too small, buy another one. Every line of code is written with a 
purpose. When you are removing code, like in the software you showed me, then 
I'm sorry it is not a USB device. Then you have to make your own standard 
that clearly defines the rules for removal of code.

--HPS


More information about the freebsd-usb mailing list