[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Paparazzi-devel] Hello!
From: |
antoine |
Subject: |
Re: [Paparazzi-devel] Hello! |
Date: |
Fri, 21 Nov 2003 01:35:50 +0100 |
Hi Shakeel
Sorry for taking so long to moderate your post. You should subscribe to
the mailing list
(see http://mail.nongnu.org/mailman/listinfo/paparazzi-devel) to be able
to post without beeing moderated.
On 2003.11.09 11:51 Ahmad Shakeel wrote:
Hi all!
I am an R/C pilot and want to make an autopilot for my
trainer. I am really inspired by the paparazzi project
and this is a very good attempt to make a uav.
Thanx a lot :)
I am new to AVR development and programming and also
to gcc. I need some basic "How to" for the programming
environment under linux and gcc. In the past I have
programmed some basic MCUs like 8051 but have no
experience with AVRs. For 89C51 we have one .c or .cpp
file when compiled produces a .hex file which is
downloaded to the eprom of the MCU but here I have
seen that there are may files under one directory and
one MakeFile that is used for compilation. How the
MakeFile can include and compile all the .c files in
one hex file?
here, each .c file will produce a .o (object file)
use a command like
avr-gcc -Wall -mmcu=atmega128 -r -o test.o test.c
The -Wall option tells the compiler to produce all warnings. The -r option
tells the compiler not to link
The -o option tells him the name of the file you want to generate
Then you can link one or several object files in a .elf
use a command like
/usr/local/atmel/bin/avr-gcc -mmcu=atmega128 -o test.elf test1.o test2.o
Then you can convert the .elf in .hex with a command like
avr-objcopy -O ihex test.elf test.hex
"Make" will allow you to avoid typing these tedious commands.
You give him a set of rules describing how to produce a .o from a .c, a
.elf from .o, etc...
Based on modification time of files, make will then find which files need
to be recompiled and execute required commands.
you can type "info make" to get details about make.
I admit the syntax is a little confusing, so you should start by modifying
existing Makefiles.
You can use the ones in our CVS
Also is there any complete system overview diagram
available for the paparazzi?
Maybe you can look at the slides
(http://www.nongnu.org/paparazzi/slides_962624.pdf) from the journées
microdrone (sorry they are in french).
hth
Antoine