Code: Select all
$ st-info --probe
Found 1 stlink programmers
version: V2J17S4
serial: 54FF67064882565217411887
flash: 65536 (pagesize: 1024)
sram: 20480
chipid: 0x0410
descr: F1xx Medium-density
$ st-flash write generic_boot20_pc13.bin 0x8000000
...
2023-02-25T17:29:37 INFO common.c: Flash written and verified! jolly good!
Code: Select all
Congratulations, you have installed the STM32duino bootloader
See https://github.com/rogerclarkmelbourne/STM32duino-bootloader
For more information about Arduino on STM32
See https://www.stm32duino.com
Now I upload a simple sketch that blinks and write "Hello" on the serial via pio.
Code: Select all
[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
upload_protocol = dfu
Code: Select all
$ pio run -t upload
...
Download done.
DFU state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Resetting USB to switch back to runtime mode
I suspect the upload overwrote the bootloader?
I then assumed the sketch should be located at 0x8002000 and tried the following to no avail:
Code: Select all
[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
upload_protocol = dfu
board_upload.offset_address = 0x2000
Any pointers on what I might be missing?