Skip to content

Instantly share code, notes, and snippets.

@jamesy0ung
Created January 16, 2023 11:35
Show Gist options
  • Select an option

  • Save jamesy0ung/919ef51fea4631e9dfe0bd26dc85c8f0 to your computer and use it in GitHub Desktop.

Select an option

Save jamesy0ung/919ef51fea4631e9dfe0bd26dc85c8f0 to your computer and use it in GitHub Desktop.
@wyatt-mattas

Copy link
Copy Markdown

@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
Copy Markdown

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
Copy Markdown
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

Zelmoghazy commented Apr 24, 2024

Copy link
Copy Markdown

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

avlasic commented May 23, 2024

Copy link
Copy Markdown

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

ihrapsa commented Jun 1, 2024

Copy link
Copy Markdown

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

nuntax commented Aug 1, 2024

Copy link
Copy Markdown

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

squintz commented Aug 12, 2024

Copy link
Copy Markdown

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

ihrapsa commented Aug 12, 2024

Copy link
Copy Markdown

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

squintz commented Aug 13, 2024

Copy link
Copy Markdown

Thanks. I overlooked that link. Your version worked.

@jeffmoss1999

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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

ntn888 commented Feb 23, 2025

Copy link
Copy Markdown

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.

@skrimix

skrimix commented Jan 14, 2026

Copy link
Copy Markdown

The tool refused to recognize any firmware on my Geehy APM32 clone, I got another patch for it and extracted the firmware file for manual flashing. After some simple testing it seems to work.
https://github.com/skrimix/stlinkreflash

@DavidKubicek

Copy link
Copy Markdown

Please, I'm new to to STM32 and ARM debugging. I'd like an option for simple 3-link SWD, but also full support for debugging and flashing like original SEGGER, which of cource costs more than I make in a month. I found many clones on Aliexpress, and among them this medium-priced piece - will it work with ST-Link-converted-to-J-link HW as I'd expect? With full SEGGER system view?
https://www.aliexpress.com/item/1005006179146760.html?spm=a2g0o.productlist.main.42.2f9e22a07vB68F&algo_pvid=0d9e06c2-eced-4fde-8e9d-4294fc00da32&algo_exp_id=0d9e06c2-eced-4fde-8e9d-4294fc00da32-41&pdp_ext_f=%7B%22order%22%3A%2226%22%2C%22eval%22%3A%221%22%2C%22fromPage%22%3A%22search%22%7D&pdp_npi=6%40dis%21CZK%21643.36%21450.34%21%21%21203.59%21142.51%21%40211b80f717753166039024326e941c%2112000036159007197%21sea%21CZ%21823063824%21ABX%211%210%21n_tag%3A-29910%3Bd%3Acbac8a25%3Bm03_new_user%3A-29895&curPageLogUid=68NenJMJtKUC&utparam-url=scene%3Asearch%7Cquery_from%3A%7Cx_object_id%3A1005006179146760%7C_p_origin_prod%3A

Please, do advice me which real-HW debugger would be the best for JTAG+SWD debugging of STM32/ARM... Is around EUR 25 even possible? I hoped the better J-Link clones would do the job for about this much.

Thank you very much for sharing your experience. I can't get it together myself just by reading on docs and web. This has to be tested and proven. I have AliExpress “Pro Micro nRF52840 (Black Edition)” 2023/2024 clone, it has B- and B+ pinouts as the first ones next to the USB-C, one on each side.

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