EZUPLOAD(1) FreeBSD General Commands Manual EZUPLOAD(1)


ezupload — Upload firmware from Achorchip EZ-USB based devices


ezupload [−a fromaddr] [

                               −e endaddr | −s size] [−h −b] [−v] device


The ezupload command can be used to upload the firmware from an Anchorchip EZ-USB integrated circuit as commonly found in USB devices to the host. This might be useful during development, troubleshooting etc. to be able to see what the currently loaded firmware is.

The ezupload command takes an ugen(4) device as an argument and outputs an intel hex file on the standard out.

Device is a generic ugen(4) device, for example /dev/ugen3. See the output of dmesg(8) for the device your USB device is attached to. usbdevs(8) does not give you the right information as it produces the device address on the bus, not the unit number in the device name, the ’?’ in /dev/ugen?.

As the size of the ram section cannot be determined reliably from the USB bus, the −s flag can be used to specify this. If not specified up to 32k is uploaded. The size is in kilobytes. If you know the number of the anchorchip, the one but last digit indicates the log(2) of the size in kilobytes.

Alternatively with a memory range −a fromaddr up to, but not including −e endaddr can be specified. You cannot specify both −s size and −e endaddr.

The −s , −a and −e arguments are interpeted as decimal, unless it is prefixed with an ’0x’ for a hex number or a ’0’ for an octal value. See strtol(3) for more information.

The −h and −b flags select between Intel hex and binary output formats.

The −v parameter causes a more chatty and verbose excecution.

The utility was written for use with the ActiveWire USB device. This is a low cost 16 pin in/out generic USB rapid prototyping block. For more information, contact <mato@activewireinc.com> or consult http://www.activewireinc.com

In theory this utility should work with all USB-EZ Anchorchips which have on board ram; i.e. the AN21y1, AN21y5 and AN21y6QC series. Where y is the log2 of the internal memory size (i.e. aAN2146QC has 2^64=16kByte of ram.). Anchorchips has excelent documentation on line at http://www.anchorchips.com


You really do not want to the wrong firmware in the wrong device. It might fry your microwave, or cause your zip drive to run around with the mice.


It will upload the entire range specified. Regardless of whether it contains active code, data sections, scratch space, etc. As space in these devices is usually at a premium it might well be that the firmware code originally downloaded has been overlaid, i.e. is partly overwritten or recycled during the boot sequence or at run time.

In general you can thus not assume that the code you upload can be downloaded again as is. There are some pointers on the http://www.anchorchips.com web site to tools for further hacking of the uploaded file.

The upload is not actively validated. Only delivery from the control endpoint is guaranteed by the OS.


aw(1), ezdownload(1), usb(4), ugen(4), usbd.conf(5), usbd(8)


The ezupload was written by Dirk-Willem van Gulik, WebWeaving Consultancy for FreeBSD. The changes for Linux where made by Brad Hards, brad.hards@dao.defence.gov.au


FreeBSD 4.9 November 21, 1999 FreeBSD 4.9