FX2 EEPROM Under Linux

Found How to download and permanently store firmware for the USB-FX2 board on to an attached EEPROM and am copying some of the info from there.

Fxload is a small and useful tool to program an EEPROM attached to the FX2. It’s written by several people and the newest version can be downloaded from the linux hotplug project page.

Note: If you are merely interested in downloading firmware onto the FX2’s RAM (for testing/debugging/software development or for configuration after the FX2 has been plugged into the USB), then have a look at CycFX2Prog. Fxload is only needed if you want to permanently program an extra EEPROM storage attached to the FX2.

I’ve put both fxload and cycfx2prog here, it’s from 20081013 and patched by the Wolfgang Weiser. As of 20130428 there is no newer version. The fx2 archive also contains the secondary bootloader, Vend_Ax.hex.

A note on bricking the device

The original page mentions that the RENUM bit is set to 1 when the FX2 boots from EEPROM; this means that the firmware you write must handle USB enumeration and that the EZ-USB stuff is disabled. If your flashed firmware doesn’t handle USB enumeration, you’ve essentially bricked the device. He includes the following snippet to put right at the start of main() to force RENUM off and let EZ-USB do it:

#define FX2_RENUM   (1U<<1)
#define FX2_DISCON  (1U<<3)

    // RENUM bit is set indicating that the uC should handle USB requests.
    // This happens if the program is loaded from EEPROM.
    // Disconnect, switch off RENUM and reconnect again to force the FX2
    // logic to handle USB requests.

The patch that he mentions forces the USB VID:PID to the default one if you didn’t specify one. A PID:VID must always be specified!

cycfx2prog-0.47.tar.gz (8.56 KB) Andrew Kohlsmith, 04/28/2013 06:43 PM

fxload-full-2008_10_13-ww3.tar.gz (28.2 KB) Andrew Kohlsmith, 04/28/2013 06:43 PM

usb-fx2-advanced-examples-0.5.tar.gz (23.5 KB) Andrew Kohlsmith, 04/29/2013 03:09 PM

Add picture from clipboard (Maximum size: 1 GB)