This documention is in the process of being updated for ODrive Pro
You can use
odrivetool to back up and restore device configurations or transfer the configuration of one ODrive to another one.
To save the configuration to a file on the PC, runodrivetool backup-config my_config.json
To restore the configuration form such a file, runodrivetool restore-config my_config.json
The encoder offset calibration is not restored because this would be dangerous if you transfer the calibration values of one axis to another axis.
Device Firmware Update
To update the ODrive to the newest firmware release, simply open up a terminal and run the following command:
odrivetool dfu --channel beta
Alternatively you may use
--channel devel to select our semi-stable development firmware channel.
You should then seem a prompt to confirm installation, type y and Enter to continue:
ODrive control utility v*.*.* Waiting for ODrive... Checking online for latest ODrive Pro v4.4-58V firmware on channel beta... Found compatible firmware (********). Install now? [Y/n]
Next, you will be prompted to backup your user configuraion.
Downloading firmware... The device may have user configuration that will be lost after the firmware upgrade. If you want to back this up please run `odrivetool backup-config` first. Do you want to continue anyway? [Y/n]
Selecting n will exit
odrivetool dfu, y will proceed to flash your device with the latest firmware
Putting device ************ into DFU mode... Erasing... done Flashing... done Verifying... done Waiting for the device to reappear... Device firmware update successful.
This command will connect to GitHub servers to retrieve the latest firmware.
If you have a non-default configuration saved on the device,
odrivetool will try to carry over the configuration across the firmware update.
If any of the settings are removed or renamed, you will get warning messages.
During the update, a new device called “STM32 BOOTLOADER” will appear. Open the Zadig utility and set the driver for “STM32 BOOTLOADER” to libusb-win32. After that the firmware update will continue.
sudo odrivetool dfu instead of
On some machines you will need to unplug and plug back in the USB cable to make the PC understand that we switched from regular mode to bootloader mode.
If the DFU script can’t find the device, try forcing it into DFU mode.
On some machines you will need to unplug and plug back in the USB cable to make the PC understand that we switched from regular mode to bootloader mode… _force-dfu:
Forcing DFU Mode
If the DFU script can’t find the device, try forcing it into DFU mode:
Flick the DIP switch that says “DFU, RUN” to “DFU” and power cycle the board.
After you’re done upgrading firmware, don’t forget to put the switch back into the “RUN” position and power cycle the board again.
Alternative DFU Tool
Some people have had issues using the python dfu tool, so below is a guide on how to manually use different tools.
Before starting the below steps, you need to get firmware binary. You can download one of the officially released firmware files here. Make sure you select the file that matches your board version.
ST has a tool called STM32CubeProgrammer.
Download the tool here. You will need to make an account with ST to download the tool.
Install the tool. On Windows, make sure to let it make a desktop shortcut.
Force the ODrive into DFU mode.
Under “Memory & File edition”, there are two tabs called “Device memory” and “Open file”. Click “Open file” and choose the ODrive firmware elf file that you downloaded.
In the top right, there is a dropdown menu containing the different methods to connect to an STM32 device. Choose “USB”.
Under “USB configuration”, a USB port should be automatically selected and the ODrive serial number should be present next to “Serial number.”
Click “Connect” above “USB configuration”.
Click the tab with the name of your firmware file (example:
firmware.elf) if it is not already selected.
Click “Download” to flash your ODrive with the firmware. Your ODrive is now flashed!
Turn off the power to the ODrive and set the DIP swtich back to RUN mode.
You can use the DfuSe app from ST.
Download the tool here. Unfortunately they make you create a login to download. Sorry about that.
After installing the tool, launch
DfuFileMgr.exewhich probably got added to the start menu as “Dfu file manager”.
Select “I want to GENERATE a DFU file from S19, HEX or BIN files”, press OK.
Click the button that says “S19 or Hex…”, find the
firmware.elffile you built or downloaded.
Leave all the other settings as default and click the “Generate…” button.
Save the output file as
ODriveFirmware.dfu. Note that the success message has a warning sign for some reason…
DfuSeDemo.exewhich probably got added to the start menu as “DfuSeDemo”.
Force the ODrive into DFU mode, as per the instructions above “How to force DFU mode”.
In the top left it should now be connected to “STM Device in DFU Mode”.
If it doesn’t appear, it may be because the driver is set to libusb by Zadig. We need to set it back to the original driver. Follow these instructions.
If, after doing the above step, the ODrive still installs itself as a libusb device in Device Manager, you can try to delete the libusb driver (this is OK, since we can use Zadig to install it again). You can simply delete the file
In the bottom right section called “Upgrade or Verify Action” click the button “Choose…”.
ODriveFirmware.dfuwe made before.
Click button “Upgrade”.
If you get a warning that it’s not possible to check that it’s the correct device type: click yes to continue.
Congratulations your ODrive should now be flashed; you can now quit DfuSeDemo.
Turn off the power to the ODrive and set the DIP switch back to RUN mode.
sudo apt install dfu-util
In the Firmware directory, after finishing building the firmware run:
sudo dfu-util -a 0 -s 0x08000000 -D build/firmware.bin
First, you need to install the arm development tools to copy the binary into the appropriate format:
brew install --cask gcc-arm-embedded
Then convert the binary to .bin format:
arm-none-eabi-objcopy -O binary firmware.elf firmware.bin
brew install dfu-util
If Using MacPorts
sudo port install dfu-util
Put the ODrive into DFU mode using the DIP switch, then turn it on and plug in the USB. Find the correct device serial number using:
This should return something like:
Found DFU: [0483:df11] ver=2200, devnum=5, cfg=1, intf=0, path="20-2", alt=0, name="@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg", serial="388237123123"
Finally, flash the firmware using the found serial number:
sudo dfu-util -S 388237123123 -a 0 -s 0x08000000 -D firmware.bin