Cypress FX2 on OSX

Getting Ben’s (derivative of David’s) SSRP to work under OSX with modern GNU radio libraries, and have a few notes.

To build firmware for FX2 chips – which are 8051 cores, you need SDCC. I got it from MacPorts.

sudo port install sdcc

To program FX2 parts on Linux, use fxload, a part of the Linux hotplug project. This unfortunately does not exist under OSX. Thankfully, it was ported to OSX as part of Nall’s nexys2-osx project on github, a project that I’ll be revisiting while I am getting my FPGA stuff up and running.

The fxload-osx project built nicely with the xcodebuild command in the fxload-osx directory. The binaries are hiding in build/Release. I then softlinked the binary to /usr/local/bin – because aliased commands do not appear in non-interactive shells such as the environment that Makefiles use.

git clone https://github.com/nall/nexys2-osx.git
cd nexys2-osx
xcodebuild
ln -s build/Release/fxload-osx /usr/local/bin/fxload

To check how the device has enumerated to the operating system, use the built in utility, system_profiler with the flag SPUSBDataType. Cypress parts default to: Product ID 0x8613 and Vendor ID 0x04b4.

system_profiler SPUSBDataType

To flash the firmware without programming the eeprom, one can simply use the fxload utility (where your firmware is fw.ihx).

fxload -v -t fx2 -D 04b4:8613 -I fw.ihx

Now, here’s where it gets weird… To put the firmware in an eeprom attached to the FX2, one needs a “second stage loader” to flash the eeprom. The Linux Hotplug Project thankfully distributes a second stage loader as a3load.hex, and Linear distributes a second stage loader Vend_Ax.hex. I have not successfully flashed attached eeprom under osx. When I get it working, I’ll report back.



2 Comments

  1. You may be interested in FX2Loader [1], which is a library (& command-line wrapper) for loading FX2 firmware.

    You may also be interested in FPGALink [2], which is a library for JTAG-programming and subsequently communicating with an FPGA using an FX2 chip.

    MacOSX, Linux & Win32 binaries available for both.

    Chris

    [1] http://www.makestuff.eu/wordpress/?page_id=343
    [2] http://www.makestuff.eu/wordpress/?page_id=1400

  2. andy wrote:

    Thanks Chris! I’m polishing up a FX2 design and will be sure to check out your page before I publish it.

Leave a Reply