for F4, i think there are some advantages/disadvantages between using the on-board DFU loader/flash support vs building a separate 'boot loader'.RogerClark wrote:Some users seem to be able to upload via DFU, but I think it only works on Linux
I have Windows and can't upload via DFU to the built in bootloader in the F4 series. I think this is because the DFU protocol that STM use is non standard, and you can't use dfu-util, you have to use STM's own DFU program, and it only accepts a special format of file
So on Windows, the only way to upload to F4xx boards is via STLink or via serial (or Blackmagic probe)
It would be good if the maple / stm32duino bootloader was ported from the F103 to the F4 but I don't have time to do that at the moment, as I've got too many other things I need to do, e.g. update the site to PHPBB 3.2 as well as a whole heap of PR's on Github which need to be tested and them approved or rejected
For one thing, using the onboard DFU flash update functionality avoids an overhead of consuming some ram (and to a smaller impact flash) as in the case of a bootloader. However, i noted that some 'sketches' probably 'just works' simply because the boot loader did quite a bit of initialization, setting up clocks, peripherals etc. while when i fall back to just the raw stm32 app, if i forget to setup clocks HSE etc, the sketch may simply not work.
the other benefit is that DFUSe with the onchip support is the equivalent of flashing raw images via uart, st-link etc. u could literally flash the 'boot loader' just the same way using DFUSe by simply connecting the usb cable, set BOOT0, and dfu-util -s 0x8000000 -D myapp.bin
the somewhat different protocol by ST i.e. DfuSe is discussed in this link
if i happen to have time experimenting with that (no promises whatsoever) i may take a look at that 'driver stack' on windows.
note that i'm not using arduino ide doing 'sketches' on F4, rather i'm using gnu arm eclipse(http://gnuarmeclipse.github.io/) which is a native development environment based on ST set of libraries and headers.
i'm somewhat dragging my feet in terms of setting up arduino ide as i find the bulk rather huge as arduino ide caters for a more diverse set of mcus rather than just stm32, but i'd likely set it up some day, there'd be a 'learning curve' as well with the different ide stacks