tormod - Thanks for the clarification. I think I understand what you're describing.
To reduce ambiguity, let's call ST Micro's manufactured-in USB bootloader the "ST-bootloader", and Leafleab's Maple bootloader the "Maple-bootloader"
so I agree, the whole implementation of how it is started and so on is the problem. My point was that if you replace the maple bootloader DFU code with the built-in USB bootloader, you replace the "running bootloader part", but not the implementation of how to get into bootloader mode. You would still have to provide a user-friendly solution for how to enter this mode.
The way the that the ST-bootlader works can't be changed. AFAIK, it runs when power is applied or a system RESET is triggered.
So the user can unplug power, press reset, or a board can have a power switch.
Not as nice as a host-controlled "automatic" reboot, but consistent, easy to understand, and simpler than the Maple-bootloader 'perpetual bootloader button-dance'.
I wrote that support 2 years ago. BTW, I am maintaining the official dfu-util
Brill!
So there is already a low-effort way of making a more robust boot method that would work for 'raw' STM32F chips.
Folks can "ignore" the Maples bootloader, and use the built-in one. Given the amount of button pressing and uncertainty which Windows users report, it might be no worse, and maybe better.
Yes, if pressing a button is acceptable, there is no need for 2 second magic window etc.
The "Button-dance" is necessary right now to get into a state where a program uploads, so net/net it may be better to just hit reset.
But it is convenient to control the whole process from the computer without physically accessing the board.
Agree. That is better than having to press a button.
But the bootloader flipping between USB DFU and USB CDC causes more problems than just making it hard to upload a new program; for example a program can't reliably do I/O in setup, it has to wait until USB is ready, which has appeared as a problem on this forum repeatedly. So if we are discussing "better", we should factor that in too. IMHO, to ignore those problems is a bit like "rearranging deck chairs on the deck of the Titanic".
We have had lots of discussions, e.g. http://forums.leaflabs.com/topic.php?id=758
So my original proposal was to avoid requiring a bootloader, to make it extremely simple to make boards.
An alternative, if the manufactured-in bootloader is to be replaced, replace it with a bootloader which removes all major problems.
IMHO, a bootloader should only present itself as a single USB device all the time, unless the user has programmed it to be something else for their application (and so far no one has reported such an application to this forum).
That USB device should use one of the few cross-platform, pre-installed USB drivers. It needs to support both booloading, and be be capable of serial comms to support print/read. The USB DFU mechanism creates extra problems which Windows makes worse.
So, no DFU. CDC serial, HID or Flash drive (I think all OS's support those three 'out of the box').
I agree a custom bootloader would be better if it could be put into bootloader mode 'automatically' from the host.
I would like to make the boards as simple as practical, with minimal extra hardware, so that they could be incorporated into peoples own designs.
I would like it to work with Windows "Thin Clients" because that is the technology used by many British schools.
Feurig has reminded us that some of the new STM32F0 are supper-cheap, and don't have USB hardware built in. A good bootloader scheme would enable someone to use them easily.
--------------
Hang around at ST's STM32 forum and you'll get an idea to which length ST is supporting the customers.
I did hang around. I didn't find ST on the forum very helpful. But Clive1 is fantastically helpful.
Also I have found the ST UK tech support helpful.
ST makes great, cheap hardware, but they write awful software and their community support is miserable.
I don't use Windows, so my only experience of their software is the ST manufactured-in serial bootloader, and the STM32 libraries.
The serial bootloader worked okay to put bootloaders onto STM32F103's.
IMHO the STM32 libraries are very ugly, but some of that is constrained by ARMs CMSIS API definition.