paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] how to compile and upload sw/airborne/main_demo#.c


From: Miles Colman
Subject: Re: [Paparazzi-devel] how to compile and upload sw/airborne/main_demo#.c to a Tiny v2?
Date: Fri, 18 Apr 2008 09:09:38 +0900

Hi Antoine,

Did you ever compile motor_bench? It seems that is another
non-aircraft that gets compiled as an airframe.

Just to clarify where I'm at:
I changed all occurrences of demo_conf in demo.xml to tiny_2_1 and
added this section to conf.xml:
  <aircraft
    name="demo"
    ac_id="5"
    airframe="airframes/microjet5.xml"
    radio="radios/cockpitMM.xml"
    telemetry="telemetry/default.xml"
    flight_plan="flight_plans/basic.xml"
    settings="settings/basic.xml"
  />

then I do:
make AIRCRAFT=demo demo3.compile

fails:

[...]
cd sw/logalizer; make PAPARAZZI_SRC=/home/mcolman/paparazzi3
PAPARAZZI_HOME=/home/mcolman/paparazzi3
make[1]: Nothing to be done for `all'.
cd sw/ground_segment/lpc21iap; make
make[1]: Nothing to be done for `all'.
cd sw/simulator; make PAPARAZZI_SRC=/home/mcolman/paparazzi3
PAPARAZZI_HOME=/home/mcolman/paparazzi3
PAPARAZZI_SRC=/home/mcolman/paparazzi3
arm-elf-gcc -I./ -I../ -c -W -Wall -Os -g -mcpu=arm7tdmi -mthumb
-mthumb-interwork -MM usbhw_lpc.c usbcontrol.c usbstdreq.c usbinit.c >
.depend || rm -f .depend
demo
BUILD demo
make[1]: Nothing to be done for `all_ac_h'.
cd sw/airborne; make PAPARAZZI_SRC=/home/mcolman/paparazzi3
PAPARAZZI_HOME=/home/mcolman/paparazzi3 TARGET=demo3 all
Makefile:40: ../../conf/Makefile.: No such file or directory
make[1]: *** No rule to make target `../../conf/Makefile.'.  Stop.
make: *** [demo3.compile] Error 2

Heeelp! Please.
Miles

On Fri, Apr 18, 2008 at 8:19 AM,  <address@hidden> wrote:
> Hi Miles
>
>
>  Quoting Miles Colman <address@hidden>:
>
>
> > Hi Antoine,
>  >
>  > Thanks for your patience. Could you please send me a Makefile that
>  > makes 'make demo# .compile' work or just tell me what to do, step by
>  > step?
>  >
>  > I edited conf/airframes/demo.xml as you suggested.
>  > I'm still using 'make AIRCRAFT=demo demo1.compile' with a fake demo
>  > airframe section in conf.xml so that compilation finishes. I'm
>  > guessing that's not right, since the LED still doesn't blink.
>
>  that's the correct way and the expected result - demo1 does nothing
>
>  you can see that from sw/airborne/main_demo1.c
>
>  #include "std.h"
>
>
>  int main( void ) {
>   while(1) {
>
>   }
>   return 0;
>  }
>
>  and the comment in conf/airframe/demo.xml ( simple emtpy demo )
>
>
>
>
>  demo2 is the one that blinks a led ( hardware init ( pll ), system time and 
> LEDs
>  )
>
>  so, change the line
>  demo2.CFLAGS += -DCONFIG=\"conf_demo.h\"   (in conf/airframe/demo.xml)
>  to
>  demo2.CFLAGS += -DCONFIG=\"tiny_2_1.h"
>
>  and you should be good
>
>
>
>
>  >
>  > I also tried 'make demo1.compile', after changing the Makefile by
>  > commenting out
>  > conf: conf/conf.xml conf/control_panel.xml
>  > and putting in
>  > conf: conf/demo.xml
>  > but that complains about 'No rule to make target `conf/demo.xml',
>  > needed by `conf'
>  > I tried pasting in the [ -L $@ ... line from below as a guess at what
>  > the rule was, but it wasn't a good guess.
>
>  Not sure what you are trying to do here...
>
>  I agree that our code and Makefile generation system might seem a little
>  complicated at first but it's not so difficult
>
>  when you type
>  make AIRCRAFT=Foo a_target.compile
>  the makefile looks for an entry (aka aircraft) named Foo in conf/conf.xml
>  This entry will contain
>
>  -1 a number of files used to generate code, like for example the 
> characteristics
>  of the rc transmitter you are using, the rate of periodic telemetry messages 
> you
>  want, the variables you want to be able to adjust and your flight plan. It
>  "compiles" those files into C code. I will go deeper into this at a later 
> time,
>  but having static C code generated instead of doing all this configuration at
>  runtime allows for better effiency and safety
>
>  -2 a file called airframe ( conf/airframes/demo.xml ) in your case
>  This file is also "compiled" to produce both a header ( var/Foo/airframe.h ) 
> and
>  a Makefile (var/Foo/Makefile.ac )
>
>  The header will contain all the parameters specific to your particular 
> airplane
>  ( where did you connect your peripherals, their calibration values, etc... )
>  Some of those parameters only depends on the specific hardware. For example 
> on
>  the tiny, the servo driver is soldered on the board, so it will always be
>  connected to the same IOs of the processor. To avoid repeating that in every
>  aircraft, a specific header for each supported hardware can be created and
>  included. This is this -DONFIG="somefile". Those files are stored in
>  conf/autopilot
>
>  This doesn't sound very clear.. I'll attempt a better explanation later
>
>  Good luck with the demos
>
>  Poine
>
>
>
>
>
>




reply via email to

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