Enable DFU bootloader mode
For the pyboard D-series you must enter the mboot DFU bootloader by holding down the USR button, pressing and releasing the RST button, and continuing to hold down USR until the LED is white (4th in the cycle), then let go of USR while the LED is white. The LED will then flash red once per second to indicate it is in USB DFU mode. You can then program the firmware using a DFU programmer, eg dfu-util or pydfu.py.
– MicroPython - Python for microcontrollers
Install firmware using dfu-util
make --directory=ports/stm32 BOARD=PYBD_SF2 USE_PYDFU=0 deploy
REPL signature
make console
MicroPython v1.11-328-gd96391aca on 2019-09-21; PYBD-SF2W with STM32F722IEK
>>>