|
From: | Felix Ruess |
Subject: | Re: [Paparazzi-devel] V 4.2 + Lisa M 2.0 - compilation error |
Date: | Wed, 6 Feb 2013 16:20:03 +0100 |
Hi Felix,
how do I find which version of luftboot I am using?
I did some more testing, so - I checked the versions and outputs, and it is all correct (the same outputs as you had in the previous post).
I have a couple of Lisa M 2.0 boards (actually Lia boards, but they are basically the same), so I tested all of them.
First test - blinking LEDs
I chose A/C setup_lisam2 and then target test_led. I am using paparazzi v.4.2 correctly configured (see the previous post).
I will the boards with the Transition Robotics codes, maybe it helps you spot the problem. If the code works well, only LED 1 and LED 2 should be blinking. All boards were tested bare, just plugged to USB, nothing else.
#0. Lia with Aspirin 2.1. (ASP21 211) - all leds light up, no blinking
#1. Lia (LI1 203) w. Aspirin 2.2 (ASP22 007) - all leds light up, no blinking
#2. Lia (LI1 201) with Aspirin 2.1 (ASP21 210) - all leds light up, no blinking
#3. Lia (LI1 202) w. Aspirin 2.2. (ASP22 009) - all leds light up, no blinking
#4. Lia (LI1 204) w. Aspirin 2.2 (ASP22 011) - all leds light up, no blinking
#5. Lia (LI1 205) w. Aspirin 2.2 (ASP22 012) - all leds light up, no blinking
#6. Lia (LI1 210) w. Aspirin 2.2 (ASP22 058) - all leds light up, no blinking
With master version, all 7 boards worked fine (LED 1 and 2 blinking).
Second test - A/C Quad_LisaM2 w Aspirin 2.1 (default config).
I realized that on the boards with Aspirin 2.1 we have connected the auxI2C on Aspirin with I2C2 on Lia to be able to read baro (btw the code for LisaM baro is still the one for bmp05 - not for ms5611 as in master), so of course default configuration wont work (basically once you get two masters talking on I2c bus, whole system stops - probably because of the way i2c exceptions are handled). So I run the code only on the boards with Asp 2.2.
For this test I connected the boards to downlink modem to get telemetry. Power was from USB.
I used only first four boards as I dont have soldered connection on the rest.
#1. Lia (LI1 203) w. Aspirin 2.2 (ASP22 007) - just SYS_LED blinking, no telemetry, no system activity
#3. Lia (LI1 202) w. Aspirin 2.2. (ASP22 009) - attitude estimation ok, telemetry ok, of course no baro
I have no explanation for #1 - maybe just the board is somehow broken?
Third test - Quad_LisaM2 w Aspirin 2.1 with dummy lisa_m/baro_board.* (empty functions, so no i2c2 communication occurs)
I used version 4.2., again connected the boards to downlink modem, powered from USB
#0. Lia with Aspirin 2.1. (ASP21 211) - attitude ok, telemetry ok, of course no baro
#1. Lia (LI1 203) w. Aspirin 2.2 (ASP22 007) - just SYS_LED blinking, no telemetry, no system activity
#2. Lia (LI1 201) with Aspirin 2.1 (ASP21 210) - just SYS_LED blinking, no telemetry, no system activity
#3. Lia (LI1 202) w. Aspirin 2.2. (ASP22 009) - attitude ok, telemetry ok, of course no baro
Fourth test - Quad_LisaM2 w Aspirin 2.1 with dummy lisa_m/baro_board.* (empty functions, so no i2c2 communication occurs) + MPU6000_NO_SLAVES defined (so no auxI2c used)
I used version 4.2., again connected the boards to downlink modem, powered from USB
#0. Lia with Aspirin 2.1. (ASP21 211) - attitude ok, telemetry ok, of course no baro
#1. Lia (LI1 203) w. Aspirin 2.2 (ASP22 007) - attitude frozen at -45 deg pitch, 0deg roll, no updates from Aspirin, of course no baro
#2. Lia (LI1 201) with Aspirin 2.1 (ASP21 210) - attitude frozen at -45 deg pitch, 0deg roll, no updates from Aspirin, of course no baro
#3. Lia (LI1 202) w. Aspirin 2.2. (ASP22 009) - attitude ok, telemetry ok, of course no baro
Out of curiosity, I carried on another test with master branch:
Fifth test - Quad_LisaM2 w Asprin 2.1. + defined BARO_I2C for boards with Aspirin 2.1. and defined BARO_SPI for boards with Aspirin 2.2
master version, boards connected to downlink modem only, power from USB
#0. Lia with Aspirin 2.1. (ASP21 211) - attitude ok, baro ok, telemetry ok
#1. Lia (LI1 203) w. Aspirin 2.2 (ASP22 007) - attitude ok, baro ok, telemetry ok
#2. Lia (LI1 201) with Aspirin 2.1 (ASP21 210) - attitude frozen at -45 deg pitch, 0deg roll, no updates from Aspirin, baro ok
#3. Lia (LI1 202) w. Aspirin 2.2. (ASP22 009) - attitude ok, baro ok, telemetry ok
So in summary, the questions are:
1) How is it possible that in version 4.2 test_led doesn't work for ANY Lia board, but in master branch it works great?
2) Board #2 seems to be broken - or at least the Aspirin unit. Do you have an idea how to verify it? I think it is possible, although it was never crashed seriously.
3) Board #1 is basically the same as #3, although it runs properly only with master version. And #3 does ok in all tests. Can it be a hardware issue? But if it works in master?
Maybe it is somehow related to different luftboot versions? I know that board #0 is older (i.e. September), and it has to have a switch for flashing (to connect two pins at Analog1 port). But all the other boards can be flashed directly after plugging in USB (I guess the luftboot just senses if there is voltage on USB port), and are from December. Were there any HW changes in Lia (not Aspirin)?
Cheers
MichalOn Thu, Jan 31, 2013 at 4:13 PM, Felix Ruess <address@hidden> wrote:
Hi Michal,Sorry to hear you have more trouble....I just checked again and reflashed v4.2.0_stable-4-g7040565: LisaM 2 with Aspirin 2.1 works as expected (with Quad_LisaM_2 airframe).LisaM 1 with Aspirin 1.5 works fine as well here...Do you have anything connected to them?Do you get the same versions/output as I posted in the previous mail?How are you flashing them, do you have luftboot on them, which version?Cheers, FelixOn Thu, Jan 31, 2013 at 9:25 PM, Michal Podhradsky <address@hidden> wrote:
Most likely:)
Anyway, I ran into a different issue now.
When I compile and upload Quad_LisaM2 as is, and the power on Lisa board, literally nothing happens - not even SYS_TIME_LED is blinking, only the power led is on.
I have a couple of Lisa M2 boards, either with Aspirin 2.1. and Aspirin 2.2.
This issue happens on all of them.
However, when I compile the same code on master version and then flash it, it works ok.
So I tried to run some tests on lisaM (setup_lisam2 A/C) on v.4.2
First, I uploaded test_led (so led 1 and 2 should be blinking, the code is https://github.com/paparazzi/paparazzi/blob/v4.2/sw/airborne/lisa/test_led.c). But instead all five LEDs are switched ON all the time, no blinking.
Again, on master branch it works as it should.
I tried several different targets and none of them work on v.4.2 - the same thing as with test_led happens (i.e. all five leds switched ON all the time, no system activity). Of course, they all work on master version.
can you reproduce the same problem? Do you think it could be something with mcu initialization or the "older" libraries?
Cheers
MichalOn Thu, Jan 31, 2013 at 11:53 AM, Felix Ruess <address@hidden> wrote:
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, FelixOn 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!
MOn 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_versionv4.2.0_stable-4-g7040565$ dpkg --status paparazzi-arm-multilib | grep 'Status\|Version'Status: install ok installedVersion: 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.ldIf 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.compileYou 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.listshould return nothing...Cheers, FelixOn 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, FelixOn 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
_______________________________________________
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
[Prev in Thread] | Current Thread | [Next in Thread] |