The AVRmacpack for AVR development on the Apple Mac contains command line tools. These are all well and good if you want to do things the traditional way with text editors, terminal windows and make files. No real problem. However, if you want the benefits of a modern IDE with things like function lists and refactoring, you might want to try Xcode. It is, after all, supplied with your Mac.
It took me rather longer than I would have liked to find out how to get going with this. AVRMacPack comes with a sample project template. Once you have installed the tools you will find it in
Interestingly, this appears to be the exact same template that can be found tucked away in the Arduino package for the Mac. To make this template available to Xcode, you will need to copy it in the appropriate place. As far as I can tell, this is
~/Library/Application Support/Developer/Shared/Xcode/Project Templates
If you don’t know, the ~ is your home folder. To make it a bit clearer, rename the TemplateProject folder to something like AVR Project. I also put it into a folder called AVR in case I want to add other AVR project types later.Now, when you do File | New Project in Xcode, you should see a section called AVR in bold and, in there, your AVR project template.the template puts the code into a folder called firmware and places a Makefile in the project follder root. You will need to edit that Makefile to suit the details of your project – processor, clock speed etc.A project created in this way will build using the normal Xcode buttons. So far, however, I have not seem how to avoid opening a terminal to run the make flash command needed to program the target. Also, because the code is not associated with an Xcode target, refactoring will not work. Still, it is progress and I am sure that can be fixed at some stage. I know nothing about Xcode yet…
Incoming search terms:
- avrmacpack (1)