Skip to main content
Visitor II
July 29, 2021
Question

Windows: flashing the STM8S discovery from command line

  • July 29, 2021
  • 1 reply
  • 1227 views

Yes I want to flash my hex file to the board (connected by usb) from my VS Code setup.

I've looked in vain for a windows version of STM8flash. Anyone have a link to a ready built executable?

I understand that this should also be possible using openocd, but when I tried I got errors about the SWIM not being available. I thought openocd was for debugging - that's for later!

I can flash via STVP, so I'm not stuck, just want it a bit more automated.

Thanks :)

Gordon

    This topic has been closed for replies.

    1 reply

    gfmooreAuthor
    Visitor II
    July 30, 2021

    Well by pure fluke (and after hours of using useless google search!) I discovered how to do it.

    In ST Tools>STVP folder there is....wait for it....a STVP_CommandLine program. So to flash main.hex to my STM8S Discovery board through the USB

    stvp_cmdline -BoardName=ST-LINK -Device=STM8S105x6 -no_loop -FileProg=main.hex

    Yahoo, way to go. ;)