From owner-freebsd-usb@FreeBSD.ORG Wed Apr 30 16:29:30 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E195D1065676 for ; Wed, 30 Apr 2008 16:29:30 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.freebsd.org (Postfix) with ESMTP id 6CF048FC20 for ; Wed, 30 Apr 2008 16:29:30 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=feXiF3FZNr0A:10 a=BGTpj-pkAg8A:10 a=HvMRop0xeNBHJIKbNfzU0w==:17 a=ndaoGXS1AAAA:8 a=m8gXJ_LNFsV3iCqLWW8A:9 a=vdls25QAlJESYOepQX8A:7 a=B6NfwH8jLResqFGtXX9QXwkQYHcA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.113.132.156] (account mc467741@c2i.net [62.113.132.156] verified) by mailfe06.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 919771267; Wed, 30 Apr 2008 18:29:28 +0200 From: Hans Petter Selasky To: "Xiaofan Chen" Date: Wed, 30 Apr 2008 18:30:48 +0200 User-Agent: KMail/1.9.7 References: <200804292159.11467.hselasky@c2i.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804301830.49842.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: USB Mass Storage Device with HPS Stack X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2008 16:29:31 -0000 On Wednesday 30 April 2008, Xiaofan Chen wrote: > On Wed, Apr 30, 2008 at 3:59 AM, Hans Petter Selasky 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