Skip to main content
HCour.1
Associate II
July 10, 2023
Solved

Production Programming STM32F042 using USB DFU

  • July 10, 2023
  • 2 replies
  • 2264 views

I am considering STM32F042 in a new product design to provide USB RNDIS interface to the product.

Looking at manufacturing options to program the STM32F042 device, I would prefer to use the USB port rather than adding a debug header to the design for SWD.

I can see that STM32Cube is the recommended method to program via USB DFU. I can also see that there was a command line utility DfuSe, which is no longer recommended.

I would prefer a command line utility rather than have production technician operating the STM32Cube IDE which is relatively slow and has a higher risk of error.

Is a command line utility available for this type of application? 

If there is no utility, is it possible to publish the DFU protocol so that we can develop our own programmer as part of the production test process?

 

Thanks,

This topic has been closed for replies.
Best answer by AScha.3

>operating the STM32Cube IDE

no, for flash/programming is the cube programmer :

https://www.st.com/en/development-tools/stm32cubeprog.html

>>

STM32CubeProgrammer is an all-in-one software tool for programming STM32 products, available in both GUI and CLI versions.0 It supports Motorola S19, Intel HEX, ELF, and binary formats, and allows users to erase, program, view, and verify the content of the device Flash memory.3 It also allows option programming and upload, programming content verification, and microcontroller programming automation through scripting.013 STM32CubeProgrammer automates STM32 programming, including erasing, verifying, programming, and configuring option bytes.1 The CLI version of STM32CubeProgrammer should be automatically available after installation, and users can append.exe to all the following commands if running on Windows.2

 

2 replies

AScha.3
AScha.3Best answer
Super User
July 10, 2023

>operating the STM32Cube IDE

no, for flash/programming is the cube programmer :

https://www.st.com/en/development-tools/stm32cubeprog.html

>>

STM32CubeProgrammer is an all-in-one software tool for programming STM32 products, available in both GUI and CLI versions.0 It supports Motorola S19, Intel HEX, ELF, and binary formats, and allows users to erase, program, view, and verify the content of the device Flash memory.3 It also allows option programming and upload, programming content verification, and microcontroller programming automation through scripting.013 STM32CubeProgrammer automates STM32 programming, including erasing, verifying, programming, and configuring option bytes.1 The CLI version of STM32CubeProgrammer should be automatically available after installation, and users can append.exe to all the following commands if running on Windows.2

 

If you feel a post has answered your question, please click on " Best Answer ".
HCour.1
HCour.1Author
Associate II
July 10, 2023

OK. Thanks AScha. I didn't know there was a CLI version of STM32CubeProgrammer.