I took advantage of the recent sale on pololu.com and picked up a Baby-O m328P combo with the USB AVR Programmer as well as a 3pi. I was quite excited. However, I failed to notice that the USB AVR Programmer is not compatible with any Mac OS. I found that out yesterday when I was trying to get everything working.
Eventually, I discovered that the core of the issue is that Mac OS X will no longer recognize a USB-to-serial device. I believe this feature was taken away around update 10.4.8. Of course, that’s pure speculation derived from many posts I’ve read around the internet. I tried all sorts of things to get it to work, to no avail.
So, here’s my workaround. Hopefully this will work for others.
Hold on a moment, before I begin, I have to confess something. There is a bit of a mystery that should be mentioned. When I use System Profiler on my Mac, I notice under the USB section the Pololu USB AVR Programmer is listed. Why? I have no idea, but I have some theories. Here is what I suspect. I installed the CP2102 drivers for Mac Os X located here:
pololu.com/file/0J16/OSX_cp2102_drivers.dmg
That might have created it. I may uninstall it later today to see if it disappears. Also, I followed the steps here for fixing the Pololu.kext:
I’ll continue. This workaround involves using Sun’s VirtualBox to run an instance of Ubuntu 10.10. Ubuntu 10.10 recognizes the USB AVR Programmer and assigns it a ttyACM0 and ttyACM1 just as Mac OS X should do if it wasn’t so busy trying to look cool.
So, I headed over to ubuntu.com/desktop/get-ubuntu/download and downloaded the 32-bit version of 10.10. (iso)
Next stop … virtualbox.org. I downloaded VirtualBox 3.2.10 for OS X hosts here:
download.virtualbox.org/virtualb … 23-OSX.dmg *
I installed VirtualBox then told it to build a new Linux virtual box using the Ubuntu 10.10 iso. I gave the virtual box 8 GB of hard drive space and let it use 768MB of RAM. I installed Ubuntu in lieu of ‘Trying Ubuntu’. Installation takes a bit, but remember, you only have to do it once.
Once Ubuntu is up and running, use Synaptic Package manager to install gcc-avr, avr-libc, binutils-avr, and avrdude, as directed by the m328P user guide.
Now comes the tricky part. I plugged in the USB AVR Programmer. I opened a Terminal window and did a ‘ls /dev/tty*’ and looked for /dev/ttyACM0 and /dev/ttyACM1. They weren’t there. Then I noticed a tiny little USB-looking icon in the border of the Virtual Box window. Clicking on that, I was able to select the ‘Pololu USB AVR Programmer’. Once I did that, I reissued a ‘ls /dev/tty*’ and what do you know, ttyACM0 and 1 were there!
I did a quick test by following the user guide for BlinkLED project and it worked. The only issue I’ve found is that there appears to be an problem issuing consecutive commands through avrdude to the programmer. The programmer will timeout over and over again and the red LED will be lit indicating an error. Unplugging the device and plugging it back in (and selecting it in the Virtual Box USB menu) gets it working again. I’ll have to keep troubleshooting this.
So, there you have it. Not the cleanest solution, but it works. Not to mention, now you have a good Linux build to play with!
Here’s a summary:
- Get your Mac to recognize Pololu USB AVR Programmer in System Profiler by installing CP2102 driver for MAC (theory!!)
- Download and install VirutalBox
- Download Ubuntu 10.10
- Create new VirtualBox running Ubuntu 10.10
- Download avr tools
- Plug in and program
Good luck!
-Sam
- NOTE: VirtualBox is only for Intel Macs. I haven’t tried this solution on my PowerPC Mac yet using Q. But, I’ll probably do that later. I’ll report back on the success or failure of that.