STM32F103C8 and Fast Bootloader

STM32duino bootloader aka Maple bootloader
GeorgeIoak
Posts: 39
Joined: Sun Jun 07, 2020 2:01 am

Re: STM32F103C8 and Fast Bootloader

Post by GeorgeIoak »

Here's my current settings that have working reliably although I've only flashed a handful of times since getting this to work

When I was experimenting with the USB Boot Loader I never did get it work without some type of manual reset but the HID has always worked to reset the board automatically.
Attachments
Arduino HID Boot Loader Settings.PNG
Arduino HID Boot Loader Settings.PNG (21.82 KiB) Viewed 66512 times
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: STM32F103C8 and Fast Bootloader

Post by ag123 »

i see so CDC is still there, it is likely useful after all, as Serial.print("message"); would go to the virtual comm port to your pc console.
and there is no need for a usb-uart dongle, a usb - micro/mini cable would do it.
USB is very complex due to all that state management. i think if one is determined, i think one can hack the core implementation so that it shows as 2 'com' ports even if there is only one device, it would take quite a bit of changes and deep down understanding of usb.
this may for instance help, if you want a 'side' channel for the debug messages. the other way is to hack in the core to figure out
if you can place a hook to process custom usb requests, as normally for usb-serial (CDC) there are 3 endpoints, endpoint 0 is the control pipe in which usb requests are transmitted, the other 2 (IN and OUT) are used for the normal usb comms. as usb endpoints are basically 'logical' concepts one can hack around that to add 'side channel' functionalities
Last edited by ag123 on Fri Jul 17, 2020 11:21 am, edited 2 times in total.
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32F103C8 and Fast Bootloader

Post by fpiSTM »

You can disable the uart support.
GeorgeIoak
Posts: 39
Joined: Sun Jun 07, 2020 2:01 am

Re: STM32F103C8 and Fast Bootloader

Post by GeorgeIoak »

Thanks again. Yes, I disabled the UART and everything works the same and that freed up a little more flash:

Code: Select all

Sketch uses 58964 bytes (89%) of program storage space. Maximum is 65536 bytes.
Global variables use 4192 bytes (20%) of dynamic memory, leaving 16288 bytes for local variables. Maximum is 20480 bytes.
For reference this is what it was with UART enabled:

Code: Select all

Sketch uses 60712 bytes (92%) of program storage space. Maximum is 65536 bytes.
Global variables use 4456 bytes (21%) of dynamic memory, leaving 16024 bytes for local variables. Maximum is 20480 bytes.
Post Reply

Return to “USB bootloader”