Society of Robots - Robot Forum

Software => Software => Topic started by: ib1yysguy on February 03, 2009, 02:20:51 AM

Title: Working on Mac: A Solution for OSX Coding/Compilation
Post by: ib1yysguy on February 03, 2009, 02:20:51 AM
I was having a little trouble getting the standard templates and avr-gcc apps to work with XCode 3.1.2, but after some tinkering I think I've streamlined the compilation process for we unfortunate Mac users.

The templates for XCode that I uncovered didn't work for me at all. I believe it has something to do with the new features that support loading multiple versions of XCode onto one machine (it just changes where it puts the Unix executables so nothing else can find them properly). By putting the following file into the 'Developer/Library/XCode/Project Templates' directory you will see an option for ATmega640 Project turn up next time you boot XCode. This will generate a .C file for you to program and a Makefile. The 'target' has been modified to call up the proper gcc file for the make command. It will produce a file called 'firmware.hex' when you build it.

http://alexwsutherland.s3.amazonaws.com/AVR.dmg (http://alexwsutherland.s3.amazonaws.com/AVR.dmg)

All of this relies on some other more invisible software that you may or may not already have. Many of the following avr-gcc/avrdude files are available in different packages but they don't all install the same way. MacPack, for instance, will not work with this template. They're all intended for use with Terminal but who likes using terminal? This way you can slide around that inconvenience. I'm linking the necessary files (which I found on Sourceforge, I think) below:

http://alexwsutherland.s3.amazonaws.com/MacAVRGCC.dmg (http://alexwsutherland.s3.amazonaws.com/MacAVRGCC.dmg)

All of that should produce the proper .hex file you need for the ATmega640 on the Axon board. As for uploading it to the chip, I'm told you can do that via dosbox (with which I've had some success running vintage games).

I'll be working on making a Mac OS X GUI for the Windows/Dos version of the software available on this site for installing the hex file, but who knows when I'll get that done. In the meantime, let me know if all this works for any of you and if you have a chance to try Dosbox let me know if there are any secret handshakes one needs to know to get it functioning.
Title: Re: Working on Mac: A Solution for OSX Coding/Compilation
Post by: Admin on February 04, 2009, 05:09:39 AM
I just created this FAQ question and linked your post over to it:
http://www.societyofrobots.com/axon/axon_FAQ.shtml#mac_linux

Hopefully that will help you and others work together more effectively :)
Title: Re: Working on Mac: A Solution for OSX Coding/Compilation
Post by: ib1yysguy on February 04, 2009, 11:51:16 AM
I'm noticing now that the files linked to in the first forum post you link to on the FAQ sheet are the same files I copied onto my S3 server for distribution. I could have sworn I found it on sourceforge, but no worries. I'll leave it up anyhow.

I can't wait to order my Axon so I can give this thing a try.
Title: Please update the mac AVR links please
Post by: ambcorp2000 on September 12, 2011, 07:12:46 PM
I thought this was a good post for mac enthusiasts so can ib1yysguy or someone else update the links please? Are there any of us who have an AVR working on a mac?
Title: Re: Working on Mac: A Solution for OSX Coding/Compilation
Post by: Crunchy Theory on September 19, 2011, 10:58:47 PM
Here's my post from another thread on some Mac support. I didn't use XCode, though, so won't be much help there. I mainly just use a text editor, makefiles, and avrdude

http://www.societyofrobots.com/robotforum/index.php?topic=12680.msg95098#msg95098 (http://www.societyofrobots.com/robotforum/index.php?topic=12680.msg95098#msg95098)

*edit* Also, here are the tools for Mac (which I think is more toward what you're asking for): http://www.obdev.at/products/crosspack/index.html (http://www.obdev.at/products/crosspack/index.html)
Title: Re: Working on Mac: A Solution for OSX Coding/Compilation
Post by: WaterPig Master on September 21, 2011, 01:54:37 PM
Hello,

Just thought I'd help any PIC programmers using Macs out by posting my Instructable on doing the very same: http://www.instructables.com/id/Developing-for-PICs-using-a-Mac/ (http://www.instructables.com/id/Developing-for-PICs-using-a-Mac/)

I'll have a nicer version written up for my real website at some point.

Cheers,
Barnaby