Hub No.7

Vendor: LEGO
Source on GitHub: stm32/LEGO_HUB_NO7

Installation instructions

STM32 via ST-Link

Nucleo and Discovery boards typically include a built-in ST-Link programmer.

A .bin or .hex file can be flashed using st-flash.

# Optional erase to clear existing filesystem.
st-flash erase

# Flash .bin
st-flash write firmware.bin 0x08000000
# or, flash .hex
st-flash --format ihex write firmware.hex

A .hex file can be flashed using STM32 Cube Programmer. -c port=SWD -d firmware.hex -hardRst

STM32 via DFU

Boards with USB support can also be programmed via the ST DFU bootloader, using e.g. dfu-util or

To enter the bootloader the BOOT0 pin can be connected to VCC during reset, or you can use machine.bootloader() from the MicroPython REPL.

dfu-util --alt 0 -D firmware.dfu



v1.20.0 (2023-04-26) .dfu [.hex] [Release notes] (latest)

Nightly builds

v1.20.0-489-ga3862e726 (2023-09-20) .dfu [.hex]
v1.20.0-488-gfa6852396 (2023-09-20) .dfu [.hex]
v1.20.0-487-g00930b213 (2023-09-18) .dfu [.hex]
v1.20.0-486-gb0e03b3e0 (2023-09-18) .dfu [.hex]