Using demo programs in sw/airborne-tiny2.1

From Paparazzi

Jump to: navigation, search

Contents

Compiling the demo's for Tiny2.1

Currently the demos do not compile for Tiny2.1 (see this discussion).

In order to compile them do the following:

Modify for the Tiny2.1 LEDs

Edit sw/airborne/main_demo2.c and change then last function to:

 static inline void main_periodic_task( void ) {
   LED_TOGGLE(1);
   LED_TOGGLE(2);
   LED_TOGGLE(3);
 }

Modify the include directives

Edit the file conf/airframes/demo.xml and change every occurance of

  -DCONFIG=\"conf_demo.h\"

into

  -DCONFIG=\"tiny_2_1.h\"

(see attached patch).

Modify your main conf.xml

Add the below to your conf.xml:

 <aircraft
    name="demo"
    ac_id="1"
    airframe="airframes/demo.xml"
    radio="radios/cockpitSX.xml"
    telemetry="telemetry/booz.xml"
    settings="settings/booz.xml"
    flight_plan="flight_plans/booz_test_1.xml"
 />

Warning: the conf/conf.xml file is created by copying

 conf/conf.xml.example

as part of making the s/w. See Makefile.install.

Compile

The compile with

   ./paparazzi-make  AIRCRAFT=demo demo2.upload

assuming that your PAPARAZZI_HOME is set to the top level directory of your checkout.