Page 1 of 1

Modify USB DFU upload method

Posted: Tue Dec 13, 2022 9:41 am
by STM32_Newbbe
Hi all,

I am developing a L4R5 custom board and want to use the DFU upload method. To avoid physical access to the board for the update procedure, I would like to do a soft reset to enter in bootmode. This is achieved by issuing a command via serial port (USB CDC is used) which starts a subroutine that pulls BOOT0 high and calls NVIC_SystemReset().
So it is possible to do a full firmware update by only connecting the USB cable.
Now, what I would like to achieve on top of all this, is to integrate this smoothly into the upload process of the IDE. Which is sloeber in my case, but I really would like to make a method that works for any IDE.

All it would take is to send a command to the USB CDC serial port...
But I have no idea on how to achieve this :/
So far I have found out that the main job is done by a shell script. Is this the place to add/change things to send a serial command?

Re: Modify USB DFU upload method

Posted: Wed Dec 14, 2022 2:11 pm
by fpiSTM
You can have a look to this PR:
https://github.com/stm32duino/Arduino_C ... 2/pull/710

It required some works to be generic but poc works.
I have to end it when got some free times.

Re: Modify USB DFU upload method

Posted: Thu Dec 15, 2022 11:08 am
by STM32_Newbbe
Thanks, lots to read and understand there...

will have to find out how I can make use of the proposed change until they are implemented in the regular version