I searched for string references and soon found a part of code that decides which firmware to flash based on the ID of the programmer.
![windows 10 stm32 stlink driver clone windows 10 stm32 stlink driver clone](https://user-images.githubusercontent.com/8660811/66247763-fb103f00-e6f6-11e9-96e5-6b62aadd91de.png)
At first I tried following the author’s approach and disassembling the windows executable. There is an article by Taylor Killian written in 2013, which covers extracting ST-Link firmware from the updater executable. Being able to unsecure the chip by erasing the flash contents suggests that Level 1 protection is active (more on that in Part 2). Apparently, J-Link linux utility was ‘kind’ enough to remove option bytes without even asking the user.ĭespite the fact that I lost my programmer, I still learned some useful information. Flash was completely erased and I lost my ST-Link. Note: Unsecuring will trigger a mass erase of the internal flash. This could cause problems during flash download. 1Īctive read protected STM32 device detected. I launched J-Link Commander, typed ‘connect’ and was very surprised. Initially, I tried connecting to the MCU with J-Link and see if we get anything useful. Looking at windows drivers reveals a number of different PID combinations. Presumably, A, B and 2-1 versions all have UART support and a different bootloader. According to the ST employee, there are 4 versions of ST-Link 2: ST-Link/v2, ST-Link/v2-A, ST-Link/v2-B and ST-Link/v2-1. He pointed me towards this discussion on the ST forums. ResearchĮEVBlog forum user eliocor was kind enough to help and did a lot of research on the topic. That made me think if there are any ways of getting UART on a ‘regular’ ST-Link. The only big difference is that v2-1 uses an MCU with 128k of flash versus 64k on v2 programmer. After studying the schematics I realized that the programmer is pretty much identical to a regular ST-Link v2 in terms of hardware. Sweet! Although I wasn’t very excited about the drag-n-drop thing, having UART for debugging on the same board comes in real handy. Recently, I came across a Nucleo board with an ST-Link v2-1, which in addition to all the regular features acts as a virtual COM port (VCP) and supports drag-n-drop upload. The more I use it, the more I seem to forget about this abomination. It can program, debug and even supports SWO Trace.
![windows 10 stm32 stlink driver clone windows 10 stm32 stlink driver clone](http://www.emcu.it/ST-LINKv2/ST-LINK-UTILITY-Page.png)
![windows 10 stm32 stlink driver clone windows 10 stm32 stlink driver clone](https://dh1tw.de/img/2020/01/stm32-stlink-utility.jpeg)
So, I ask if someone has the same problem and know how to resolve it, please contact to me and let me know.This is the first part of ST-Link reverse-engineering, where I cover analyzing and decompiling the updater utility, decrypting and encrypting firmware binaries and running custom code on ST-Link v2/2-1 programmer. So reading that I tough that just flashing the code into the board It will make the COM port appear, when a I plugged the microUSB but don't happen. It will show up as MSP-EXP430F5438 USB - Serial Port(COM x), Tiva Virtual COM Port (COM x), XDS110 Class Application/User UART (COM x) for MSP432, under Ports (COM & LPT) in the Device manager.' Once connected, wait for the driver to install. In the API's demo example says that 'Once the code is flashed, connect the board to a PC using a miniUSB or microUSB cable. I install the driver that ST brings which is STSW-009, to program via miniUSB, but it only flashed the code into the board it doesn't open any COM port when I plugged the miniUSB again or the micro-usb to the PC and reset the board. I read the API documentacion, 'Enable_STM32_Discovery.pdf' and make all the changes that I've to. I am using de STM32DiscoveryF4 in my project and the CC2564MODN bluetooth module with the adapter kit to make a bluetooth serial port profile with the API's that TI brings (SPPLE), but once the code is flashed and the board programmed I can't make the COM port appear, even connecting the micro-usb to the PC too.