Skip to content

Instantly share code, notes, and snippets.

@jamesy0ung
Created January 16, 2023 11:35
Show Gist options
  • Save jamesy0ung/919ef51fea4631e9dfe0bd26dc85c8f0 to your computer and use it in GitHub Desktop.
Save jamesy0ung/919ef51fea4631e9dfe0bd26dc85c8f0 to your computer and use it in GitHub Desktop.
@wyatt-mattas
Copy link

@jamesy0ung Could you provide more details/steps on what drivers for the ST-Link clone, J-Link software, and such that you were using? I have tried using a usb ST-Link clone and it is either not being detected or it hangs when.

@Zelmoghazy
Copy link

It flashes the st-link clone , but it bricks it and it doesnt works as j-link and you cannot revert it to st-link

@jamesy0ung
Copy link
Author

Did you use Version 190812 of STLinkReflash?
I was using the latest J-Link software and after flashing, it came up as J-Link Onbord and is able to flash and debug any STMicroelectronics branded chip.

@Zelmoghazy
Copy link

Zelmoghazy commented Apr 24, 2024

Did you use Version 190812 of STLinkReflash?

I bough another st-link clone and reflashed the bricked one , after alot of trial and error I can confirm it does work , I got system view from segger working using it , thank you

SystemView_uEmehNn9dd

@avlasic
Copy link

avlasic commented May 23, 2024

If someone else gets error in STLinkReflash that st-link firmware is unsupported, I managed to convert it by flashing old firmware via swd pins on st-link clone pcb (not external ones) with another st-link.

Google "STLinkV2.J16.S4.bin" for firmware.

@ihrapsa
Copy link

ihrapsa commented Jun 1, 2024

Thanks! I modified those offsets and my Geehy APM32 ST-Link V2 clone got recognised by STLink Reflash and succesfully upgraded to Jlink. Here is the software both stock and modified.

@nuntax
Copy link

nuntax commented Aug 1, 2024

Important note is that while installing the jlink utility, you have to check the box for the legacy usb drivers to restore, maybe that is the problem that @Zelmoghazy ran into?

@squintz
Copy link

squintz commented Aug 12, 2024

I was hopeful but this didn't work for me. The modified program just keeps crashing after pressing 1. I'm using 190812 and used Free Hex Editor NEO to modify it.

@ihrapsa
Copy link

ihrapsa commented Aug 12, 2024

I was hopeful but this didn't work for me. The modified program just keeps crashing after pressing 1. I'm using 190812 and used Free Hex Editor NEO to modify it.

Have you also tried my linked modified version? You can diff compare with stock binary if not trusting it.

@squintz
Copy link

squintz commented Aug 13, 2024

Thanks. I overlooked that link. Your version worked.

@jeffmoss1999
Copy link

Hello all. So I have followed through the guides on converting these chinese clone stlinks to a jlink. I have no luck. After the jlink firmware is flashed my stlink will just flash a red light over and over and over. I have brought it back to life using a second stlink clone but every time I get the flashing red light. I have followed this guide https://github.com/Zelmoghazy/st-link-v2-clone?tab=readme-ov-file and tried all of the tricks he states. Is there something I could be missing? Does there happen to be a bin file of the firmware somewhere so we can just flash the chip directly with a second stlink? Thanks in advance for any replies.

@The-Synthax
Copy link

Yeah honestly if we can just directly flash the ST-Link firmware, why are we fucking about with a janky old utility that doesn't work half the time? Someone should just extract the binary from STLinkReflash or dump it from a clone ST-Link after flashing it with the utility.

@jamesy0ung
Copy link
Author

Someone did write a decrypter (https://github.com/lujji/st-decrypt), that may be worth looking at, although it is a bit old. Sorry I have mostly work on AVR, RP2040 and ESP32 series due to their open toolchains and programmers.

@The-Synthax
Copy link

Has anyone located an updater for a version older than V2.J36.S2? I'd like to try V2.J16.S4, but don't have another ST-Link to flash the bin directly at the moment. If anyone knows of a way to get onto that low of a firmware without an external programmer, please share!

@ntn888
Copy link

ntn888 commented Feb 23, 2025

Hi could anyone provide the hex file dump of the final jlink firmware? I don't have access to windows pc and cannot run the STLinkReflash.exe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment