Reputation: 24658
Is there a good reference on how to set up an Arduino programming environment with Xcode?
An ideal answer would be along the lines of, "Oh yes, there's an active project on Google Code, just download the .dmg, copy the ${Xcode magic config file} to ${somewhere in ~Library}, restart Xcode and select "New Arduino Project" from the File menu. Click Build with your Arduino plugged in and it uploads it direct to the hardware."
Google gives a couple of hits, but they're kind of vague and out-of-date (specifically, the way Xcode does project templates changed between Xcode 3 and 4 and I can't find an Xcode 4 template.) I've officially outgrown Processing and I'd prefer not to blight my home life with Eclipse if at all possible.
Upvotes: 15
Views: 4760
Reputation: 51
Alternatively, if you are looking for a solution that is independent of XCode (or just another solution), check out CrossPack for AVR Development. Essentially, it is an AVR toolchain for OSX
This will allow you to develop outside of the Arduino IDE with C/C++. It is terminal line only.
https://www.obdev.at/products/crosspack/index-de.html
However, the instructable below gives steps for using it with the Eclipse IDE (well, the Eclipse IDE using it).
http://www.instructables.com/id/Setup-AVR-programming-on-OS-X-using-Eclipse/?ALLSTEPS
Upvotes: 2
Reputation: 24658
I have just come across embedXcode which does exactly what I want.
Upvotes: 2
Reputation: 641
You can actually use the arduino GUI to compile and upload, and set the editor to external in the preferences. That way, you can edit the C++ (PDE) files from xcode, and have arduino generate the actual CPP and build the whole shebang.
You can also use XCode to write plain C++/C for the arduino, using the avr-gcc compiler.
Have a look at: https://stackoverflow.com/a/8192762/153835
You can then use the plain avrdude upload tool to program the arduino. Have a look at: http://www.ladyada.net/library/arduino/bootloader.html
It used to be that the protocol spoken by Arduino was a modification of the STK500 protocol, and that only the avrdude bundled with arduino could speak it. I don't know if the mainstream avrdude was upgraded, or if you still have to resort to the avrdude inside the Arduino folder.
Upvotes: 5
Reputation: 24658
I also asked around on the Arduino forums and they're at the point where someone's posted a Makefile which works for me, but the templating system for Xcode4 is vastly different to Xcode3 and apparently still in some state of flux.
So as of May 2011 the answer I wanted to hear still doesn't exist but we're getting closer.
Upvotes: 0