How to activate DFU Mode on Cube Orange+

Hello, I currently have a bad bootloader on my Cube Orange +. To upload a new bootloader, I want to put it in DFU mode. From what I have read online, the only way to do this is to break open the case and manually pull up the BOOT0 line on power up. Is there any way to enter DFU mode without breaking into the case, like with an ST-link or the BlackMagic Probe (https://black-magic.org/)? I do have access to the IO and FMU Debug ports through the ADS-B Carrier board.

@jclomax There is an SWD interface available on the standard Carrier board. You can find it if you take apart the plastic around the Carrier board. It is below the carrier board. The pinout of the same is as follows.

The debug ports use connector type SM06B-SURS-TF(LF)(SN)-ND

I’m not getting and communication via usb on the cube orange to windows 11.
i think i have the same issue, where can i find a cable from the swd to the pc?

you need to purchase STLink, JLink or Blacmagic probe to be able to connect through this process. If you have Cube that was Dead on arrival best to contact your reseller. If this is an issue induced through experimentation then only you need to follow above steps

1 Like

With @sidbh’s help I was able to rewrite the standard bootloader (and then upload ArduPilot) to an autopilot so I’d like to share how it was done.

  1. Purchase an STLinkv2 (search on amazon)
  2. Ensure you have an ArduPilot build environment setup
  3. If using Windows PC running WSL2 (and VSCode) as I do then you will need to download and install WSL USB Manager to allow WSL2 to access the PC’s USB ports
  4. Open the Cube’s carrier board and connect to the STLink as shown below
  5. Connect both the STLinkv2 and Cube to the PC via USB
  6. If using a Windows PC use WSL USB Manager to make the STLink’s COM port available to WSL2. SM32 STLink should appear first in the “Windows USB Devices” area. Select it and push the “Attach” button and it should move to the “Forwarded Devices” section
  7. Open a WSL2 terminal and cd to the ardupilot directory and enter these commands
    • sudo apt install libusb
    • sudo apt install openocd
    • sudo openocd -f Tools/debug/openocd-h7.cfg
  8. Open a second WSL2 terminal and again cd to the ardupilot directory and enter these commands
    • arm-none-eabi-gdb ./Tools/bootloaders/CubeOrangePlus_bl.elf
    • target extended-remote :3333
    • monitor stm32h7x mass_erase 0
    • monitor halt
    • load ./Tools/bootloaders/CubeOrangePlus_bl.elf
      OR
    • monitor flash write_image ./Tools/bootloaders/CubeOrangePlus_bl.elf
  9. the commands from above would sometimes work and would sometimes not work. I often had to power cycle the STLink and repeat steps 7 and 8 but eventually I would see a message like below
  10. power cycle the Cube and use MP to load the software as per usual

By the way, @sidbh said that it is much easier to instead use a JLink programmer and the software that comes with it. The key point is that you need to load the appropriate bootloader (ending in .elf) from this directory onto the board. Once that is done correctly you can use the regular MP or QGC to get AP onto the board.