comparison packages/io/usb/msd/slave/current/cdl/usbs_msd.cdl @ 2975:faa94c77900c

* ecos.db, io/usb/msd/slave/current/*: Initial check-in of USB mass storage function driver. Contributed by Christophe Coutand. [ Bugzilla 1000987 ]
author jld
date Fri, 12 Nov 2010 13:19:06 +0000
parents
children 9843108eda9d
comparison
equal deleted inserted replaced
2974:1a427c29fd0f 2975:faa94c77900c
1 # ====================================================================
2 #
3 # usbs_msd.cdl
4 #
5 # USB slave-side mass storage package.
6 #
7 # ====================================================================
8 ## ####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
12 ##
13 ## eCos is free software; you can redistribute it and/or modify it under
14 ## the terms of the GNU General Public License as published by the Free
15 ## Software Foundation; either version 2 or (at your option) any later
16 ## version.
17 ##
18 ## eCos is distributed in the hope that it will be useful, but WITHOUT
19 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 ## for more details.
22 ##
23 ## You should have received a copy of the GNU General Public License
24 ## along with eCos; if not, write to the Free Software Foundation, Inc.,
25 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 ##
27 ## As a special exception, if other files instantiate templates or use
28 ## macros or inline functions from this file, or you compile this file
29 ## and link it with other works to produce a work based on this file,
30 ## this file does not by itself cause the resulting work to be covered by
31 ## the GNU General Public License. However the source code for this file
32 ## must still be made available in accordance with section (3) of the GNU
33 ## General Public License v2.
34 ##
35 ## This exception does not invalidate any other reasons why a work based
36 ## on this file might be covered by the GNU General Public License.
37 ## -------------------------------------------
38 ## ####ECOSGPLCOPYRIGHTEND####
39 # ====================================================================
40 ######DESCRIPTIONBEGIN####
41 #
42 # Author(s): USB Slave Mass Storage, ccoutand <ccoutand@stmi.com>
43 #
44 # Contributors: jld
45 # Date: 2010-06-04
46 #
47 #####DESCRIPTIONEND####
48 # ====================================================================
49
50 cdl_package CYGPKG_IO_USB_SLAVE_MSD {
51
52 display "USB slave mass storage support"
53 include_dir "cyg/io/usb"
54 parent CYGPKG_IO_USB_SLAVE
55
56 requires { CYGPKG_KERNEL }
57 requires { CYGPKG_IO_DISK }
58 requires { CYGHWR_IO_USB_SLAVE_OUT_ENDPOINTS >= 1 }
59 requires { CYGHWR_IO_USB_SLAVE_IN_ENDPOINTS >= 1 }
60
61 compile usbs_msd.c usbs_msd_handler.c usbs_msd_scsi.c
62
63 implements CYGINT_IO_USB_SLAVE_CLIENTS
64
65 define_proc {
66 puts $::cdl_system_header "#define CYGDAT_IO_USB_SLAVE_MSD_INL <cyg/io/usb/usbs_msd.inl>"
67 }
68
69 description "
70 The USB slave mass storage device (MSD) package supports
71 the development of USB peripherals which act has mass storage
72 device to the host machine. The actual storage must be implemented
73 on top of the disk package."
74
75 #
76 # Mass Storage Device 0
77 #
78 cdl_component CYGPKG_IO_USB_SLAVE_MSD0 {
79 display "USB slave mass storage support for device 0"
80 flavor bool
81 default_value 1
82 description "
83 This option implement the USB MSD device 0."
84
85 cdl_option CYGDAT_IO_USB_SLAVE_MSD0_SUB_CLASS_TYPE {
86 display "Mass-storage Device USB Sub Class"
87 flavor data
88 default_value { "SCSI" }
89 legal_values { "SCSI" "RBC" }
90 description "
91 Specify the transport protocols and command code systems
92 transported by the interface. Currently only the SCSI
93 transparent command set is implemented."
94 }
95
96 cdl_option CYGDAT_IO_USB_SLAVE_MSD0_EP0 {
97 display "Name of EP0 structure"
98 flavor data
99 default_value { "usbs_at91_ep0" }
100 description "
101 The name of the variable that contains the endpoint 0
102 structure. This should be set to the EP0 structure for
103 the desired USB device driver such as usbs_at91_ep0,
104 usbs_sa11x0_ep0, etc"
105 }
106
107 cdl_option CYGNUM_IO_USB_SLAVE_MSD0_EP0_MAX_PACKET_SIZE {
108 display "The size of EP0"
109 flavor data
110 default_value 8
111 legal_values { 8 16 64 }
112 description "
113 The size of the EP0 hardware buffer on the specific USB
114 chip used."
115 }
116
117
118 cdl_component CYGPKG_IO_USB_SLAVE_MSD0_STATIC_EP {
119 display "Use static I/O endpoint structures"
120 flavor bool
121 default_value 1
122 description "
123 Enables the use of static I/O endpoint structures. Some
124 USB slave device drivers implement dynamic endpoint
125 configuration and therefore require this component to be
126 disabled."
127
128 cdl_option CYGDAT_IO_USB_SLAVE_MSD0_TX_EP {
129 display "The Tx (USB IN) endpoint structure"
130 flavor data
131 default_value { "usbs_at91_ep1" }
132 description "
133 The endpoint structure that corresponds to the selected
134 Tx endpoint number. This is dependent on the USBS device
135 driver selected, and could be usbs_at91_ep1,
136 usbs_sa11x0_ep1, etc"
137 }
138
139 cdl_option CYGDAT_IO_USB_SLAVE_MSD0_RX_EP {
140 display "The Rx (USB OUT) endpoint structure"
141 flavor data
142 default_value { "usbs_at91_ep2" }
143 description "
144 The endpoint structure that corresponds to the selected
145 Rx endpoint number. This is dependent on the USBS device
146 driver selected, and could be usbs_at91_ep2,
147 usbs_sa11x0_ep2, etc"
148 }
149 }
150
151 cdl_option CYGNUM_IO_USB_SLAVE_MSD0_TX_EP_NUM {
152 display "Tx (USB IN) endpoint number"
153 flavor data
154 default_value 1
155 description "
156 The endpoint that should be used for the device-side
157 transmitter, which is the USB IN direction."
158 }
159
160 cdl_option CYGNUM_IO_USB_SLAVE_MSD0_TX_EP_MAX_PACKET_SIZE {
161 display "Tx (USB IN) endpoint sze"
162 flavor data
163 default_value 64
164 legal_values { 32 64 128 256 512 }
165 description "
166 The size of the Tx EP hardware buffer on the specific USB
167 chip used."
168 }
169
170 cdl_option CYGNUM_IO_USB_SLAVE_MSD0_RX_EP_NUM {
171 display "Rx (USB OUT) endpoint number"
172 flavor data
173 default_value 2
174 description "
175 The endpoint that should be used for the device-side
176 receiver, which is the USB OUT direction."
177 }
178
179 cdl_option CYGNUM_IO_USB_SLAVE_MSD0_RX_EP_MAX_PACKET_SIZE {
180 display "Rx (USB OUT) endpoint size"
181 flavor data
182 default_value 64
183 legal_values { 32 64 128 256 512}
184 description "
185 The size of the Rx EP hardware buffer on the specific USB
186 chip used."
187 }
188
189 cdl_option CYGNUM_IO_USB_SLAVE_MSD0_VENDOR_ID {
190 display "USB Forum Vendor ID"
191 flavor data
192 default_value 0xFFFF
193 legal_values 1 to 0xFFFF
194 description "
195 Each USB vendor has an Vendor ID allocated to it by the
196 USB-IF organization. Any arbitrary value can be selected
197 for testing provided that it doesn't conflict with devices
198 on the development host, but a device should NEVER be
199 released publicly without a valid Vendor ID"
200 }
201
202 cdl_option CYGNUM_IO_USB_SLAVE_MSD0_PRODUCT_ID {
203 display "USB product ID"
204 flavor data
205 default_value 1
206 legal_values 1 to 0xFFFF
207 description "
208 You are free to select an arbitrary 16-bit Product ID for
209 a device. The combination of Vendor ID and Product ID
210 uniquely identified a USB device."
211 }
212
213 cdl_option CYGDAT_IO_USB_SLAVE_MSD0_MFG_STR {
214 display "The Device Vendor's Name (Manufacturer String)"
215 flavor data
216 default_value { "\"eCos\"" }
217 description "
218 The standard USB enumeration allows for a
219 manufacturer's name which is normally reported to the
220 user when the device is first plugged into the host."
221 }
222
223 cdl_option CYGDAT_IO_USB_SLAVE_MSD0_PRODUCT_STR {
224 display "The Device Product Name"
225 flavor data
226 default_value { "\"eCos USB Mass Storage Device\"" }
227 description "
228 The standard USB enumeration allows for a product name
229 which is normally reported to the user when the device
230 is first plugged into the host."
231 }
232
233 cdl_option CYGDAT_IO_USB_SLAVE_MSD0_SERIAL_STR {
234 display "The Device Product Serial Number"
235 flavor data
236 default_value { "\"123456789AB\"" }
237 description "
238 The standard USB enumeration allows for a serial number."
239 }
240
241 cdl_option CYGDAT_IO_USB_SLAVE_MSD0_LUN0_NAME {
242 display "LUN0 entry name"
243 flavor data
244 default_value { "\"/dev/ramdisk0/1\"" }
245 description "
246 Specify the logical unit 0 devtab entry name. The default value
247 correspond to the partition 1 of the RAM disk created in the
248 USBS mass storage example application."
249 }
250
251 cdl_option CYGOPT_IO_USB_SLAVE_MSD0_BUSPOWERED {
252 display "The Device is bus powered"
253 default_value 0
254 flavor bool
255 description "
256 Tells the host whether the Device is a bus powered
257 device or a self powered device."
258 }
259
260 cdl_option CYGNUM_IO_USB_SLAVE_MSD0_CURRENTDRAW {
261 display "Maximum current (in mA) drawn from USB bus"
262 flavor data
263 default_value 100
264 legal_values 1 to 500
265 requires { (CYGNUM_IO_USB_SLAVE_MSD_CURRENTDRAW > 100)
266 implies CYGOPT_IO_USB_SLAVE_MSD_BUSPOWERED }
267 description "
268 The maximum current drawn by the Device from the USB bus.
269 It should report the peak value. A self powered device
270 can draw up to 100mA, a bus powered device can draw up to
271 500mA. (If it is sometimes below 100mA and sometimes over,
272 then a transition could be done at runtime between self and
273 bus powered modes, but that would be complicated and the
274 device would have to return from configured to addressed
275 state. For details, see the USB specification.)"
276 }
277
278 }
279
280 cdl_option CYGBLD_IO_USB_SLAVE_MSD_DEBUG {
281 display "Enable debug output from the driver"
282 default_value 0
283 flavor bool
284 description "
285 The driver may produce debug output which can be
286 useful to work out why it is not working as expected."
287 }
288
289 cdl_option CYGBLD_IO_USB_SLAVE_MSD_TRACE {
290 display "Enable trace output from the driver"
291 default_value 0
292 flavor bool
293 description "
294 Allow tracing of every USB transaction for debugging
295 purpose."
296 }
297
298 cdl_option CYGSEM_IO_USB_SLAVE_MSD_STALL_ENABLE {
299 display "Enable application to stall endpoints"
300 default_value 0
301 flavor bool
302 description "
303 A mass storage device must stall one or both bulk endpoints in
304 several situations. However, not all USB device drivers seems
305 to implement this functionality correctly. Hence this option is
306 disable be default. Testing shows that both Linux and Windows can
307 handle mass storage with stall disable."
308 }
309
310 cdl_component CYGPKG_IO_USB_SLAVE_MSD_OPTIONS {
311 display "Build options"
312 flavor none
313
314 description "
315 Package-specific build options including control over compiler
316 flags used only in building this package."
317
318 cdl_option CYGPKG_IO_USB_SLAVE_MSD_CFLAGS_ADD {
319 display "Additional compiler flags"
320 flavor data
321 no_define
322 default_value { "" }
323 description "
324 This option modifies the set of compiler flags for
325 building this package. These flags are used in addition
326 to the set of global flags."
327 }
328
329 cdl_option CYGPKG_IO_USB_SLAVE_MSD_CFLAGS_REMOVE {
330 display "Suppressed compiler flags"
331 flavor data
332 no_define
333 default_value { "" }
334 description "
335 This option modifies the set of compiler flags for
336 building this package. These flags are removed from
337 the set of global flags if present."
338 }
339
340 cdl_component CYGBLD_IO_USB_SLAVE_MSD_EXAMPLES {
341 display "Build example programs"
342 no_define
343 description "
344 Enabling this option will cause the example program
345 to be built using the normal test case infrastructure."
346
347 cdl_option CYGPKG_IO_USB_SLAVE_MSD_TESTS {
348 display "USBS MSD example/test program"
349 no_define
350 flavor data
351 calculated { "tests/usbs_test_ramdisk" }
352 description "
353 usbs_test_ramdisk creates a tiny FAT12 file-system
354 on top of a 'ram disk' device. The USB MSD service is
355 started and the disk should appear at the host side as
356 a regular mass storage device. If the FAT file-system
357 package is included, some files will be created prior to
358 the USB MSD device to be started."
359 }
360 }
361
362 }
363 }