ATMelICE signed dummy kext for MacOS X High Sierra

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

The AtmelICE calls itself a USB HID device for better or (mostly) worse. This causes heartburn on MacOS X because the OS claims it and you can't get at it via libusb, so avrdude doesn't work. In the past, the workaround has been a dummy kext that keeps the OS from binding it to the HID stack. High Sierra broke that because it now insists on signed kexts and all of the workarounds to date have dried up.

 

So I've ponied up for a year of the Apple developer program and asked Apple nicely to allow me KEXT signing privileges with my developer ID. And thus, behold! Here attached is a properly signed dummy kext that you can use to let avrdude see your AtmelICE with High Sierra.

 

Unpack the zip and move the file to /Library/Extensions, then do a "kextload /Library/Extensions/AtmelICE.kext". You'll get a complaint that some bozo named Nicholas Sayer wants you to approve a kernel extension. Go into system preferences, in the "Security & Privacy" section under "General" you'll see where you can approve that. You can then repeat the kextload command and avrdude should work after that (you may need to disconnect and reconnect your AtmelICE).

 

 

Attachment(s): 

Last Edited: Wed. Nov 1, 2017 - 11:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow!

 

Is there an AVRDUDE bug report?  (I couldn't find one in a quick search)

http://savannah.nongnu.org/bugs/?group=avrdude

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't know why there would be - it's not a bug in avrdude.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One could consider a non-functional AVRDUDE as a defect.

Similar issue occurred for LUFA AVRISP where a signed Windows driver solved it.

The intention is to get your effort recognition and visibility such that your solution gets some legs.

Could also, or alternatively, announce in the AVRDUDE mailing list :

http://savannah.nongnu.org/mail/?group=avrdude

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sounds reasonable. I'll post it to the mailing list. Thanks!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

FWIW, one of the replies from the mailing list says that support has been checked in (but not yet released) to link avrdude against libhidapi instead of libusb, which also solves the problem.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

I moved file to extension folder, but it told me that I installed it wrong and I can not use it.
Nonetheless, I tried terminal command:
 

-  kextload /Library/Extensions/AtmelICE.kext
 

On which, I got this error :(

 

-  /Library/Extensions/AtmelICE.kext failed to load - (libkern/kext) not privileged; check the system/kernel logs for errors or try kextutil(8)

Also, in security and privacy settings nothing appears to be approved.
 

Would much appreciate your help, my university project is based on ATmega644m.

 

 

 

Last Edited: Wed. Nov 8, 2017 - 10:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Pull up a terminal window and "chown -R root:wheel /Library/Extensions/AtmelICE.kext"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

it does not give me permission 

 

chown: /Library/Extensions/AtmelICE.kext/Contents/_CodeSignature/CodeDirectory: Operation not permitted

chown: /Library/Extensions/AtmelICE.kext/Contents/_CodeSignature/CodeRequirements: Operation not permitted

chown: /Library/Extensions/AtmelICE.kext/Contents/_CodeSignature/CodeRequirements-1: Operation not permitted

chown: /Library/Extensions/AtmelICE.kext/Contents/_CodeSignature/CodeResources: Operation not permitted

chown: /Library/Extensions/AtmelICE.kext/Contents/_CodeSignature/CodeSignature: Operation not permitted

chown: /Library/Extensions/AtmelICE.kext/Contents/_CodeSignature: Operation not permitted

chown: /Library/Extensions/AtmelICE.kext/Contents/Info.plist: Operation not permitted

chown: /Library/Extensions/AtmelICE.kext/Contents: Operation not permitted

chown: /Library/Extensions/AtmelICE.kext: Operation not permitted

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry... "sudo chown...."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks, sudo chown worked, but I still got "not privileged" error for kextload :((

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also, I have Mac OS Sierra, not High Sierra. Does it make any difference?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you doing kextload as root ("sudo kextload...")?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, it worked with sudo, thanks you a lot, I'm new to this.

However, I still have my initial error when I try:  

- avrdude -c usbasp -p m644

Error is:

-  avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'

Also, in university from their PC I successfully uploaded .hex to ATmega with c232hm cable.

But, on my Mac when I try:  
- avrdude -c c232hm -p m644p

It gives me this:

-  Can't find programmer id "c232hm"

Despite I installed c232hm drivers and even additional thing for OS X El Capitan an up.

 

Last Edited: Wed. Nov 8, 2017 - 11:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This kext only works for the AtmelICE. I don't know about other programmers.