Zelmoghazy / st-link-v2-clone

How to Program and Recover Chinese Clone of the st-link v2 and reflash it to segger j-link
14 stars 2 forks source link
clone freertos j-link mh2103a segger st-link st-link-v2 stm32 systemview

How to Program and Recover Chinese Clone of the st-link v2

Programming Steps

1- unlock the flash on device (configuration is included in the repo)

openocd -f interface/stlink-v2.cfg -f .\myconfig.cfg -c "init" -c "halt" -c "stm32f1x unlock 0" -c "shutdown"

2- Erase the flash on device

st-flash erase

3- flash the st-link bootloader

openocd -f interface/stlink-v2.cfg -f .\myconfig.cfg -c "init" -c "halt" -c "flash write_image erase Unprotected-2-1-Bootloader.bin 0x08000000" -c "shutdown"

4- Open included st-link utility version (you need an old version newer versions doesnt work)

5- Use CubeProgrammer to upgrade to latest firmware

Convert ST-Link clone to J-Link

Steps :

  1. Use STLinkReflash (Version 190812)

    • only use this version (included in the repo)
  2. Modify the following offsets in STLinkReflash.exe or use the included prepatched version

    2566 3C > 38

    2567 40 > C0

    26B2 3C > 38

    26B3 4A > C0

  3. Run STLinkReflash.exe and accept, selecting option 1.

SEGGER SystemView