EZ-USB and FX2
Cypress has a couple of USB microcontrollers that are really nice for development, the EZ-USB and FX2.
What is so nice about them is that they are really easy to program. Both chips contain a 8051 microcontroller and a USB controller. Normally the chip boots from ROM, reads a USB Vendor and Product ID from an I2C EEPROM and then connects to the USB bus, and then just sits there doing nothing. The host looks up the Vendor and Product ID to find a firmware file which it then downloads into the chip. The chip then runs the new firmware, which disconnects from the USB bus and then reconnects as a new device with a different Vendor and Product ID. So this makes it very easy to test software on the chip, there is no programming of EEPROM or messing with programming cables. It is also possible to put the firmware into an I2C EEPROM, but that is not anything I've used so far, but programming the firmware into the I2C EEPROM can also be done from the chip itself, so it is also fairly simple and doesn't require any programming cables.
The EZ-USB family of chips were originally made by a company called Anchor Chips, so they are named AN21xx. They are USB full speed (12Mbit/s) devices. The Some EZ-USB variants (AN2131, AN2135, AN2136) use an 8 pin port as a fast data bus, but this bus can not be used as normal I/O pins which can be a bit limiting; other EZ-USB variants do have normal I/O pins but lack the fast data bus. All I/O on the EZ-USB is performed by the CPU, so the highest transfer rate, even with the fast I/O port, is just a byte every few clock cycles, so it's hard to saturate the USB bus with this device.
The FX2 family of chips are actually named CY7C68xxx. They are USB high speed (480Mbit/s) devices, but can run at full speed too. They have something called GPIF (General Programmable Interface) which is a FIFO, a DMA engine, and a programmable state machine all connected together. This state machine is fairly flexible and can implement a bunch of different bus protocols in hardware without firmware intervention, so it is possible to transfer more than 30MBytes/s between an external device and the USB bus.
Toolchain
The open source sdcc compiler can produce 8051 code for the chip, so it's possible to develop firmware for the chips without having to pay a lot for a commercial compiler.
Unfortunately all of the examples in the Cypress manuals and all the code examples on the Cypress web site are for the Keil C compiler, and won't work straight off with sdcc.
Since most of the header files and code examples I found did not have any proper copyright and license descriptions, I did not really know if I can use them in open source projects or not. So I decided to rewrite the header files from scratch and to write my own libraries for the EZ-USB. The header files with the register maps are automatically generated by a small Python program, and the other files are written from scratch.
Sources
All the sources can be found in subversion repository, note that a lot of this code is non-functional, and sometimes the source breaks when a new version of the SDCC compiler is released.
EZ-USB/FX2 based projects
The GNU software radio project uses the Cypress FX2, and they have loads of open source firmware for the chip. If I had known about this project when I started hacking on the EZ-USB years ago I probably would not have written my things from scratch, but well, I didn't and now I'm quite happy with my stuff, so...
BrainTechnology has a couple of EZ-USB and FX2 based development boards for sale. The EZ-USB boards are a bit buggy when it comes to the I2C EEPROM connection, but other than that they work just fine and are fairly cheap. I think I bought my first AN2135 board back in 2002, so I've used these a lot.
OpalKelly has a bunch of Xilinx based FPGA boards that use a FX2 as the USB controller. It's possible to download both the FX2 firmware and the FPGA image over USB. Their boards are a bit expensive in my opinion, but they work very well for FPGA development and they are small enough so that you can actually use them in a real product. They also provide a lot of host software which might be useful for some people. I I don't like their firmware and host software that much, so I've written my own firmware and Linux host software that I can use with a XEM3001v2 board.
My USB Debug board, a FX2 based board that I've built.
