mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-21 15:34:33 +08:00
Merge pull request #293 from jusic/patch-1
Update odrivetool.md, how to use dfu-util on macOS
This commit is contained in:
+34
-3
@@ -135,9 +135,40 @@ In the Firmware directory, after finishing building the firmware:
|
||||
sudo dfu-util -a 0 -s 0x08000000 -D build/ODriveFirmware.bin
|
||||
```
|
||||
|
||||
#### MacOS
|
||||
**This section needs more detail. Please consider adding detail if you got it to work.**
|
||||
You may be able to use [dfu-util](http://dfu-util.sourceforge.net/) to upgrade the firmware. The command should be similar to the Linux instructions.
|
||||
#### macOS
|
||||
|
||||
First, you need to install the arm development tools to copy the binary into the appropriate format.
|
||||
|
||||
```text
|
||||
$ brew cask install gcc-arm-embedded
|
||||
```
|
||||
|
||||
Then convert the binary to .bin format
|
||||
|
||||
```text
|
||||
$ arm-none-eabi-objcopy -O binary ODriveFirmware_v3.5-48V.elf ODriveFirmware_v3.5-48V.bin
|
||||
```
|
||||
|
||||
Install `dfu-util`:
|
||||
|
||||
```text
|
||||
$ sudo port install dfu-util # via MacPorts; for HomeBrew use "brew install dfu-util"
|
||||
```
|
||||
|
||||
Find the correct device serial number to use:
|
||||
|
||||
```text
|
||||
$ dfu-util --list # list the DFU capable devices
|
||||
[...]
|
||||
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:
|
||||
|
||||
```text
|
||||
$ sudo dfu-util -S 388237123123 -a 0 -s 0x08000000 -D ODriveFirmware_v3.5-48V.bin
|
||||
```
|
||||
|
||||
## Flashing with an STLink
|
||||
|
||||
|
||||
Reference in New Issue
Block a user