paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Fwd: Elle0 upload.


From: hendrixgr .
Subject: Re: [Paparazzi-devel] Fwd: Elle0 upload.
Date: Fri, 18 Mar 2016 19:47:28 +0200

Hi.
After a marathon of rewriting my code to suit the latest stable version (5.8 stable) downloaded as a tarball i eventually stumbled upon some errors
trying to compile the built in MentorEnergy aircraft (unmodified), in fact i get the same errors whenever i try to use the "energy" type of control.
If anyone knows what is wrong let me know otherwise just leave it since this problem is not that high in my priority list.
Chris

GCC version: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 227977]

CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/mcu.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/arch/stm32/mcu_arch.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/mcu_periph/sys_time.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/arch/stm32/mcu_periph/sys_time_arch.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/./inter_mcu.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/math/pprz_geodetic_int.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/math/pprz_geodetic_float.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/math/pprz_geodetic_double.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/math/pprz_trig_int.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/math/pprz_orientation_conversion.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/math/pprz_algebra_int.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/math/pprz_algebra_float.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/math/pprz_algebra_double.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/mcu_periph/i2c.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/arch/stm32/mcu_periph/i2c_arch.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/peripherals/bmp085.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/boards/lisa_m/baro_board.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/firmwares/fixedwing/main_fbw.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/subsystems/electrical.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/subsystems/commands.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/subsystems/actuators.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/firmwares/fixedwing/main_ap.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/firmwares/fixedwing/autopilot.o
CC /home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/state.o
In file included from firmwares/fixedwing/main_ap.c:86:0:
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h: In function 'settings_get_value':
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:450:21: error: 'ins_roll_neutral' undeclared (first use in this function)
     case 59: return ins_roll_neutral;
                     ^
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:450:21: note: each undeclared identifier is reported only once for each function it appears in
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:451:21: error: 'ins_pitch_neutral' undeclared (first use in this function)
     case 60: return ins_pitch_neutral;
                     ^
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h: In function 'persistent_settings_store':
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:490:23: error: 'ins_roll_neutral' undeclared (first use in this function)
   pers_settings.s_0 = ins_roll_neutral;
                       ^
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:491:23: error: 'ins_pitch_neutral' undeclared (first use in this function)
   pers_settings.s_1 = ins_pitch_neutral;
                       ^
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h: In function 'persistent_settings_load':
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:495:3: error: 'ins_roll_neutral' undeclared (first use in this function)
   ins_roll_neutral = pers_settings.s_0;
   ^
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:496:3: error: 'ins_pitch_neutral' undeclared (first use in this function)
   ins_pitch_neutral = pers_settings.s_1;
   ^
make[1]: *** [/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/firmwares/fixedwing/main_ap.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from firmwares/fixedwing/autopilot.c:62:0:
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h: In function 'settings_get_value':
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:450:21: error: 'ins_roll_neutral' undeclared (first use in this function)
     case 59: return ins_roll_neutral;
                     ^
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:450:21: note: each undeclared identifier is reported only once for each function it appears in
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:451:21: error: 'ins_pitch_neutral' undeclared (first use in this function)
     case 60: return ins_pitch_neutral;
                     ^
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h: In function 'persistent_settings_store':
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:490:23: error: 'ins_roll_neutral' undeclared (first use in this function)
   pers_settings.s_0 = ins_roll_neutral;
                       ^
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:491:23: error: 'ins_pitch_neutral' undeclared (first use in this function)
   pers_settings.s_1 = ins_pitch_neutral;
                       ^
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h: In function 'persistent_settings_load':
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:495:3: error: 'ins_roll_neutral' undeclared (first use in this function)
   ins_roll_neutral = pers_settings.s_0;
   ^
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:496:3: error: 'ins_pitch_neutral' undeclared (first use in this function)
   ins_pitch_neutral = pers_settings.s_1;
   ^
firmwares/fixedwing/autopilot.c: In function 'send_dl_value':
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:357:20: error: 'ins_roll_neutral' undeclared (first use in this function)
     case 59: var = ins_roll_neutral; break;\
                    ^
firmwares/fixedwing/autopilot.c:135:3: note: in expansion of macro 'PeriodicSendDlValue'
   PeriodicSendDlValue(trans, dev);
   ^
/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/generated/settings.h:358:20: error: 'ins_pitch_neutral' undeclared (first use in this function)
     case 60: var = ins_pitch_neutral; break;\
                    ^
firmwares/fixedwing/autopilot.c:135:3: note: in expansion of macro 'PeriodicSendDlValue'
   PeriodicSendDlValue(trans, dev);
   ^
make[1]: *** [/home/hendrix/paparazzi/var/aircrafts/MentorEnergy/ap/firmwares/fixedwing/autopilot.o] Error 1
make[1]: Leaving directory `/home/hendrix/paparazzi/sw/airborne'
make: *** [ap.compile] Error 2
make: Leaving directory `/home/hendrix/paparazzi'

FAILED 'make -C /home/hendrix/paparazzi -f Makefile.ac AIRCRAFT=MentorEnergy ap.compile' with code 2



On Fri, Mar 18, 2016 at 12:36 PM, Helge Walle <address@hidden> wrote:
Hi,

I managed to upload the firmware to Elle0 without running paparazzi as root by making up the attached rules file, and place it in /etc/udev/rules.d.

I am on Ubuntu 14.04LTS. Regarding the rules file, please advice if the contents should be improved in any way.

Telemetry works, PFD works GCS, and AIR_DATA message shows press and temp. Next on to RC and GPS.

Helge.




2016-03-17 23:18 GMT+01:00 Helge Walle <address@hidden>:
Thank you Urivan,

When I plug and unplug the board several times, the file comes up with new names; 003, 004, 005 and so on.
The Permissions tab shows "Group: root".

Not sure how to make a rule to fix this permanently. It's getting late, I'll look more into it tomorrow.

Flashing the board as root seems to work ok.

Helge.


2016-03-17 21:00 GMT+01:00 Urivan Flores-Saaib <address@hidden>:
Helge,

Verify the read/write permissions on the dev file: /dev/bus/usb/004/003
and add your username to the group associated with the device.

Regards,

---
-Urivan

On 2016-03-17 12:19, Helge Walle wrote:
Hi and thank you,

address@hidden:~$ LSUSB
Bus 002 Device 002: ID 0408:03f4 Quanta Computer, Inc.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 046d:c521 Logitech, Inc. Cordless Mouse
Receiver
Bus 004 Device 003: ID 0483:df11 STMicroelectronics STM Device in DFU
Mode
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

The third line from the bottom shows up when the board is connected.

address@hidden:~$ DFU-UTIL -L -VVV
dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to address@hidden

libusbx: debug [libusb_get_device_list]
libusbx: debug [discovered_devs_append] need to increase capacity
libusbx: debug [libusb_get_device_descriptor]
libusbx: debug [linux_udev_event_thread_main] udev event thread
entering.
libusbx: debug [libusb_get_config_descriptor] index 0
libusbx: debug [parse_configuration] skipping descriptor 0xb

libusbx: debug [parse_endpoint] skipping descriptor 25
libusbx: debug [libusb_get_device_descriptor]
libusbx: debug [libusb_get_config_descriptor] index 0
libusbx: debug [libusb_get_device_descriptor]
libusbx: debug [libusb_get_config_descriptor] index 0
libusbx: debug [libusb_get_device_descriptor]
libusbx: debug [libusb_get_config_descriptor] index 0
libusbx: debug [libusb_get_device_descriptor]
libusbx: debug [libusb_get_config_descriptor] index 0
libusbx: debug [libusb_get_device_descriptor]
libusbx: debug [libusb_get_config_descriptor] index 0
libusbx: debug [libusb_get_device_descriptor]
libusbx: debug [libusb_get_config_descriptor] index 0
libusbx: debug [libusb_get_device_descriptor]
libusbx: debug [libusb_get_config_descriptor] index 0
libusbx: debug [libusb_get_device_descriptor]
libusbx: debug [libusb_get_config_descriptor] index 0
libusbx: debug [libusb_open] open 4.3
libusbx: error [_get_usbfs_fd] libusbx couldn't open USB device
/dev/bus/usb/004/003: Permission denied
libusbx: error [_get_usbfs_fd] libusbx requires write access to USB
device nodes.
libusbx: debug [libusb_open] open 4.3 returns -3
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=0,
name="UNDEFINED"
libusbx: debug [libusb_open] open 4.3
libusbx: error [_get_usbfs_fd] libusbx couldn't open USB device
/dev/bus/usb/004/003: Permission denied
libusbx: error [_get_usbfs_fd] libusbx requires write access to USB
device nodes.
libusbx: debug [libusb_open] open 4.3 returns -3
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=1,
name="UNDEFINED"
libusbx: debug [libusb_open] open 4.3
libusbx: error [_get_usbfs_fd] libusbx couldn't open USB device
/dev/bus/usb/004/003: Permission denied
libusbx: error [_get_usbfs_fd] libusbx requires write access to USB
device nodes.
libusbx: debug [libusb_open] open 4.3 returns -3
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=2,
name="UNDEFINED"
libusbx: debug [libusb_open] open 4.3
libusbx: error [_get_usbfs_fd] libusbx couldn't open USB device
/dev/bus/usb/004/003: Permission denied
libusbx: error [_get_usbfs_fd] libusbx requires write access to USB
device nodes.
libusbx: debug [libusb_open] open 4.3 returns -3
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=3,
name="UNDEFINED"
libusbx: debug [libusb_get_device_descriptor]
libusbx: debug [libusb_get_config_descriptor] index 0
libusbx: debug [libusb_get_device_descriptor]
libusbx: debug [libusb_get_config_descriptor] index 0

This is what I got back from the two tests. However this inspired me
to try and run paparazzi as root, and by

doing that it seems I got the upload done. I am not yet ready to
connect communication to my PC, so by now I

cannot tell if the firmware works. However, progress was made.

Do I need a new udev rules file?

Thanks,

Helge.

2016-03-17 19:38 GMT+01:00 Ram Balakrishnan
<address@hidden>:

Can we see your "lsusb" and "dfu-util -l -vvv"

On Thu, Mar 17, 2016 at 11:06 AM, Helge Walle <address@hidden>
wrote:

Hi,

I am just starting with my new Elle0 board. Before using my own
files I just want to confirm that the upload is working, so I used
airframe file quadrotor_elle0.xml and flightplan
rotorcraft_basic.xml, together with the other necessary files.
Everything compiles fine.

When connecting the board to the pc with usb (and nothing else
connected to the board), dmesg reports this:
[ 2575.520031] usb 4-1: new full-speed USB device number 10 using
uhci_hcd
[ 2575.694036] usb 4-1: New USB device found, idVendor=0483,
idProduct=df11
[ 2575.694040] usb 4-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[ 2575.694043] usb 4-1: Product: STM32 BOOTLOADER
[ 2575.694045] usb 4-1: Manufacturer: STMicroelectronics
[ 2575.694047] usb 4-1: SerialNumber: 306C32713332

When trying to upload with USB DFU-UTIL i get these lines in
Paparazzi center:
make[1]: Leaving directory `/home/helge/paparazzi/sw/airborne'
cd sw/airborne; make TARGET=ap upload
Using "arch/stm32/elle0.ld" as ldscript for target "ap".
make[1]: Entering directory `/home/helge/paparazzi/sw/airborne'
Using dfu-util at 0x08000000
Cannot open device
dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to address@hidden

Filter on vendor = 0x0483 product = 0xdf11
Opening DFU capable USB device... make[1]: *** [upload] Error 1
make[1]: Leaving directory `/home/helge/paparazzi/sw/airborne'
make: *** [ap.upload] Error 2
make: Leaving directory `/home/helge/paparazzi'

FAILED 'make -C /home/helge/paparazzi -f Makefile.ac
AIRCRAFT=ELLE0_TEST FLASH_MODE=DFU-UTIL ap.upload' with code 2

When trying to upload with USB DFU (stm32_mem) i get these lines
in Paparazzi center:
make[1]: Leaving directory `/home/helge/paparazzi/sw/airborne'
cd sw/airborne; make TARGET=ap upload
Using "arch/stm32/elle0.ld" as ldscript for target "ap".
make[1]: Entering directory `/home/helge/paparazzi/sw/airborne'
Using stm32 mem dfu loader
/usr/bin/python /home/helge/paparazzi/sw/tools/dfu/stm32_mem.py
/home/helge/paparazzi/var/aircrafts/ELLE0_TEST/ap/ap.bin

Could not find STM32 (autopilot) device.
make[1]: *** [upload] Error 1
make[1]: Leaving directory `/home/helge/paparazzi/sw/airborne'
make: *** [ap.upload] Error 2
make: Leaving directory `/home/helge/paparazzi'

FAILED 'make -C /home/helge/paparazzi -f Makefile.ac
AIRCRAFT=ELLE0_TEST FLASH_MODE=DFU ap.upload' with code 2

I am on v5.8.1_stable.

Is there anything obvious that I just don't see?

Thanks,
Helge.

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



Links:
------
[1] 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]