Unable to load a sketch

STM32duino bootloader aka Maple bootloader
Post Reply
Thejs1234
Posts: 2
Joined: Sun Oct 09, 2022 4:28 pm

Unable to load a sketch

Post by Thejs1234 »

Hello,
I'm trying to load the blink sketch on one of my first STM32 board that I designed. (It's the STM32F103C8T6)
It is detected by my Mac when I plug it, but then, when I simply try to load the Blink sketch, it outputs me this error :
dfu-util: Invalid DFU suffix signature
dfu-util 0.8
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Opening DFU capable USB device...
ID 1eaf:0003
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #2 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 1024
dfu-util: Invalid dfuse address: /Applications/Arduino.app/Contents/Java
Une erreur est survenue lors du transfert du croquis
Could someone help me ?
Thanks
PS : I'm French btw so it's normal if you see the output with text in French.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Unable to load a sketch

Post by ag123 »

i'm not sure how that's run, but that DfuSe, is intended for ST's DFU devices
https://dfu-util.sourceforge.net/dfuse.html
e.g. stm32f401 / stm32f411 (e.g. 'black pill') stm32f4xx etc has them.
stm32f103 natively don't have DFU and you'd need either an st-link v2
https://www.adafruit.com/product/2548
https://www.st.com/en/development-tools/st-link-v2.html
or a usb-uart dongle to program it from uart1 (this requires setting boot0)

there is this 'old' bootloader that exist during the days of maple mini (stm32f103cb or c8)
https://github.com/rogerclarkmelbourne/ ... bootloader
but to use this, you need to first flash the boot loader using either st-link or a usb-uart dongle
Thejs1234
Posts: 2
Joined: Sun Oct 09, 2022 4:28 pm

Re: Unable to load a sketch

Post by Thejs1234 »

I already uploaded the ‘old’ STM32duino bootloader with my usb to uart adapter.
I don’t understand why would I always have to use the adapter to load programs, because if you search “STM32 arduino” on the internet, people just load the STM32duino bootloader on their blue pill which has the same processor as my board, and they can just load programs via usb.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Unable to load a sketch

Post by ag123 »

for the 'old' maple (roger's) DFU bootloader, the dfu-util command is:

Code: Select all

dfu-util -a 2 -RD sketch.bin
there is one more parameter -s, -s is for DfuSe which is only needed for ST's DFU where the command could look like
this is for those mcus like stm32f4xx

Code: Select all

dfu-util -a 2 -s 0x8000000 -RD sketch.bin
Post Reply

Return to “USB bootloader”