Loading bitfile into SPI Flash for standalone operation

I’m trying to load a bit file into the Flash on the XEM6001 so that I can operate the board in a standalone mode. I attempted to run the flashloader.exe example on WindowsXP and Windows complained that it wasn’t a valid executable.

I then tried porting the Cxx source to Python (see attached), running on OS X Lion. I’ve tried using this Python script to upload .bit, .mcs, and .ufp files, and the script completes without error, but when I switch the board to PROM mode and power cycle, nothing happens (normally, LEDs illuminate and such, not controlled from frontpanel endpoints).

I’ve verified that my design ties MUXSEL low. I can’t find any other clues in the documentation or forums.

Questions:

  1. Is flashuploader meant to use a regular .bit file, or one of the SPI Flash formatted files (like MCS or UFP)?

  2. Any idea why flashloader.exe is bombing on WindowsXP? If I can’t get this working on OS X under Python, it would be great to at least have a working EXE.

  3. Any other “tricks” or stumbling points that might be preventing this from working?


    flashloader.py.zip (2262 Bytes)

  1. Flashloader expects a bitfile. In fact, you can use our samples (like counters.bit) to test.

  2. Hm. It works fine for us, but we haven’t used Windows XP in several years. Can you try on a Windows Vista or Windows 7 machine?

  3. Are you flipping the switch on the XEM6001 from “USB” to “PROM” ?

  1. Flashloader expects a bitfile. In fact, you can use our samples (like counters.bit) to test.

I tried this with my flashloader.py script…no signs of life. Based on the VHDL, I would have expected the LEDs to do stuff…alas, they don’t. I’ve also tried the bitfile I generated for the project that I operate in tethered mode, also no dice.

  1. Hm. It works fine for us, but we haven’t used Windows XP in several years. Can you try on a Windows Vista or Windows 7 machine?

I’m afraid I only have WindowsXP, Ubuntu, or OS X at my disposal.

  1. Are you flipping the switch on the XEM6001 from “USB” to “PROM” ?

Yup. I program the Flash in USB mode, then disconnect the USB cable, switch to PROM mode, then provide external power over JP2.

Any chance you could take a look at the flashloader.py script I attached to my original post and perhaps try it there on an otherwise known-good setup? I think your customers would really appreciate a platform independent (Python) solution to this problem (I know I would!).

Have you tried building the flashloader C++ file in Linux or Mac? It’s already written to be cross-platform.

However, it looks like the sample source didn’t get added to the distributions for OS X or Linux. We’ll make sure that happens on the next release. But you should be able to copy the source and use the Makefiles from our other samples pretty easily.

Oops. I stand corrected. It seems our Linux distribution got the flashloader, but OS X did not.