Author Topic: Working on Mac: A Solution for OSX Coding/Compilation  (Read 3312 times)

0 Members and 1 Guest are viewing this topic.

Offline ib1yysguyTopic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Working on Mac: A Solution for OSX Coding/Compilation
« 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

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

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.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Working on Mac: A Solution for OSX Coding/Compilation
« Reply #1 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 :)

Offline ib1yysguyTopic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: Working on Mac: A Solution for OSX Coding/Compilation
« Reply #2 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.

Offline ambcorp2000

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Please update the mac AVR links please
« Reply #3 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?

Offline Crunchy Theory

  • Full Member
  • ***
  • Posts: 80
  • Helpful? 0
  • "Well great is ok, but amazing would be great."
Re: Working on Mac: A Solution for OSX Coding/Compilation
« Reply #4 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

*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
« Last Edit: September 19, 2011, 11:06:11 PM by Crunchy Theory »
The only way to top an upright screen, keyboard, and mouse is to eliminate the need for humans to touch a PC at all. Oh, hello there Mr. Robot... what would I like you to do, you ask?

Offline WaterPig Master

  • Full Member
  • ***
  • Posts: 62
  • Helpful? 3
  • Hurdy Gurdy playing at Raglan
Re: Working on Mac: A Solution for OSX Coding/Compilation
« Reply #5 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/

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

Cheers,
Barnaby

 


Get Your Ad Here

data_list