0% found this document useful (0 votes)
64 views

Loading Firmware Onto Development Board

This document provides instructions for loading ArduPilot firmware onto autopilot boards that do not already have ArduPilot installed. It involves downloading a driver, firmware file, and flashing tool. You then put the board into DFU mode, connect it to your computer, use the flashing tool to select and upload the firmware file, flashing it to the board. After rebooting, the board can then be configured using the normal ground station software. An alternate method using Zadig driver and Betaflight Configurator is also provided.

Uploaded by

Kalindu Liyanage
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

Loading Firmware Onto Development Board

This document provides instructions for loading ArduPilot firmware onto autopilot boards that do not already have ArduPilot installed. It involves downloading a driver, firmware file, and flashing tool. You then put the board into DFU mode, connect it to your computer, use the flashing tool to select and upload the firmware file, flashing it to the board. After rebooting, the board can then be configured using the normal ground station software. An alternate method using Zadig driver and Betaflight Configurator is also provided.

Uploaded by

Kalindu Liyanage
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

HOME DOWNLOADS COMMUNITY STORES ABOUT

 Copter
 » First Time Setup » Loading Firmware onto boards without exis ng ArduPilot firmware
 Edit on GitHub

Loading Firmware onto boards without existing


ArduPilot firmware
Search docs

Introduc on to Copter
ArduPilot now uses the ChibiOS opera ng system for all autopilots, including the many smaller
Choosing an Autopilot boards targeted for mul copter racing applica ons.
Ground Control Sta ons
O en, these boards have another autopilot so ware pre-installed. (If the board has ArduPilot
 First Time Setup
already installed, see Loading Firmware for firmware loading instruc ons.)
Install Ground Sta on So ware

Autopilot System Assembly Installing ArduPilot to these autopilot involves:


Loading Firmware to boards with
exis ng ArduPilot firmware Installing the required driver and flashing tool
 Loading Firmware to boards Downloading the appropriate ArduPilot firmware
without exis ng ArduPilot firmware Loading ArduPilot to the board
Download driver and flashing tool

Download the ArduPilot firmware  Note

Instruc ons for ArduPilot using ChibiOS to Pixhawk autopilots can be found here.

Download driver and flashing tool


The STM32CubeProgrammer will install the required DFU (direct firmware upload) drivers and can
be used to flash the firmware to autopilots in DFU mode. This is available for Windows, Linux, and
MacOS systems. Download and install this program. You may be required to also install JAVA in
order to setup this program.

Download the ArduPilot firmware


Download the ArduPilot firmware for your board from firmware.ardupilot.org. You can normally
find the appropriate firmware by doing the following:
open firmware.ardupilot.org
select click on the link for your vehicle type (i.e. Plane, Copter, Rover, Sub or Antenna
Tracker)
select “beta” or “stable”
look for the directory with the name that most closely matches the autopilot
download the “arduXXX_with_bl.hex” file clicking on it. It will usually be saved in your
Downloads folder.

Using Beta and Developer Versions

Beta

Prior to Stable releases, a Beta version or versions get released. These may be used if you wish to
try newer features or help the developers further flight test the code. Since they are “beta”
versions, there possibly s ll may be bugs (although this is possible even in Stable firmware).
However, it has been tested by the development team, and already flight tested. This release allows
a wider user base to final test the firmware before its release as Stable . Experienced ArduPilot
users are encouraged to test fly this firmware and provide feedback.

Latest Developer Version

This reflects the current state of the development branch of the ArduPilot code. It has been
reviewed by the development team, passed all automated test suites, and in most cases, if
significant changes have been made, test flown. This code gets built daily and is available for tes ng
by experienced users. This corresponds to an “alpha” release, and may have bugs, although very
rarely “crash inducing”. Very shortly a er an addi on that changes or introduces a feature is added,
the Upcoming Features sec on of the Wiki is updated with informa on about the addi on or
change.

Upload the firmware to autopilot


Hold down the board’s DFU bu on or temporarily bridge its “BOOT” pins, and plug in a USB
cable (a ached to your PC). Release bu on or unbridge once powered.
Open the windows device manager and look under “Universal Serial Bus devices” for “STM32
BOOTLOADER” to confirm that the board is in DFU mode.

Start the STM32CubeProgrammer

1. Select the connec on method: USB


2. Make sure a USB port shows…that means the board is detected in DFU mode.
3. Press “Connect”
4. Then the boards cpu specifics will appear here.
5. Press “Open file” to select the “arduXXX_with_bl.hex” file you downloaded.
6. The file name will appear in the tab.

7. Press “Download” to flash the file to the board.

You may now reboot the board and connect with your favourite ground sta on (Mission Planner,
QGC, etc) and future firmware uploads should also be possible using the normal method for
Pixhawk boards.

Alternate method

Download and Install Zadig (Windows only)

Download and run Zadig (search for “Zadig 2.3” just below “Download”) to allow accessing the
board using USB.
Choose “List all devices” op on from op ons menu
Select “STM32 BOOTLOADER” from the drop-down and press the “Replace Driver” bu on

Op onally, you may wish to check the board is visible as a USB port:

Hold down the board’s DFU bu on and plug in a USB cable (a ached to your PC)
Open the windows device manager and look under “Universal Serial Bus devices” for
“STM32 BOOTLOADER” to confirm that the board is in DFU mode.

Download the ArduPilot firmware

Download the ArduPilot firmware for your board from firmware.ardupilot.org. You can normally
find the appropriate firmware by doing the following:
open firmware.ardupilot.org
select click on the link for your vehicle type (i.e. Plane, Copter, Rover, Sub or Antenna
Tracker)
select “beta” or “stable”
look for the directory with the name that most closely matches the autopilot
download the “arduXXX_with_bl.hex” file clicking on it. It will usually be saved in your
Downloads folder.

Upload ArduPilot to the board

Download, install and run the Betaflight Configurator.

Select “Firmware Flasher” on the le side of the screen


Select DFU from the top right
Push “Load Firmware [Local]” from the bo om right and select the arduXXX_with_bl.hex file
you downloaded above.
Push “Flash Firmware” and a er a few minutes the firmware should be loaded

You may now reboot the board and connect with your favourite ground sta on (Mission Planner,
QGC, etc) and future firmware uploads should also be possible using the normal method for
Pixhawk boards.

Loading firmware onto Boards with external flash


Some recent boards, most notably those from Seriously Pro Racing (h p://www.seriouslypro.com/),
use MCUs with small amounts of internal flash but with much larger externally connected flash
chips. These boards require extra steps to load ArduPilot firmware. Typically some kind of
bootloader resides on the internal flash and then the main firmware resides on the external flash.

Loading firmware using SSBL

The SPRacing series of boards come pre-installed with a proprietary bootloader on the internal
flash and require the use of a second stage bootloader to load further firmware. There are a couple
of op ons to load firmware with these boards, but whichever op on you choose you will need to
ini ally load ArduPilot using SSBL. Please follow the “INSTALLATION” instruc ons at
h ps://github.com/spracing/ssbl in order to load SSBL onto your board. Once SSBL is loaded please
follow the PX4 instruc ons to load ArduPilot onto the board h ps://github.com/spracing/ssbl#px4-
installa on-to-external-flash but instead of using PX4 firmware please use the arducopter.bin
firmware image. A summary of the steps follows:

Download h ps://github.com/spracing/ssbl/releases and install SSBL to external flash following


h ps://github.com/spracing/ssbl#installa on-to-external-flash
Download the latest ArduPilot external flash binary, for instance
h ps://firmware.ardupilot.org/Copter/latest/SPRacingH7/arducopter.bin
Use dd to pad the binary to 2MB:

dd if=/dev/zero ibs=1k count=2048 of=AP_2MB.bin


dd conv=notrunc if=arducopter.bin of=AP_2MB.bin

Put the board into SSBL dfu mode - power off, hold BIND (not BOOT), power on - LED flashes
fast, release BIND, LED flashed slow - DFU mode enabled
Flash the binary using

dfu-util -D AP_2MB.bin -s 0x90100000:0x200000

Verify the flash. The dfu-u l command below copies the contents of the flash back to the
computer, the diff command will tell you if the contents are iden cal or different. Do not
a empt to fly if diff doesn’t say the files are iden cal - retry.

dfu-util -U AP_2MB-VERIFY.bin -s 0x90100000:0x200000


diff -sb AP_2MB.bin AP_2MB-VERIFY.bin

Power off, install an SD card (.note: you must install an SD card, the firmware will not boot
without it), power on
Configure the board as normal using Mission Planner

At this point you should have working firmware on the board. If you want to load new firmware you
will need to follow steps 2-7 again (you cannot use Mission Planner to load firmware). If you are
certain that you will never want to load betaflight on the board then you can install the ArduPilot
bootloader.

Installing the ArduPilot bootloader

 Warning

installing the ArduPilot bootloader is a one-way opera on. You cannot restore the board to
factory configura on or load betaflight a er this step - you would have to return the board to
Seriously Pro to be re-flashed with factory firmware, assuming that is possible

If you are certain that you only want to use ArduPilot on the board, then flashing the ardupilot
bootloader enables much simpler subsequent upgrades.

You must ini ally have a working version of ArduPilot installed on the board - follow the steps
above.
You now must remove the copy protec on on the internal flash. This is a destruc ve opera on
requiring complete erasure of the flash. ArduPilot provides support to make this easy. Set
BRD_OPTIONS = 16.
Power off and power on the board. The board will not appear to boot but the flash sector is
being erased. Wait a few seconds and then power off the board.
Hold down the boot bu on (boot not bind this me) and power on the autopilot. This will put
the board in dfu mode.
Download the ArduPilot bootloader, e.g.
h ps://github.com/ArduPilot/ardupilot/blob/master/Tools/bootloaders/SPRacingH7_bl.bin
Install the bootloader via dfu:

dfu-util -a 0 --dfuse-address 0x08000000 -D SPRacingH7_bl.bin

Reboot the board.


You can now use your favorite tool to upload the ArduPilot firmware

 Previous Next 

Ques ons, issues, and sugges ons about this page can be raised on the forums. Issues and
sugges ons may be posted on the forums or the Github Issue Tracker.

© Copyright 2023, ArduPilot Dev Team.

You might also like