note about specifying serial number for make dfu and make it work again

This commit is contained in:
Samuel Sadok
2018-03-04 16:38:51 -08:00
parent dff77b4f1c
commit 0174379dc1
2 changed files with 12 additions and 2 deletions
+2 -1
View File
@@ -4,6 +4,7 @@
BUILD_DIR = build
FIRMWARE = $(BUILD_DIR)/ODriveFirmware.elf
FIRMWARE_HEX = $(BUILD_DIR)/ODriveFirmware.hex
all:
@tup --quiet
@@ -15,7 +16,7 @@ gdb: all
arm-none-eabi-gdb $(FIRMWARE) -x openocd.gdbinit
dfu: all
../tools/dfu.py $(if $(value SERIAL_NUMBER),--serial-number $(SERIAL_NUMBER),) $(BUILD_DIR)/$(TARGET).hex
../tools/dfu.py $(if $(value SERIAL_NUMBER),--serial-number $(SERIAL_NUMBER),) $(FIRMWARE_HEX)
bmp: all
arm-none-eabi-gdb --ex 'target extended-remote /dev/stlink' \
+10 -1
View File
@@ -120,9 +120,18 @@ After installing all of the above, open a Git Bash shell. Continue at section [B
### Flashing the firmware (standalone device)
* Run `make dfu` in the `Firmware` directory.
If you have multiple ODrives connected, you should specify which one to upgrade.
* Run `(lsusb -d 1209:0d32 -v; lsusb -d 0483:df11 -v) 2>/dev/null | grep iSerial` to list the serial number of all flashable devices. Example output:
```
iSerial 3 385F324D3037
iSerial 3 306A396A3235
```
* The last column is the serial number you're looking for. You can unplug selected devices to track down the one you want to update.
* Run `make dfu SERIAL_NUMBER=385F324D3037`, where `385F324D3037` is the targeted serial number.
__Warning:__ Currently it is advised that you only do this to flash
official unmodified firmware. Also make sure you don't switch off
the device during upgrade. If something goes wrong you need an external
the device during upgrade. Otherwise, if something goes wrong, you need an external
programmer to recover the device. This will be fixed in the future.
### Flashing the firmware (external Programmer)