From fca2de665c4301d2ac79433e5adfd1dd7a8ef6f2 Mon Sep 17 00:00:00 2001 From: Joe Britton Date: Tue, 8 Dec 2020 11:07:48 -0500 Subject: [PATCH] flashing with dfu-util --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index bc53dd4..9dbd618 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,30 @@ gdb target/thumbv7em-none-eabihf/release/thermostat ``` ## Flashing +There are several options for performing device firmware upgrade (DFU) on Thermostat. The firmware is an .ELF file. +### dfu-util +This can be done from Linux machine using only micro-USB connector. +([Issue #10](https://git.m-labs.hk/M-Labs/thermostat/issues/10)) +* Install the DFU USB tool (dfu-util). +* Convert firmware from ELF to BIN: ```arm-none-eabi-objcopy -O binary thermostat.elf thermostat.bin``` +* Connect to the Micro USB connector to Thermostat below the RJ45. +* Add jumper to Thermostat v2.0 across 2-pin jumper adjacent to JTAG connector. +* Cycle board power to put it in DFU update mode +* Push firmware to flash: ```dfu-util -a 0 -s 0x08000000:leave -D thermostat.bin``` +* Remove jumper +* Cycle power to leave DFU update mode + +### st.com DfuSe tool +On a Windows machine install [st.com](https://st.com) DfuSe USB device firmware upgrade (DFU) software. [link](https://www.st.com/en/development-tools/stsw-stm32080.html). +- add jumper to Thermostat v2.0 across 2-pin jumper adjacent to JTAG connector +- cycle board power to put it in DFU update mode +- connect micro-USB to PC +- use st.com software to upload firmware +- remove jumper +- cycle power to leave DFU update mode + +### openocd ```shell openocd -f interface/stlink-v2-1.cfg -f target/stm32f4x.cfg -c "program target/thumbv7em-none-eabihf/release/thermostat verify reset;exit" ```