Linux port to a Microblaze on a Xilinx ML605 FPGA board

I got Linux running on a Microblaze embedded soft core processor on a
Virtex-6 FPGA using the Xilinx ML605 Evaluation board for a consulting
client. It's a somewhat convoluted process, but wasn't nearly as
time-consuming or painful as building TI OMAP Linux kernels from
scratch using Open Embedded. There are many tutorials scattered
about the Internet, but here's a step-by-step recipe.  

Update #2 (7 December 2011): Added sections on creating System Ace Compact Flash images and configuring NFS mounting.  

Update (30 September 2011): Added an Appendix to document workarounds for installation hiccups of the Xilinx ISE/EDK/SDK tools on Ubuntu Linux machines.   Thanks to Andy Schweitzer for uncovering these issues.

Microblaze Linux on Xilinx ML605

Posted

Please rewrite your auto-responder copy!

Who composed this gem, I wonder? A rent-a-coder who isn't a native
English speaker? A marketing person with an insensitivity to
double-entendres who never quite mastered subject-verb agreement?

From: Express-Northeast  [Express.Northeast@xxxxx.com]
Date: Wed, Aug 3, 2011 at 6:21 PM
Subject: FW: RFQ for [Product]
To: "coxe@close-haul.com"

[Company] thanks you for this opportunity to service you!  We are
committed to responding to you as quickly as possible.  Your inquiry
has been delivered to [Sales Representative] who will contact you
shortly.  If you need to contact them, he/she can be reached at the
number below.

Posted

Gratuitous use of apostrophes: please make it stop!

The systematic butchering of written English pains me to an irrational
extent. I've gotten one too many e-mails recently with apostrophes
inserted in words, proper names, or acronyms for no apparent reason.
What possesses otherwise perfectly intelligent people to compose 
these offending missives with such alarming frequency? I was going to
launch into a full-blown rant brought to you by The Grammar Police,
but thanks to Google, I discovered that Arianna Huffington already did
the heavy lifting for me back in December 2005
.


OK, time to get back to debugging multithreaded C++...

Posted

The new and improved Close-Haul.com

Close-Haul Communications has a new website! Check it out at
http://www.close-haul.com. Sign up for the MailChimp-powered e-mail
list to get first dibs on a GAPfiller board as soon as they become
available. I've been working on revamping the site sporadically for
months. I used my fervent desire to ditch GoDaddy's Website Tonight
(account expires in 2 days) as an excuse to learn Ruby on Rails and
just enough JQuery to be dangerous. Since it's hardly a database
intensive web app, the site is hosted for free courtesy of the good
folks at Heroku.

Posted

A Parallel Port? Seriously?

Pport

The GAPfiller transmit chain has a LO feedthrough problem. The
oscillator connected to the modulator that upconverts the baseband GSM
I/Q signal to the GSM 900 band is leaking through the modulator.
The upshot of this behavior is a nice peak at the oscillator frequency
at the Tx antenna output regardless of the GSM signal level. Not
good for a direct conversion transmitter. The working hypothesis is
that the RF input is coupling either to the modulator's DC power rail
or directly to its output. In order to isolate the exact root cause
of the problem so it can be corrected in the next version of the PCB,
I removed the DAC from one of the GAPfiller boards and, with the help of Marshall Thomas, a family friend and retired microwave engineer, cobbled together a series of Analog Devices evaluation boards to replicate the DAC and modulator elements of the transmit chain. One of the components of this Frankenstinian experiment is an EVAL-ADF4360-3EBZ1, a board with the offending oscillator that is well isolated from the other circuit elements. The ADF4360-3 chip requires a non-trivial amount of configuration at power up to tune to the proper frequency at the proper power levels etc. Analog Devices provides the requisite configuration software, but the interface from the evaluation board to the PC is a 25 pin parallel cable. Never mind that no laptop manufactured in the modern era has a parallel port. I actually do have an ancient laptop equipped with a parallel port. It's dual-boot (Ubuntu 10.10 and Windows 7). The Analog Devices software only runs under Windows, but not surprisingly, Windows 7 does not like parallel ports (and why would it?). I even tried loading aWindows 98 virtual machine and running the software, but that plan failed. ADI's "solution" is to tell customers to purchase a USB-to-parallel adapter board for $75, which, needless to say, is profoundly irritating. [Note to self: unapologetically gouging your customers because you couldn't be bothered to upgrade your products does not make them happy.] I contemplated writing a bit-bang SPI interface in C-- the GAPfiller FPGA has a similar interface written in VHDL to configure the parts on the board. In the interest of time, I begrudgingly ordered the adapter board. 


Stay tuned for the results of the LO feedthrough hunt. In the
meantime, the workaround is to upconvert the interpolated digital GSM
I/Q signals to a low intermediate frequency in the FPGA downstream of
the ADC. The oscillator is then tuned to an RF frequency offset from
the GSM channel of interest by the low I/F. The feedthrough signal is
still there lurking, but it's not washing out the actual GSM pulse.

Posted

Free VoIP-over-WiFi Hack for Android Smartphones

Android-wifi

Close-Haul's new workspace at Critical Mass New England in the
Cambridge Innovation Center in Kendall Square is a great place to
work (I'm getting my monthly rent's worth in free food and coffee
alone), but phone calls can be a huge hassle due to the abysmally bad
AT&T coverage and hit or miss availability of a limited number of
shared landlines. Someday in the forseeable future, the
Close-Haul GAPfiller may be able to help with this problem.
In the meantime, I've cobbled together a workaround using a
combination of Google Voice, SIPgate, and 2 Android apps, SIPDroid and
GVCallback. I can now make and receive VoIP-over-WiFi calls on my
Google Nexus One!

The Close-Haul Communications business phone costs me a whopping $9.99
per month courtesy of an AT&T Family Talk Plan. (Never mind that I
don't have any cellphone-wielding teenagers-- an early-stage tech
startup counts as a reasonable proxy for a child.)

Google Voice allows one to call out for free, but a voice plan is
required to receive calls on a cell phone. SIPGate has free inbound
VoIP calls, but charges for outgoing calls.

Here's the kludge-o'-matic procedure that I followed:
1) Get a Google Voice number.
2) Sign up for SIPGate One. Tell SIPgate you're
in somewhere in the 781 area code (e.g., Arlington) to ensure you get
assigned a free phone number-- 617 numbers aren't available. 
SIPGate requires a mobile phone that can receive an SMS to activate a
free account. If you have text messages sent as e-mail blocked by
your carrier to cut down on SMS spam, temporarily unblock them or
you'll never receive your invite code.
3) Follow the instructions here.
4) If you want, you can set call forwarding from your cell phone to
forward to your SIPgate number if you don't answer or are unavailable
(no signal/phone off). Make sure you make these changes somewhere
where you have a strong cellular signal. You can also set your
outgoing caller ID number to your mobile phone number and personalize
the SIPgate voicemail message by logging in to the SIPgate website.

Caveats: 1) WiFi calls will drain your battery like there's no
tomorrow; 2) incoming callers will be subjected to 4-5 extra
European-esque sounding rings before calls are connected; 3) sometimes
audio quality isn't so great, particularly if the person next to you
is downloading a streaming HD video.

A similar solution presumably exists for iPhone (poke around for
equivalent apps to SIPDroid and GVCallback).

Although this phone hack is a tad convoluted, alleviating the profound
annoyance of failed and dropped calls without having to fork over a
red cent pleases me immeasurably.

Posted

Dell Laptop BSOD Crisis Averted

Img_2257

My trusty Dell Vostro 1400 laptop is set up in a dual-boot
configuration with Windows XP and Ubuntu Linux v10.10. During the
course of a workday, I typically switch partitions two or three times.
The schematic capture and PCB layout programs, Matlab, and QuickBooks
all run under Windows. All those years of working for The Man made
Microsoft Word/Excel/PowerPoint the de facto choice for other random
business-related tasks. But the Linux versions of both the Xilinx
and Altera FPGA design tools run about 3 times faster than their
Windows counterparts and the OpenBTS open source GSM software stack is
much happier running on Linux or MacOS. I'm too cheap at this stage
to buy a shiny new MacBook Pro, so Ubuntu it is.

Alas, I wasted a good chunk of this afternoon recovering from a Blue
Screen of Death (STOP CODE 0x000000CA). Tried the usual steps--
booting into safe mode etc., to no avail. Happily, Ubuntu still booted up without incident.

An initial Google search wasn't particularly helpful, but then I remembered seeing the Dell Media Direct splash screen before everything went to hell in a handbasket. I made the grave error of powering off the laptop. Doh! BSOD. (Expletives deleted.)

The Dell Media Direct button (the one with the house icon on it) is an
Instrument of Evil. Pressing it by mistake causes a world of hurt.

Fortunately, there's a straightforward fix. It's probably possible to
use a utility booted from a CD or USB flash drive to restore the
Master Boot Record, but for a BSOD-ridden Dell laptop, turning it off,
begrudgingly pressing the Media Direct button again, being patient and
letting it run its course, selecting Windows from the bootloader,
shutting down the computer, and powering up normally did the trick.

For insurance, I disabled the infernal Media Direct button from within Windows:
1) Start -> Run -> type "msconfig" into the dialog box -> Click "OK"
2) Select the "Startup" tab from the System Configuration Utility
3) Uncheck the "quickset" box -> Click "Apply" --> Click "OK"
4) Restart the computer.

The mere thought of a complete Windows reinstall gave me a migraine,
but fortunately it wasn't necessary.

Posted

fortune | cowsay -f tux

Tuxsay

Who knew that ASCII Tux could spout such wisdom with a simple shell
command? Pleasing. Very pleasing.

Posted

Celebrate the Prognosticating Rodent

Happy Groundhog Day!  What's not to like about a prognosticating rodent whose forecasts are interpreted by a bunch of white-bearded dudes in funny hats? To top it off, they live in a town that has the letter "x" in it.

Never mind that Phil may be smoking something this year... 

As usual, Phil looks like he's still recovering from a bender after the Steelers qualified for the Super Bowl. Or maybe he just wants to go back to sleep.

Oddly, Groundhog Day has its roots in the Christian Celebration of Candlemas, observed on the 40th day after the birth of Christ to symbolize the ritual purification of Mary. In practical terms, it marks the official end of the Christmas season and the day on which a year's supply of candles are blessed in churches (hence the name Candlemas). Feburary 2nd also happens to be halfway between the Winter Solstice and the Spring Equinox. Northern European pagans came up with the notion of hibernating animals predicting the end of winter, introduced to the state of Pennsylvania by German immigrants in the late 19th century. Groundhogs happen to be the most prevalent hibernating beasts in Pennsylvania-- bears tend to live elsewhere. 

Phil5_1233586650_1157

Posted

Cosmic Joke

Vertical-icy-surface-caution-s

I'm back at the Ranch, having escaped unscathed after partaking in
winter sports (in which the majority of participants wear crash
helmets) over the holidays. So what happens? En route to the office
this morning, I slip on the one sheet of ice still remaining on
Washington Street, fall flat on my butt, and severely twist my ankle
and pour my cup of coffee all over myself. Fortuitously, there were
several icepacks in the communal office freezer. I hobbled home at
lunchtime for some additional first aid. Having sustained similar
injuries in the past (learning to snowboard in fact), I am in
possession of the requisite paraphernalia-- an Ace bandage to properly
secure ice packs, a left-footed Air Cast, and a pair of crutches that
traveled from LA to Boston last year in the same enormous box as two
of my surfboards. Wearing the Air Cast makes driving feasible
(pushing down the clutch isn't pleasant, but it's within my pain
threshold). Running is out of the question for the time being, but
clomping around on crutches for more than 100 feet actually results in
quite a vigorous upper body workout. Hopefully keeping weight off of
the gimpy ankle and a regular RICE routine (that would be Rest, Ice,
Compress, Elevate) will do the trick eventually. Doh!

Posted