paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] V 4.2 + Lisa M 2.0 - compilation error


From: Felix Ruess
Subject: Re: [Paparazzi-devel] V 4.2 + Lisa M 2.0 - compilation error
Date: Thu, 31 Jan 2013 19:53:55 +0100

Ok, you must have manually copied them there somehow, as they are not part of the binary package.
But I'm glad you were able to resolve it :-)

Cheers, Felix


On Thu, Jan 31, 2013 at 7:52 PM, Michal Podhradsky <address@hidden> wrote:
Thanks for help Felix,
for some reason I had in /opt/paparazzi/arm-multilib/arm-none-eabi/lib/ these two files:
libopencm3_stm32f1.a and libopencm3_stm32f1.ld which shouldn't be there, and
it confused the compiler. I deleted them and now it works fine.

Cheers!
M


On Thu, Jan 31, 2013 at 11:40 AM, Felix Ruess <address@hidden> wrote:
Hi Michal,

this is strange, it runs fine here on 12.04 with paparazzi-arm-multilib.
Which repository did you set up? the paparazzi-uav ppa hopefully?

There is also really no point in copying the latest libopemcm3 files, as the API and some include paths have changed...
Best removed what you copied again, purge paparazzi-arm-multilib (make sure /opt/paparazzi/arm-multilib was removed) and reinstall it.
And you don't have any other compilers/libs installed somewhere else where it might find them first?

Could you please post the output of the following commands (after the $)
(example ouputs from my machine below the commands):

$ ./paparazzi_version
v4.2.0_stable-4-g7040565

$ dpkg --status paparazzi-arm-multilib | grep 'Status\|Version'
Status: install ok installed
Version: 1.2.3-1~precise

$ ls -l /opt/paparazzi/arm-multilib/arm-none-eabi/lib/ | grep libopencm3_stm32
-rw-r--r-- 1 root root  295236 Jan 15 14:22 libopencm3_stm32.a
-rw-r--r-- 1 root root    1590 Jan 15 14:22 libopencm3_stm32.ld


If you get the same outputs, Quad_LisaM_2 should compile fine (assuming you don't have any other compiler in your path or include files somewhere).
Compile the Quad_LisaM_2 example:
$ make AIRCRAFT=Quad_LisaM_2 clean_ac ap.compile

You should see the line:
Using CC   = /opt/paparazzi/arm-multilib/bin/arm-none-eabi-gcc

Make double certain that STM32F1 is NOT defined:
$ grep STM32F1 var/Quad_LisaM_2/ap_srcs.list
should return nothing...

Cheers, Felix


On Thu, Jan 31, 2013 at 7:05 PM, Michal Podhradsky <address@hidden> wrote:
Hi Felix,

I removed paparazzi-dev and paparazz-arm-multilib packages, as well as gcc (ver. 4.6) package.
Then I installed paparazzi packages on a clean machine again:
sudo apt-get install paparazzi-dev paparazzi-arm-multilib
I downloaded and compiled Paparazzi v 4.2. and tried to compile Quad_LisaM A/C

The error is the same: arch/stm32/mcu_arch.c:36:39: fatal error: libopencm3/stm32/f1/rcc.h: No such file or directory
I looked at what is going on and the problem seems to be following - both in arch/stm32/mcu_arch.c and arch/stm32/subsystems/settings_arch.c you have this defines:
#if USE_OPENCM3
#    if defined(STM32F1) || defined(STM32F2) || defined(STM32F4)
#        include <libopencm3/stm32/f1/rcc.h>
#    else
#        include <libopencm3/stm32/rcc.h>
#    endif

(or flash.h respectively).

But when I looked at directories installed with arm-multilib, there is no folder for STM32 type F1 architecture:
 /opt/paparazzi/arm-multilib/arm-none-eabi/include/libopencm3/stm32$ ls -g
-rw-r--r-- 1 root 15352 Jan 15 06:22 adc.h
-rw-r--r-- 1 root  6337 Jan 15 06:22 bkp.h
-rw-r--r-- 1 root 22078 Jan 15 06:22 can.h
-rw-r--r-- 1 root  1673 Jan 15 06:22 crc.h
-rw-r--r-- 1 root  2203 Jan 15 06:22 dbgmcu.h
-rw-r--r-- 1 root 24503 Jan 15 06:22 dma.h
-rw-r--r-- 1 root  8017 Jan 15 06:22 ethernet.h
-rw-r--r-- 1 root  2180 Jan 15 06:22 exti.h
-rw-r--r-- 1 root  3945 Jan 15 06:22 flash.h
-rw-r--r-- 1 root  8442 Jan 15 06:22 fsmc.h
-rw-r--r-- 1 root 20131 Jan 15 06:22 gpio.h
-rw-r--r-- 1 root  9750 Jan 15 06:22 i2c.h
-rw-r--r-- 1 root  2380 Jan 15 06:22 iwdg.h
-rw-r--r-- 1 root  4910 Jan 15 06:22 memorymap.h
-rw-r--r-- 1 root  5260 Jan 15 06:22 nvic.h
-rw-r--r-- 1 root 13059 Jan 15 06:22 otg_fs.h
-rw-r--r-- 1 root  2342 Jan 15 06:22 pwr.h
-rw-r--r-- 1 root 15581 Jan 15 06:22 rcc.h
-rw-r--r-- 1 root  4274 Jan 15 06:22 rtc.h
-rw-r--r-- 1 root 11623 Jan 15 06:22 scb.h
-rw-r--r-- 1 root 10616 Jan 15 06:22 spi.h
-rw-r--r-- 1 root  2914 Jan 15 06:22 systick.h
-rw-r--r-- 1 root 37673 Jan 15 06:22 timer.h
-rw-r--r-- 1 root  2063 Jan 15 06:22 tools.h
-rw-r--r-- 1 root  9800 Jan 15 06:22 usart.h
-rw-r--r-- 1 root  3196 Jan 15 06:22 usb_desc.h
-rw-r--r-- 1 root  9723 Jan 15 06:22 usb.h
-rw-r--r-- 1 root  2286 Jan 15 06:22 wwdg.h


Plus libopencm3/stm32/f1/rcc.h was not installed anywhere else (in this folder structure).

I tried to manually copy files for f1 architecture from libopencm3 (supplied with master version) to  /opt/paparazzi/arm-multilib/arm-none-eabi/include/libopencm3/stm32 and it produced this error instead:
/opt/paparazzi/arm-multilib/lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/include/libopencm3/stm32/f1/rcc.h:481:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
arch/stm32/mcu_arch.c:43:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'


So I guess it is either an installation issue ( I am running Ubuntu 12.04) or something with the packages?
What do you think Felix?

Cheers
M



On Wed, Jan 30, 2013 at 4:59 PM, Felix Ruess <address@hidden> wrote:
Hi Michal,

the stable releses v4.0 and v4.2 still use libopencm3 (actually was still libopenstm32 at that point) as packaged with the paparazzi-arm-multilib package.
Only in master we now include libopencm3 via sw/ext directly...

Also make sure that you don't have any other toolchain versions in your PATH (e.g. gcc-arm-embedded, which works nicely for master btw...)
or in any of your standard system library paths like you described above...
Otherwise the version in your path will be taken (takes precedence).

Also if you have PAPARAZZI_SRC|HOME set in your environment, make sure that it points to the directory you are currently using or remove it.

Cheers, Felix


On Thu, Jan 31, 2013 at 12:49 AM, Michal Podhradsky <address@hidden> wrote:
Hi guys,

I wanted to try the new stable (4.2) version, but the following happened:
1) I cloned version 4.2 to my computer, compiled it and run the paparazzi center
2) I chose A/C Quad_LisaM_2 and Built it without any modification (just default)
3) I got the following error:
...
GCC version:
arm-none-eabi-gcc (Linaro GCC 4.6-2011.09-1) 4.6.2 20110908 (prerelease)
*** Using multilib ***
--------------------------------------
CC /home/vanilla_4.2/paparazzi/var/Quad_LisaM_2/ap/mcu.o
CC /home/vanilla_4.2/paparazzi/var/Quad_LisaM_2/ap/firmwares/rotorcraft/main.o
firmwares/rotorcraft/main.c:43:9: note: #pragma message: CAUTION! RadioControl roll and yaw channel inputs have been reversed to follow aerospace sign conventions.
 You will have to change your radio control xml file to get a positive value when pushing roll stick right and a positive value when pushing yaw stick right!
CC /home/vanilla_4.2/paparazzi/var/Quad_LisaM_2/ap/arch/stm32/mcu_arch.o
arch/stm32/mcu_arch.c:36:39: fatal error: libopencm3/stm32/f1/rcc.h: No such file or directory
compilation terminated.
make[1]: *** [/home/vanilla_4.2/paparazzi/var/Quad_LisaM_2/ap/arch/stm32/mcu_arch.o] Error 1
make[1]: Leaving directory `/home/vanilla_4.2/paparazzi/sw/airborne'
make: *** [ap.compile] Error 2
make: Leaving directory `/home/vanilla_4.2/paparazzi'
DONE (exec make -C /home/vanilla_4.2/paparazzi -f Makefile.ac AIRCRAFT=Quad_LisaM_2 ap.compile  2>&1)



Obviously the version 4.2 is referring to some LIBOPENCM3 files (as is specified in sw/airborne/arch/stm32/...), but this library is not included in the release. I tried to use the library I use with the master version (in folder ext/) and copied it to sw folder, root folder and sw/airborne folder, but neither of that helped.

Also, I have libopencm3 files in /usr/local/arm-none-eabi/include/libopencm3, but it doesn't help either.

Do you know what I am doing wrong?

Thanks for help.
Michal

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



reply via email to

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