Flashing PX2.1 fails

Hello,

I was trying to flash the default firmware in PX2.1 using command line make px4fmu-v3_default upload. I’m using ubuntu 16.04. It got stuck after erasing, see the below.

make px4fmu-v3_default upload
-- CMAKE_MODULE_PATH: /home/shekhar/src/Firmware/cmake
-- Nuttx build for px4fmu-v3 on m4 hardware, using nsh with ROMFS on px4fmu_common
-- Build Type: MinSizeRel
-- PX4 VERSION: v1.6.5
-- CONFIG: nuttx-px4fmu-v3-default
-- The ASM compiler identification is GNU
-- Found assembler: /home/shekhar/gcc-arm-none-eabi-5_4-2016q2/bin/arm-none-eabi-gcc
-- Found PythonInterp: /usr/bin/python (found version "2.7.12") 
-- Found PY_jinja2: /usr/local/lib/python2.7/dist-packages/jinja2  
-- C compiler: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160609 (release) [ARM/embedded-5-branch revision 237715]
-- C++ compiler: arm-none-eabi-g++ (GNU Tools for ARM Embedded Processors) 5.4.1 20160609 (release) [ARM/embedded-5-branch revision 237715]
-- Using C++03
-- Release build type: MinSizeRel
-- Adding UAVCAN STM32 platform driver
-- Adding ROMFS on px4fmu-v3
-- Nuttx build for px4fmu-v3 on m3 hardware, using nsh 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shekhar/src/Firmware/build_px4fmu-v3_default
[766/766] uploading /home/shekhar/src/...c/firmware/nuttx/px4fmu-v3_default.px4
Loaded firmware for 9,0, size: 1476020 bytes, waiting for the bootloader...
If the board does not respond within 1-2 seconds, unplug and re-plug the USB connector.
Attempting reboot on /dev/serial/by-id/usb-3D_Robotics_PX4_FMU_v2.x_0-if00 with baudrate=57600...
If the board does not respond, unplug and re-plug the USB connector.
Attempting reboot on /dev/serial/by-id/usb-3D_Robotics_PX4_FMU_v2.x_0-if00 with baudrate=57600...
If the board does not respond, unplug and re-plug the USB connector.
Found board 9,0 bootloader rev 5 on /dev/serial/by-id/usb-3D_Robotics_PX4_BL_FMU_v2.x_0-if00
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff type: ÿÿÿÿ
idtype: =FF
vid: ffffffff
pid: ffffffff
coa: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8=

sn: 0048003a3036510a31353833
chip: 20016419
family: STM32F42x
revision: 3
flash 2080768

Erase  : [====================] 100.0% (timeout: 5 seconds) 

Any idea?

I want to add: We tried a second time, and this time erasing worked, and flashing proceeded up to 17%. Then the program got stuck. Could it be a problem with the power supply via USB?

This sounds like a bad/unreliable USB connection. What was the error that you got when it proceeded to 17% with flashing?

I have had this a few times with an old USB cable. You might have to re-adjust the USB cable or use another USB cable or just try until it succeeds. Importantly, if you are experiencing this unreliable connection, as soon as it starts to “work” do not move or touch the cable until the flashing is complete.

I am having this same issue. I’m using Ubuntu 16.04, however, when I try to flash the board using another computer (the same OS nonetheless), it suceeds. So it cannot be my USB cable, or the OS itself.

Under 16.04, the Program procedure gets stuck in 44% (sometimes 56%) or even suceeds, but the PX4 firmware doesn’t work anyway.

Step 1. Check your user is a member of dialout group, and kill modemmanager.

I checked both. I’m a member of dialout and modemmanager is not installed.

Confirm that you’re trying to upload from command line, or a gcs?

I’m trying to upload it from the terminal.