Once the virtual comport driver is installed, try plugging in the USB programmer board to the computer. The virtual COM port should show up in the /dev directory, where all hardware device files reside on a Unix system. The virtual COM port will have a screwy name starting with tty, such as tty.usbserial-A3000Pnr. To see that it showed up, try listing everything that starts with tty. in the /dev directory:
$ ls /dev/tty.* /dev/tty.Bluetooth-Modem /dev/tty.Bluetooth-PDA-Sync /dev/tty.modem /dev/tty.usbserial-A3000Pnr
We see a bunch of other devices, along with the USB programmer board, tty.usbserial-A3000Pnr.
Now that the port is showing up, we are ready to upload the .hex file.
Connect the Critter Board to a power supply, and then connect the USB programer baord as in the picture. There are two slide switches on the USB programmer board to select run and program modes. When the switches are in the program mode (towards the USB connector), the computer has the ability to reset the LPC2138 into bootloader mode. Make sure the switches are in the program position.
There are two programs that can be used with OSX to upload to flash. The first program to try is lpc21isp, a command line upload program. The other is lpc2k_pgm. This is a command line program that was ported to Mac OSX from the graphical Linux version. It is a pretty quick and dirty hack, and although it works for us, we have heard reports of it being troublsome.
You can download the executable here. You may have to chmod it to 777. Then, from the directory you downloaded it to, run:
$ ./lpc21isp-133-osx -control -hex HelloSineWave/main.hex /dev/tty.usbserial-A1000yos 115200 14746
The third and fourth arguments are the location of the .hex file to upload, and the serial port. These will differ for you. The fourth argument is the baud rate, 115200 for a quick download. The last argument is the oscillator frequency of the Critter Board in Khz (used for synchronization purposes).
You can also copy the program to /usr/local/arm/bin/lpc12isp so you can run the program from any directory.
More information about this program can be found here.
First download the flash utility for Mac OSX. Open a terminal and unpack the archive. A directory lpc2kOSX is created. Move into that directory and run the command 'make' to build the program:
$ tar xvf lpc2kOSX.tar $ cd lpc2xOSX $ make
Hopefully everything goes smoothly and the program is created in the directory called lpc2k_pgm.
The flash utility takes 2 arguments: the name of the serial port as its first argument, and the name of the .hex file to upload as its second argument. So to run the flash utility looks something like this: (be sure you are in the lpc2kOSX directory)
./lpc2k_pgm /dev/tty.usbserial-A3000Pn /Users/owen/main.hex
The names of the serial device and the path to your .hex file will differ. A bunch of status information gets printed to the screen while uploading.