Avrisp mk 2 on Mac problem

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

Hey everyone,

I'm trying to get my AVRISP MK 2 working on my Mac, to use with Avrdude, and I'm having problems, and wondering if anyone can help me out.

I installed cross pack, so I have Avrdude as well.

Basically, I'm getting stuck trying to get my Mac to recognize/accept my AVRISP mk 2.

I connect it to my board, and I am getting the green indicator light.

When I connect it to my USB port, and go to terminal, type ls /dev it is not showing up.

If I do the same thing with an arduino, I see it clearly as usbmodem1411.

I know that to program, I will need to have the port show up and use the name, or it will not work. I tried sending a hex file using -P USB and that did not work.

I have tested my AVRISP mk 2 on a windows machine and its working as expected.

Also, when connected, I went into system info, and I see it on my USB but its showing up as unrecognized device, because there are no drivers.

I have searched high and low, and I know others are using this programmer on a Mac, so I know it's possible.

I have seen some reference to needing USBLIB, which I downloaded, but I cannot get to configure because it keeps saying no compiler found in directory.

It's far as I can tell, there are no Mac drivers for this programmer.

I'm kind of at the end as far as any ideas of what else to try.

Can anyone offer me any suggestions?

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

Just because a USB device enumerates does not necessarily mean it will appear as a device under /dev. I don't know the Mac OS but I do know Unix and Linux and believe it's very similar. Since Linux 2.6 it has had a user space mechanism called Udev and and that gets notifications from the kernel when new devices are attached and according to a bunch of rule files it may then create a /dev entry. Again I assume Mac OS is similar. Just like Linux it is very unlikely that there's a rule to recognize the USB VID/PID of an AVRISPmkII and create a /dev entry for it.

Instead avrdude is built to link with a library called libusb. When you specify that you an AVRISPMKII is being used to avrdude it knows the VID/PID it will have enumerated with so it asks libusb to scan for all devices with that VID then that PID and when libusb reports it has found it, it puts them in contact. This mechanism does not operate via /dev unlike when you are using a CDC-ACM device in which case a Udev rule will have created something like /dev/ttyUSB0 then you tell avrdude on the command line to open that device for the communication.

So the fact you don't see it in /dev is not a problem. Now in Linux the way you WOULD check to see that it has correctly enumerated is with the lsusb command. Perhaps the Mac OS has something like this?

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

Thanks for the reply, I did not know most of what you mentioned.

When I use Avrdude, I originally started with this:

Avrdude -c avrispmk2 -p m328p

And I kept getting an error.

Than I added -P USB based on some searches, that did not work either, saying no path found.

Then I did more digging and people were saying they had to actually enter the /dev path for this to work.

I'm assuming since I have Crosspack installed, as well as arduino, that I also have libusb installed.

Any other suggestions?

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

As I say does your OS provide a command similar to lsusb? (in Windows the equivalent is Usbdview.exe). This allows you to check that the device has even enumerated successfully. There are also verbose options for the Linux command which will tell you about any /dev support.

EDIT: Google says this

www.tekkie.ro/mobile-development...

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

Clawson,

sorry, I missed your question.

Yes, I had done the UI version that is referenced in that article, here is what I get:

USB 3.0 Hi-Speed Bus:

Host Controller Location: Built-in USB
Host Controller Driver: AppleUSBXHCI
PCI Device ID: 0x1e31
PCI Revision ID: 0x0004
PCI Vendor ID: 0x8086
Bus Number: 0x14

AVRISP mkII:

Product ID: 0x2104
Vendor ID: 0x03eb (Atmel Corporation)
Version: 2.00
Serial Number: 200073775
Speed: Up to 12 Mb/sec
Manufacturer: ATMEL
Location ID: 0x14100000 / 20
Current Available (mA): 500
Current Required (mA): Unknown (Device has not been configured)

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

heres something interesting, I decided I would try to use my AVRISPmkII to flash the blink program on my arduino uno board.

It worked perfectly, several times.

SO, this tells me that my command is incorrect, and this has nothing to do with my programmer, or having the device recognized on my mac.

I just tried a bunch of different commands, to no avail.

I have now tried:

avrdude -p m328p -c avrisp2 -P usb

avrdude -p m328p -c avrisp2

avrdude -p m328p -c avrispII both options above

"" -c avrispmk2

"" - c avrispmkII

None are working

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

no man pages?

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

ka7ehk wrote:
no man pages?

Jim

Jim,

Im sorry but I am not sure what you are asking.

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

Quote:

Im sorry but I am not sure what you are asking.


All command on Linux should have a a man page. (manual). So you can type "man cwd" or "man ls" and find out how to run that command. If avrdude is properly installed you should be able to type "man avrdude" and read its user manual.

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

The fact that 'Arduino' can perform the task proves all drivers are present and accounted for. The issue here looks to be the commands issued to avrdude, as you suspected.

I would suggest that you check the box "Show Verbose output during upload" in the Arduino IDE prefences, flash the blink program again,and note the syntax of the commands to avrdude, which will show up in the 'log pane'

Its very likely that avrdude needs the path you mentioned, something like
/dev/cu.usb-gizmo

Even if that is not the case, the log will show the commands used, giving you good clues as to how to proceed.

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

Dear KireAVR,

Had you found the solution for ACERISP mkII on Mac problem which you described in your first post?
I heave exactly the same problem on my MBA with OS X 10.8.4 and can't find any right solution. Everywhere said that if you have Mac then everything must just work, but it doesn't :(.