world leader in high performance signal processing
Trace: » mac_os_x

Developing on Mac OS X

First a disclaimer: OS X is not an active or heavily used development platform. Things may break and go unnoticed for a while due to this. That is not to say things won't get fixed, just that you may be the one finding the bugs. If you wish to save yourself time and pain, please consider using Linux. Dual booting systems with OS X is pretty easy to do.

Building the toolchain, Linux kernel, and uClinux distribution should mostly work on OS X 10.4 starting with the 2008R1 release. Anything older is known to not work at all.

Building things should work on OS X 10.5 starting with the 2009R2 release.


Before doing development on Mac OS X, please make sure you use a case-sensitive file system on Mac OS X. UFS (Unix File System) is surely case-sensitive. According to HFS+, HFS+ optionally supported case-sensitivity since 10.3 (Panther).

If you cannot convert an existing parition or re-install, you will have to use a different disk. Some possibilities:

  • create a disk image via Disk Utility manager
  • repartition and create a proper dedicated partition
  • use an external hard drive

Development tools

You should install Fink to assist in installation of random packages.

Subversion client

You can either install via Fink or using the .dmg Subversion Packages.

If you want to use fink, simply do:

sudo fink install svn-client svn-ssl

Misc utilities

The default Darwin install either has outdated (and crappy) versions of some utilities, or doesn't include them by default, so the following list of packages you should make sure to install.

sudo fink install sed gawk wget findutils

There is a complete list of misc utilities, and necessary packages, which may or may not be helpful at installing_linux.


The Linux kernel build system assumes you have an elf.h header provided by the native tools. Since OS X does not use the ELF format, you will need to provide your own. You should be able to simply copy the elf.h header from the uClibc directory (in the svn toolchain project) to /usr/local/include/.

Using a serial port

One of the first things you need to do is be able to communicate with the Blackfin. This is important so that you can configure the network of the bf re flash the device or configure the device. I have been using a SEWELL usb dongle connected to my MAC. The device is recognized after installing the appropriate driver which you need to get from here PL2303 Driver.

Once the PL2303 serial driver is installed and the machine has been rebooted. A new serial device will become available. With a terminal window you will notice /dev/tty.PL2303-XXX not sure what the -XXX naming scheme is but I have noticed different XXX numbering with different versions of the SEWELL device.

Ok now that we have a serial device one needs to connect to it, you know this use to be an easy task. Anyways I have been using this antique Taylor UUCP 1.07 + xterm to talk to the Blackfin. My rational here is that you can talk remotely to the board from anywhere in the world over the serial port. The configuration that is required to use cu is trivial. Here is the only file that you need of course you can name it what ever you want I called my port p1 and you will notice my device XXX is 191 yours might be different.

type direct
port p1
device /dev/tty.PL2303-191
speed 57600

Once you have this you should just need to use cu -p p1 to connect to the board. If it doesn't work ensure the cable is connected. In retrospect I should have just written a small program to copy std in to the tty, and copy std out from the tty. And yes someone even wrote this in perl connect to unix very cool.

BTW Zterm or other terminal program should work as well.

TFTP configuration

OS X should include a tftp daemon, just disabled by default. You should be able to check it by doing:

sudo service --list
sudo service tftp start

You may need to make a couple of mods to the standard configuration /System/Library/LaunchDaemons/tftp.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Mounting NFS Shares

If you want to mount NFS shares that are exported from OS X, you can do something like:

root:~> mount -o vers=2,rsize=1024,wsize=1024 -t nfs /mnt

Of course the share needs to be exported on the MAC, I looked at using net info stuff and then defaulted to the tried and true /etc/exports. Here is what mine looks like:

pi4$ cat /etc/exports 
/Users -alldirs 
/Applications -ro 
/sw /usr /usr/local -ro