dipr wrote: Sat Mar 04, 2023 9:28 am
ag123 wrote: Sat Mar 04, 2023 12:26 am
for f4xx I won't bother with a custom bootloader, it takes flash memory and it takes the traditional 0x8000000 start of flash address.
and much less fuss bothering with custom bootloaders e.g. that your sketch is compiled for an incompatible address etc.
you would more than likely need a custom ld script file that specify where your sketch needs to sit and won't be 0x8000000
All true, but going back to USART bootloading would mean one has to dump that nifty, new, one-single-USB-cable-does-it-all approach.
A feature that was reliably available back in the chip45 atmega168 days.
well if it is a
*real* stm32f4xx, then I'd expect USB DFU to be just threre, i.e. that button dance sequence would simply put it in DFU mode ready to update flash using DFU. no need for uart whatsoever.
only stm32f103 and various others that don't do DFU needs to do the serial route.
check that chip on the black pill though, there are STM32F401/F411 black pills, as there are others that use STM32F103, they probably cost different.
and be wary of *clones*, it seemed there are a bunch of 'clones' going around in the 'online flea markets' ebay / aliX etc
STM32F103 can't do DFU and it is a reason why the maple custom bootloader or (roger's fork of maple bootloader) is originally invented for that purpose.
that is where maple mini (libmaple stm32duino) started.
there is also a HID bootloader, you would need to search around here for that e.g. using the search box here on top. or 'google' search for it
accordngly, that uses a different flashing program as well e.g. hid-flash something like such.
But I've never used the HID bootloader myself hence, can't comment about that.
if it is a stm32f103, then you would need a st-link or the serial route (e.g. use a usb-uart dongle) to flash the custom bootloader.
custom bootloaders has all the troubles with the ld script , start address etc that you need to get them correct for your sketch build.
you would need to google around for information on those.
roger's libmaple bootloader is here
https://github.com/rogerclarkmelbourne/ ... bootloader
mainly only for the stm32f103c8, cb chips. you would need to find out about the start address, ld scripts etc.
I think for roger's bootloader, there are 'preconfigured' selections on the arduino menu for the 'down(up)load method' - maple - or stm32duino (i.e. roger's) bootloader, usb-uart or st-link etc which would pick the correct ld script that goes with the custom (roger's) stm32duino or maple bootloader
note that 'roger's stm32duino' bootloader and 'maple' bootloader has different start address.
and
that it needs dfu-util, I'm not sure if there could be issues in windows with it.
https://dfu-util.sourceforge.net/
dfu-util is normally bundled with the core in the tools folder.