[chbot] AVR external interrupt and Makefile example

Richard Jones rjtp at ihug.co.nz
Wed Nov 11 22:09:43 GMT 2009


Thanks Charles,

Nice suggestion, very gratefully received as I was unaware of github.
Is there something similar for bazaar or should I learn git? I've not used
bazaar yet either, but it is on my todo list and I think more compatible
with my cvs/svn background.
I Like the straight forward makefile in bump and turn, readable by mortals
like myself!
So for the next step in avr Makefiles I suggest folks have a look at yours
rather than adapt my simplified one.
http://github.com/cdhmanning/avrprojects/blob/master/bumpandturn/Makefile

Cheers

Richard

On Thu, 12 Nov 2009 08:36:52 +1300, Charles Manning
<manningc2 at actrix.gen.nz> wrote:
> Hello Richard
> 
> May I be so forward as to suggest you get a github account.
> 
> github provides source control and download in a really easy manner (and
> you 
> get to learn a bit about git if you want). It is easier to use than 
> sourceforge, IMHO.
> 
> Free for open source use.
> Mine is at: http://github.com/cdhmanning
> 
> If you do a lot of command line work under Windows, then it is really
worth
> 
> getting cygwin. This provides almost the full Unix-like environment under

> Windows.ie. make, grep, scripts etc. Google will find it.
> 
> -- CHarles
> 
> 
> On Wednesday 11 November 2009 23:30:11 Richard Jones wrote:
>> AVR external interrupt and Makefile example
>>
>> At the Chch Creative Space session last week there were some questions
>> about how to code the external interrupt and Makefiles for the AVR.
>>
>> I've collected together some code fragments from my micromouse and
placed
>> them in a single 'c' demo file. A simple Makefile collects together the
>> commands to compile the code, generate a hex file and program the device
>> using a serial bootloader. The Arduino makefiles are a fine example of
>> how
>> to obfuscate the process beyond belief. My makefile is a little too
>> simple
>> and would benefit from a few variables like target and cpu_frequency. If
>> you are interested have a look at the code and feel free to ask
questions
>> or propose improvements. Although the code does execute, printing out
the
>> external interrupt count about once per second, I noted 11 improvement
>> opportunities and one bug.
>>
>> At the command line type 'make' to build the code, 'make program' to
>> program the avr chip, and 'make clean' to delete all the temporary
files.
>> If you want to see what commands the make utility would issue without
>> actually executing commands type 'make -n program' at the command line.
>>
>> I compile the code using gcc on ubuntu, but it probably works just as
>> well
>> with gcc under windows or OS X.
>>
>> Richard
> 
> 
> 
> _______________________________________________
> Chchrobotics mailing list Chchrobotics at lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/chchrobotics
> Mail Archives: http://lists.ourshack.com/pipermail/chchrobotics/
> Web site: http://kiwibots.org
> Meeting Dates:
> Tue 15 December 2009 6.30pm
> Tue 16 February 2010 6.30pm
> When replying, please edit your Subject line to reflect new content.



More information about the Chchrobotics mailing list