AVRDude and Atmel ICE on OSX 10.3 High Sierra

David Ramsay
2 min readApr 12, 2018

--

AVRDude does not play well with the new Atmel ICE controller on OSX — the OS enumerates the device and makes it impossible for AVRDude to access. If you’re here, it’s likely because of this error:

avrdude: usbdev_open(): error claiming interface 0: Permission deniedavrdude: usbdev_open(): no usable interface foundavrdude: jtag3_open_common(): Did not find any device matching VID 0x03eb and PID list: 0x2141avrdude done.  Thank you.make: *** [install] Error 1

To fix it, we need a dummy driver to intervene before the OS can grab it; thus we have to load a kernel extension (kext). Kexts are dangerous, and the most recent version of OSX makes them a little bit more difficult to install.

Installation Steps

First go here: http://gnu.mirrors.pair.com/savannah/savannah/avrdude/ and download the AtmelICE-kext-for-High-Sierra.zip.

Unzip it (you should get a kext folder) and copy it to your /Library/Extensions folder. This may require root permissions.

sudo cp -r ~/Downloads/AtmelICE.kext /Library/Extensions

NOTE: some guides show the copy folder as /System/Library/Extensions, but the correct place is /Library/Extensions. Check if you have a Library/Extensions folder, and if you do, put it there. It won’t work in the System folder.

Load the kext:

sudo kextload -v /Library/Extensions/AtmelICE.kext

You will now need to go to System Preferences -> Security and Privacy, and under the General tab, ‘Allow’ the 3rd party extension that shows up there.

That’s it! It should work!

Debugging

There are a couple things to try if things go wrong. First, make sure you have it in the right folder (as mentioned above); then proceed with these checks.

  1. Refresh kext cache and check kext permissions.

It’s possible your kext has issues with permissions, and/or if you’ve tried unsuccessfully to install the kext before, you might have kext caching issues. First try rebooting your computer. Otherwise try these commands, then try rebooting your computer:

sudo chown -R root:wheel /Library/Extensions/AtmelICE.kext
sudo chmod -R 755 /Library/Extensions/AtmelICE.kext
sudo kextcache -system-caches

2. Turn off System Integrity Protection while installing.

If the issue is a trust/kext signing one, it’s possible to turn off the SIP while installing, so that kexts don’t require signing. This can be dangerous, but it also works.

Boot your computer into Recovery Mode (Cmd+R during boot), and open a terminal. Type:

csrutil disable; reboot

Reboot and install the kext as above. Once you’re done, boot back into recovery mode and turn SIP back on the same way.

csrutil enable

3. Check kext info.plist for proper device number.

Click the Apple logo in the top left corner, go to About this Mac, then click System Report. Find and select USB in the left pane, and look for your Atmel ICE device (Atmel-ICE CMSIS-DAP).

Click on it and find the Product ID. For me the value is 0x2141. Convert this hex value into decimal (8513 for 0x2141). Now open the kext info.plist file.

vim /Library/Extensions/AtmelICE.kext/Contents/Info.plist

Find the line that says <key>idProduct</key> (for me line 53), and check that the number on the next line matches your product id. If it doesn’t, fix it and retry the steps above to load it.

Good luck with your AVR projects!

--

--