[chbot] AVR external interrupt and Makefile example
Charles Manning
manningc2 at actrix.gen.nz
Wed Nov 11 19:36:52 GMT 2009
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
More information about the Chchrobotics
mailing list