[Top][All Lists]

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

Re: [Paparazzi-devel] Setting flags for build?

From: Ben Laurie
Subject: Re: [Paparazzi-devel] Setting flags for build?
Date: Sat, 7 Sep 2013 17:35:31 +0100

On 1 September 2013 17:36, Felix Ruess <address@hidden> wrote:
Hi Ben,

easiest is to compile from the Paparazzi directory:
make AIRCRAFT=ardrone2_sdk ap.compile
or equivalently:
make -C /home/ben/git-work/paparazzi AIRCRAFT=ardrone2_sdk ap.compile

If I do this, I get a bit further, but...

CC /home/ben/git-work/paparazzi/var/ardrone2_sdk/ap/firmwares/rotorcraft/main.o
In file included from /home/ben/git-work/paparazzi/sw/airborne/firmwares/rotorcraft/telemetry.h:33:0,
                 from firmwares/rotorcraft/main.c:37:
/home/ben/git-work/paparazzi/sw/airborne/subsystems/radio_control.h: In function â:
/home/ben/git-work/paparazzi/sw/airborne/subsystems/radio_control.h:97:5: error: expected _expression_ before â token
/home/ben/git-work/paparazzi/sw/airborne/subsystems/radio_control.h:100:5: error: expected _expression_ before â token
make[1]: *** [/home/ben/git-work/paparazzi/var/ardrone2_sdk/ap/firmwares/rotorcraft/main.o] Error 1
make: *** [ap.compile] Error 2

(I have no idea what's up with the compiler saying "â" instead of function names, etc - it seems to have started doing that since an Ubuntu update, but it is unrelated, since the compile works fine from the Paparazzi Center).


The main Makefile automatically sets the PAPARAZZI_HOME and PAPARAZZI_SRC environment variables, and if you explicitly specify another Makefile directly (for which there is no need) these are not not automatically set.

Regarding passing extra command line defines: the easiest way is probably to add <define name="FOO" value="BAR"/> to the firmware section of your airframe file, which will be added as a global command line define (-DFOO=BAR). You can also omit the value to get -DFOO.

Hope that helps,...

Cheers, Felix

On Sun, Sep 1, 2013 at 6:00 PM, Ben Laurie <address@hidden> wrote:
I've been debugging the ARDrone stuff (patches soon). It'd be nice to be able to #if the debug code rather than comment it out.

Is there an easy way to -D some flag for the build from the Paparazzi Center?

Also, how do I build from the command line? I tried just using the command line it shows:

make -C /home/ben/git-work/paparazzi -f AIRCRAFT=ardrone2_sdk ap.compile

But I get:

make: Entering directory `/home/ben/git-work/paparazzi'
Paparazzi version v5.0.0_stable-95-g80193d1-dirty
BUILD ardrone2_sdk, TARGET ap
Fatal error: exception Xml.File_not_found("/home/ben/paparazzi/conf/conf.xml")
make: *** [ap.ac_h] Error 2
make: Leaving directory `/home/ben/git-work/paparazzi'

Paparazzi-devel mailing list

Paparazzi-devel mailing list

reply via email to

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