stlink-tool icon indicating copy to clipboard operation
stlink-tool copied to clipboard

Flashing fails silently

Open DagAgren opened this issue 3 years ago • 2 comments

I have some STLink v2 clones that I wanted to program with Blackmagic Probe firmware. If I run stlink-tool on macOS with the precompiled .bin file from the BMP project, stlink-tool will show a progress on sending the firmware, and act as if everything went well, but the actual hardware seems to still be running the original firmware, as if nothing had happened. Any clue what might be going on here? I am a bit mystified.

@UweBonnes might have some idea?

DagAgren avatar Apr 11 '22 23:04 DagAgren

Hi,

I haven't spent a lot of time on stlink-tool lately, but here's a few clues:

  • Can you check the firmware offset for the BMP firmware? https://github.com/jeanthom/stlink-tool/blob/master/src/main.c#L114 sets it to 0x4000
  • What's the output of dmesg right after running st-info from https://github.com/stlink-org/stlink? It should trigger the DFU exit sequence
  • Can you take apart your adapter to check what's inside? Around two years ago STM32F1 supply was getting scarce and STM32F1 started getting really popular. These clones may or may not be suitable replacements for the original parts.

jeanthom avatar Apr 12 '22 05:04 jeanthom

I think stlink-tool triggers DFU exit as well? It only responds with valid data once at least. I don't think the offset is an issue, that should cause a failure to run afterwards (and BMP is designed to be used specifically with stlink-tool anyway). The adapters are quite a few years old, probably closer to five years old.

DagAgren avatar Apr 12 '22 08:04 DagAgren