Micromouse book
Categories
Recent Comments
Meta
Popular Posts
- Simple ADC use on the STM32 (4,106)
- STM32 Arm-Cortex bootloader (2,803)
- STM32 USART basics (2,704)
- All Japan Micromouse 2011 – finals (2,011)
- STM32F4 – the first taste of speed (1,690)
- Micromouse Book (1,589)
- Nokia 3410 LCD on the STM32 (1,337)
- CodeSourcery GNU Toolchain for the ARM on a Mac (1,145)
- Bit Banding in the STM32 (1,047)
- ARM STM32 JTAG (973)
Blogroll
-
Upcoming Events
Tag Archives: avrmacpack
AVRMacPack and Xcode
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
/usr/usr/local/AVRMacPack/etc/templates/TemplateProject
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… Continue reading
Add to Google