Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save martonmiklos/91bc396f1130a5da554970cd76f34116 to your computer and use it in GitHub Desktop.
Save martonmiklos/91bc396f1130a5da554970cd76f34116 to your computer and use it in GitHub Desktop.
stlinkV3 STM32F031K6T6
mm@lapos:~/Projektek/stlink$ git show --summary
commit 9956bdeaab034033c3959751460e6cffe464df52 (HEAD -> develop, origin/develop)
Merge: 1eaa638 dd877b1
Author: nightwalker-87 <[email protected]>
Date: Sun Mar 14 21:17:53 2021 +0100
Merge pull request #1104 from Ant-ON/fix_stlink_v1
Fixed support for STLINK/V1 programmer
mm@lapos:~/Projektek/stlink$ ./bin/st-info --probe
Found 1 stlink programmers
version: V3J7S1
serial: 303033343030314433303338353130393334333333393335
hla-serial: "\x30\x30\x33\x34\x30\x30\x31\x44\x33\x30\x33\x38\x35\x31\x30\x39\x33\x34\x33\x33\x33\x39\x33\x35"
flash: 32768 (pagesize: 1024)
sram: 4096
chipid: 0x0444
descr: F0xx small
mm@lapos:~/Projektek/stlink$ ./bin/st-flash --area=main read /tmp/foo.bin 0x08000000 0x8000
st-flash 1.6.1-224-g9956bde
2021-03-15T10:16:10 INFO usb.c: Unable to match requested speed 1800 kHz, using 1000 kHz
2021-03-15T10:16:10 WARN usb.c: NRST is not connected
2021-03-15T10:16:10 INFO common.c: F0xx small: 4 KiB SRAM, 32 KiB flash in at least 1 KiB pages.
2021-03-15T10:16:10 INFO common.c: read from address 0x08000000 size 32768
mm@lapos:~/Projektek/stlink$ ./bin/st-flash --area=main write /tmp/foo.bin 0x08000000
st-flash 1.6.1-224-g9956bde
2021-03-15T10:16:17 INFO usb.c: Unable to match requested speed 1800 kHz, using 1000 kHz
2021-03-15T10:16:17 WARN usb.c: NRST is not connected
2021-03-15T10:16:17 INFO common.c: F0xx small: 4 KiB SRAM, 32 KiB flash in at least 1 KiB pages.
file /tmp/foo.bin md5 checksum: 6ad568b4d133f3effd8d509a481d891, stlink checksum: 0x00498644
2021-03-15T10:16:17 INFO common.c: Attempting to write 32768 (0x8000) bytes to stm32 address: 134217728 (0x8000000)
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08000000 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08000400 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08000800 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08000c00 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08001000 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08001400 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08001800 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08001c00 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08002000 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08002400 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08002800 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08002c00 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08003000 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08003400 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08003800 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08003c00 erased
2021-03-15T10:16:17 INFO common.c: Flash page at addr: 0x08004000 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08004400 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08004800 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08004c00 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08005000 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08005400 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08005800 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08005c00 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08006000 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08006400 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08006800 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08006c00 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08007000 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08007400 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08007800 erased
2021-03-15T10:16:18 INFO common.c: Flash page at addr: 0x08007c00 erased
2021-03-15T10:16:18 INFO common.c: Finished erasing 32 pages of 1024 (0x400) bytes
2021-03-15T10:16:18 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL
2021-03-15T10:16:18 INFO flash_loader.c: Successfully loaded flash loader in sram
2021-03-15T10:16:18 ERROR flash_loader.c: Write error (R2 0x000001FF R15 0xFFFFFFFE DHCSR 0x00030003 DFSR 0x00000009)
2021-03-15T10:16:18 ERROR common.c: stlink_flash_loader_run(0x8000000) failed! == -1
stlink_fwrite_flash() == -1
mm@lapos:~/Projektek/stlink$ ./bin/st-flash --area=main write /tmp/foo.bin 0x08000000
st-flash 1.6.1-224-g9956bde
2021-03-15T10:16:20 INFO usb.c: Unable to match requested speed 1800 kHz, using 1000 kHz
2021-03-15T10:16:20 WARN usb.c: NRST is not connected
2021-03-15T10:16:20 INFO common.c: F0xx small: 4 KiB SRAM, 32 KiB flash in at least 1 KiB pages.
file /tmp/foo.bin md5 checksum: 6ad568b4d133f3effd8d509a481d891, stlink checksum: 0x00498644
2021-03-15T10:16:20 INFO common.c: Attempting to write 32768 (0x8000) bytes to stm32 address: 134217728 (0x8000000)
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08000000 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08000400 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08000800 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08000c00 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08001000 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08001400 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08001800 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08001c00 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08002000 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08002400 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08002800 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08002c00 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08003000 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08003400 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08003800 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08003c00 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08004000 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08004400 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08004800 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08004c00 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08005000 erased
2021-03-15T10:16:20 INFO common.c: Flash page at addr: 0x08005400 erased
2021-03-15T10:16:21 INFO common.c: Flash page at addr: 0x08005800 erased
2021-03-15T10:16:21 INFO common.c: Flash page at addr: 0x08005c00 erased
2021-03-15T10:16:21 INFO common.c: Flash page at addr: 0x08006000 erased
2021-03-15T10:16:21 INFO common.c: Flash page at addr: 0x08006400 erased
2021-03-15T10:16:21 INFO common.c: Flash page at addr: 0x08006800 erased
2021-03-15T10:16:21 INFO common.c: Flash page at addr: 0x08006c00 erased
2021-03-15T10:16:21 INFO common.c: Flash page at addr: 0x08007000 erased
2021-03-15T10:16:21 INFO common.c: Flash page at addr: 0x08007400 erased
2021-03-15T10:16:21 INFO common.c: Flash page at addr: 0x08007800 erased
2021-03-15T10:16:21 INFO common.c: Flash page at addr: 0x08007c00 erased
2021-03-15T10:16:21 INFO common.c: Finished erasing 32 pages of 1024 (0x400) bytes
2021-03-15T10:16:21 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL
2021-03-15T10:16:21 INFO flash_loader.c: Successfully loaded flash loader in sram
32/ 32 pages written
2021-03-15T10:16:23 INFO common.c: Starting verification of write complete
2021-03-15T10:16:23 INFO common.c: Flash written and verified! jolly good!
mm@lapos:~/Projektek/stlink$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment