Cannot upload PX4 firmware on customized pixhawk2

Hello,

I have a pixhawk 2 cube from Hex that have been flashed with a custom software lately.
I would like to upload a fresh PX4 firmware on it through QGC but can’t manage to do it.
I have first flashed the bootloader with JTAG on both FMU and IO MCUs (respectively px4fmuv3_bl and px4iov3_bl targets) and QGC tells me that the bl connection is correct (also, the amber led blinks rapidly, indicating the pixhawk is on bl mode).

It fails trying to erase the previous program (that does not exists obviously) with a 0x13 (PROTO_INVALID) error, as on trace shown below:

QGroundControl can upgrade the firmware on Pixhawk devices, SiK Radios and PX4         
Flow Smart Cameras.
Plug in your device via USB to start firmware upgrade.
Found device: PX4 FMU V2
Connected to bootloader:
Version: 5
Board ID: 255
Flash size: 2080768
Downloading firmware...
From: http://px4-travis.s3.amazonaws.com/Firmware/stable/px4fmu-v3_default.px4
Download complete
MAV_AUTOPILOT = 12
Successfully decompressed parameter_xml
Successfully decompressed airframe_xml
Successfully decompressed image
Erasing previous program...
Error: Board erase failed: Send Command: Command failed: 0x13 (PROTO_INVALID)
Upgrade cancelled
------------------------------------------
Upgrade complete
------------------------------------------

Am I missing something? Is it possible to upload something from QGC when another program is already installed?

Any help would be much appreciated!

No one here can help with this issue?
It must be possible to re-upload a pixhawk from scratch in some way…

Same here. I also tried v2 of bootloader. No succes. @ezwiebel did you find a solution already?

Unfortunately not… I manage to do this really easy on pixhawk4 but no luck with “The Cube” as they call it. I didn’t try it since though.

Hello, i also ran into this problem, im using a cube v5+ connected with a short USBc cable:

It worked for me: in ubuntu console

$make yourtarget upload

in a ubuntu real system.

It didnt worked for me:

  • Qground v4.0.10 control firmware update in ubuntu virtual machine running over windows: resets the board without doing anything

  • Make upload firmware update in ubuntu virtual machine running over windows: (tries to talk with the bootloader but no luck)

  • Qground v4.0.10 control firmware update in windows: this same error :

slight_smile: QGroundControl can upgrade the firmware on Pixhawk devices, SiK Radios and PX4 Flow Smart Cameras.

All QGroundControl connections to vehicles must be disconnected prior to firmware upgrade.

Please unplug your Pixhawk and/or Radio from USB.

Plug in your device via USB to start firmware upgrade.

Found device: PX4 FMU V5

Connected to bootloader:

Version: 5

Board ID: 50

Flash size: 2064384

Downloading firmware…

From: E:/px4_fmu-v5.bin

Download complete

Erasing previous program…

Erase complete

Programming new version…

Error: Flash failed: Command failed: 0x13 (PROTO_INVALID) at address 0x001acc40

Upgrade cancelled


If upgrade failed, make sure to connect directly to a powered USB port on your computer, not through a USB hub. Also make sure you are only powered via USB not battery.

Im trying to increase the SBUS output rate by flashing my own custom firmware based in :

Commit: 33e3456de24ae199d8c7bfcff3b1aff9fcf27a0c [33e3456]
Parents: 6b4c14a15c
Author: Daniel Agar daniel@agar.ca
Date: 9 July 2020 12:23:36
Committer: Daniel Agar
Commit Date: 16 August 2020 19:01:56
mpu9250: accumulated minor improvements and cleanup

  • perform reset as per the datasheet (disable I2C immediately, set power mode, wait for appropriate time, etc)
  • remove interrupt perf counter and instead only count misses
  • minor style changes to stay in sync with the other Invensense drivers