That's how I upload a built sketch to an orone mini F3:
Pull up USB_DP with 1.5k. If you happen to have a newer orone mini design, you can pull down DISC with a jumper near the transistor. I use an early orone mini version and just connect 1.5k from USB_DP to VCC. In the manual it says that you should also pull low or high USART1 and USART2 (to not start the serial bootloaders accidentally), but this is unnessary IMHO, as USB is exclusively checked for first.
To get into DfuSe bootloader mode, BUT button (boot0) needs to be pressed at boot.
If USB cable is already connect and/or board is powered otherwise:
- press BUT button
- press RESET button
- release RESET button
- release BUT button
If USB cable not yet connected
- press BUT button
- connect USB cable
- release BUT button
Now you should be in DfuSe bootloader mode (USB device should show up in your OS).
lsusb
Bus 003 Device 020: ID 0483:df11 STMicroelectronics STM Device in DFU ModeBus 003 Device 020: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
If your on Linux, you may want to add a udev rule to have access rights as user of the right group (uucp in my case).
/etc/udev/rules.d/46-DfuSe.rules
----------------------------------------
ATTRS{idProduct}=="df11", ATTRS{idVendor}=="0483", MODE="664", GROUP="uucp", SYMLINK+="DfuSe"
I got this to work in windows 7, too, using http://zadig.akeo.ie/ to handle USB driver installation.
Upload your previously built binary with a recent version of dfu-util (e.g. 0.7). Only recent versions support DfuSe, which is an extension to the Dfu protocol by ST.
http://dfu-util.gnumonks.org/
dfu-util -a 0 -d 0483:df11 -s 0x08000000:leave -D build/F303CC.bin
dfu-util needs an explicit target memory address your sketch is destined for to run in DfuSe mode.
The :leave hook triggers a jump to user code after flashing, without the :leave, the device will remain in bootoader mode.
I hope it helps