Modify USB DFU upload method

Post here first, or if you can't find a relevant section!
Post Reply
STM32_Newbbe
Posts: 51
Joined: Thu Nov 05, 2020 10:26 am

Modify USB DFU upload method

Post 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?
User avatar
fpiSTM
Posts: 1745
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Modify USB DFU upload method

Post 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.
STM32_Newbbe
Posts: 51
Joined: Thu Nov 05, 2020 10:26 am

Re: Modify USB DFU upload method

Post 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
Post Reply

Return to “General discussion”