bbl is a handy tool which incorporates the necessary knowledge about uploading software to the balloon. This lets you use one tool and simple options (like bbl --bootldr to upload a new bootloader) rather than following the intricacies of bflash, jflash, bootldr config options and so on.

It replaces the earlier incarnation FillBalloonScript

Version 0.3 support Balloon3 as well as Balloon2

Installing bbl

bbl is available here as a tarball:

(I found this version did not compile without editing. Hosting fixed version here: - simon)

You can browse the subversion archive here:

To install it, unpack the tarball, make, sudo make install. Which will build the various utilities (bflash, jflash, playxsvf, balloon-audio-off) and install them along with a config file.

Something like this:

tar -xzvf bbl.tar.gz
cd bbl
sudo make install

Other software packages you'll need:


Cmnd_Alias BCMD = /usr/local/bin/Jflash-balloon, /usr/local/bin/playxsvf, \
                  /usr/local/bin/balloon-audio-off, /usr/local/bin/bflash


Usage and Config

bbl will prompt you when you need to connect up JTAG or serial connections or reset the board, but you'll need to remember to power the board.

bbl activity can be controlled entirely from the command line but it also uses a config file bblrc which is generally the best place to put all the filename info. A default file which matches the current distribution is installed in /etc/bblrc. You just need to set the directory in which your balloon files are found (if the default of $HOME/balloon-bin is not correct), and perhaps change the address for the parallel port and the device for the serial port to suit your machine. The defaults are /dev/ttyS0 and 0x378 respectively. bflash can detect the correct parallel port address to use by itself so this setting only matters for jflash or if auto-detection fails.

As well as the system defauls in /etc/bblrc, bbl will also look for a per-user config file in ~/.bblrc and a local file bblrc in the current directory. This last makes it easy to have a bblrc in the same directory as a set of files to upload, specifying the correct filenames. Only the system config file is installed by default.

To fill a balloon completely from empty the command is: for FPGA balloon3:

bbl --flash --bootldr --fpga --kernel --root

for CPLD balloon3:

bbl --cpld --flash --bootldr --kernel --root

Until bflash supports balloon2 properly you need to use --jflash instead of --flash for balloon2:

bbl --cpld --jflash --bootldr --kernel --root

or alternatively:

bbl --balloon2 --flash --cpld --bootldr --kernel --root

which will choose jflash and do the right thing.

(these commands assume that there is a bblrc present which specifies the filename to upload and the directory to find them in).

Some other examples are:

bbl --flash

Just upload the initial bootloader image over JTAG

bbl --fpga --logicfile newtestfpgaimage --logicdirectory /home/balloon/vhdl/

will upload the fpga image in the file /home/balloon/vhdl/newtestfpgaimage


will show you all the options

Note that the command order is not important but some functions depend on the earlier stages having been done (e.g. --kernel or --fpga require that a full bootloader has been uploaded). On a cpld board nothing will work until bbl --cpld has been run successfully.

Balloonboard: BalloonBinaryLoader (last edited 2010-04-07 17:52:45 by ChrisJones)