Ishan Dhingra
Ishan Dhingra

Reputation: 2462

how to make Mac detect AVR board using USBasp and burn program to it?

I am new to Embedded, starting with AVR programming using C. I am working on Mac OS 10.9.4, so far I am using avrdude and xCode as IDE. It works very well, for now I am testing my code using Proteus.

But now I want to burn my .hex to AVR ATMega16 board. I have USBasp, which I am able to connect and it lights up the board. Now after searching on the internet, I think Mac is not detecting my board. I have checked /dev directory, but no usb device found.

So I am not sure what to next, how to make Mac detect my board and burn my .hex on it. I've found this: http://www.fischl.de/usbasp/ but no idea how to use this or its required or not.

So question stand is: how to make Mac detect AVR board using USBasp and burn program to it?

FYI: I've installed CrossPack on Mac.

Upvotes: 3

Views: 12855

Answers (2)

Ishan Dhingra
Ishan Dhingra

Reputation: 2462

After reading AVR and CrossPack docs, I've found really easy to do this.

For AVR development environment setup, do the following thing:

  1. Install xCode on your Mac, choose latest version.
  2. Now install CrossPack.

This will do all the environment setup. CrossPack installs required libs to support USBasp as well.

To create project using xCode:

  1. Create new project
  2. Select xAVR project on next screen
  3. Next set MCU you are using, Programmer to USBAsp, Frequency as needed.

There you go, try a first first time build it may fail, but try again it will work smooth.

You can use AVR DUDE directly from Terminal:

avrdude -c usbasp -p <partno> -P usb -v

Upvotes: 4

Brett Hale
Brett Hale

Reputation: 22318

avrdude knows about the USBasp programmer. You can just specify usb as the port, and avrdude should search the USB devices for the programmer. e.g., you could test with:

avrdude -c usbasp -p <partno> -P usb -v

Programmers are described in the etc/avrdude.conf file, and <partno> options are detailed here.

Upvotes: 2

Related Questions