.. _stm-fast-flashing: Fast Flashing STM32MP1 Boards ============================= STM32CubeProgrammer is the official STMicroelectronics tool for creating partitions into any Flash device available on STM32 platforms. Once created, STM32CubeProgrammer allows populating and updating the partitions with the prebuilt binaries. Unfortunately, this tool is quite slow. Here we show a way to program our QSMP and TXMP modules much faster. Measurements have shown that programming is possible in 1/6 of the time or faster. Prerequisites ------------- - USB port of the module connected to your Linux host (Either a native Linux PC or :ref:`wsl`) - You have downloaded precompiled images or built your own - uuu.auto is part of this - You have changed to the image directory in the command shell on your host Start Fastboot -------------- (Re-)boot the board and **"Hit any key to stop autoboot"** to get to the U-Boot command line interface .. prompt:: :prompts: U-BOOT> :substitutions: fastboot usb 0 .. admonition:: Only if the above is not possible :class: tip U-Boot in fastboot mode can also be started via USB Close the Bootmode Jumper (:ref:`enabling-bootmode`) - Reset the Board .. prompt:: :prompts: $ :substitutions: sudo apt install dfu-util dfu-util -a 1 -D tf-a-stm32mp157c-qsmp-1570-usb.stm32 dfu-util -a 3 -D fip-stm32mp157c-qsmp-1570-mfg.bin dfu-util -a 0 -e U-Boot starts in STM DFU mode. Cancel this and enable fastboot manually: .. prompt:: :prompts: U-BOOT> :substitutions: fastboot usb 0 .. admonition:: Only for :ref:`wsl` :class: tip Refer to :ref:`wsl` -> Connect USB devices Open a Windows command shell with administrator permissions. Get the {busid} of the download gadget and attach it. .. prompt:: :prompts: CMD> usbipd wsl list usbipd bind --busid {busid} usbipd attach --wsl --busid {busid} Execute UUU ----------- .. prompt:: :prompts: $ :substitutions: wget https://github.com/nxp-imx/mfgtools/releases/download/uuu_1.5.141/uuu chmod a+x uuu sudo ./uuu -v