avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] makefile for ubuntu


From: Matthew MacClary
Subject: Re: [avr-gcc-list] makefile for ubuntu
Date: Wed, 12 Oct 2005 18:38:21 -0700
User-agent: Mutt/1.4.1i

On Wed, Oct 12, 2005 at 12:58:33PM -0700, Cullen Newsom wrote:
> Does anyone want to tell me all the undocumented* tricks to getting
> a working dev environment for avr-gcc on ubuntu with the stk200 and
> either it's programmer, or with avrisp?  Anyone have a makefile that
> might work?

    I found setting up Ubuntu for AVR development straightforward
because Ubuntu shares Debian's packages. The development board and
programming cable I use aren't exactly the same as an stk200 but uisp
still programs fine if I tell it that a stk200 is attached. (Sorry I
don't have information about using other programming software.) Here
is the set-up I use:

1) Open synaptic package manager.

2) Add "Universe" packages.

3) Select avr-libc, binutils-avr, gcc-avr, and uisp.

4) Apply changes.

5) Create a makefile that can generate hex files. Possible options are
   mfile (http://www.sax.de/~joerg/mfile/), or the Makefile included
   in WinAVR (http://sourceforge.net/projects/winavr/)

6) Once you have a hex file, you can program it like this: 

uisp -dprog=stk200 -dpart=atmega128 -dlpt=$(PARPORT) --erase --upload 
if=$(PRG).hex

    Where $(PRG) is your base program name and $(PARPORT) is your
parallel port. In my case I didn't bother to create a /dev/parportX
device so I just run run uisp sudo and program directly to 0x378 which
is the common location for the first parallel port. It would be a good
idea to make a parallel port device at some point so I can make it
writable by normal users...

> I think I could have made a compiler out of papier mache'...

    You may want to make sure someone isn't already working on this so
you don't duplicate effort!

-Matt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]