From owner-freebsd-usb@FreeBSD.ORG Thu Jun 24 16:01:39 2010 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 29EF61065675 for ; Thu, 24 Jun 2010 16:01:39 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 6E3468FC08 for ; Thu, 24 Jun 2010 16:01:37 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=zNANCjgXmV0A:10 a=IkcTkHD0fZMA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=i5lvqFlw1NaHMefpthoA:9 a=g1nd5ah5jNzResxLcUFIwHWxWRUA:4 a=QEXdDO2ut3YA:10 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 1399820418; Thu, 24 Jun 2010 18:01:36 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 24 Jun 2010 17:58:42 +0200 User-Agent: KMail/1.12.4 (FreeBSD/8.0-STABLE; KDE/4.3.4; amd64; ; ) References: <81cb17da958b5d9242d0267c59e31d8a@groupware> In-Reply-To: <81cb17da958b5d9242d0267c59e31d8a@groupware> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'( =?utf-8?q?=3B=5FIjlA=3A=0A=09hGE=2E=2EEw?=, =?utf-8?q?XAQ*o=23=5C/M=7ESC=3DS1-f9=7BEzRfT=27=7CHhll5Q=5Dha5Bt-s=7CoTlKM?= =?utf-8?q?usi=3A1e=5BwJl=7Dkd=7DGR=0A=09Z0adGx-x=5F0zGbZj=27e?=(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201006241758.42608.hselasky@c2i.net> Cc: Friedrich Schick Subject: Re: Standalone version 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: Thu, 24 Jun 2010 16:01:39 -0000 On Thursday 24 June 2010 14:24:01 Friedrich Schick wrote: > Hello, > > we have an embedded system running the eCos real-time operating system. Now > we consider porting the USB stack from FreeBSD to eCos. What needs to be > done to have a running standalone version of the FreeBSD USB stack? The > work may also be interesting to anybody, who runs an embedded system > without having a real operting system as FreeBSD or Linux. > Hi, On the high-level you need to wrap malloc, newbus, thread creation, timers, mutexes and condition variables. If you want DMA enabled devices to work like the EHCI, you also need a wrapper for busdma. This can be compile-time opted out. I have created a wrapper layer that allows you to compile the core of the FreeBSD 8.x USB stack in userspace. I could send you a link off-list if you are interested. Minimum footprint I've seen using the stock USB core is: 64-128Kbytes It is possible to feature reduce the USB stack and then the executable footprint will be reduced aswell. --HPS