RadioOperator / Yet_Another_Bootloader

This Yet Another Bootloader (YAB) is for STM32, STM32F103, STM32F407, STM32L433, STM32F723, STLINK-V3, STLINK-V3MINI, CMSIS-DAP.
Apache License 2.0
78 stars 41 forks source link

Compatibility with STLINKV3-MINIE #5

Open vincent290587 opened 2 months ago

vincent290587 commented 2 months ago

Hi !

And thanks for the great work, i have managed to use the YAB on a STM32H735G-DK successfully, but when trying to use the STLinkUpgrade.jar exec, I got an error code:

Unexpected device ID for ST-Link micro. Don't know how to upgrade.

Would you consider updating the .jar or giving some information on how to do it ?

RadioOperator commented 2 months ago

Hi, sorry, I did not touch the App STLinkUpgrade.jar, it comes from ST software tools. I do not know how to......

vincent290587 commented 2 months ago

Ok understood, I think maybe they changed the encryption of the f3 files ?

Could you tell me about that part ?

RadioOperator commented 2 months ago

I'm not sure what happened on your case. I remember, ST-Link programmer/updater/upgrader, already check the device serial no (ID ?) before flashing the IC. If your st-link not from ST orignal, you have to flash a hacked version bin code first, then the upgrade App will work.

vincent290587 commented 2 months ago

I am currently upgrading my MINIE from its DFU itself so nothing is hacked there.

Apparently they bumped up security, I managed to get more information:

java -jar STLinkUpgrade.jar -force_prog

Firmware version detected: V3J9M3
Exception in thread "main" java.lang.SecurityException: SHA-256 digest error for com/st/stlinkupgrade/core/f3_1.bin
        at sun.security.util.ManifestEntryVerifier.verify(Unknown Source)
        at java.util.jar.JarVerifier.processEntry(Unknown Source)
        at java.util.jar.JarVerifier.update(Unknown Source)
        at java.util.jar.JarVerifier$VerifierStream.read(Unknown Source)
        at java.io.FilterInputStream.read(Unknown Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at com.st.stlinkupgrade.core.c.h(SourceFile:984)
        at com.st.stlinkupgrade.app.b.b(SourceFile:277)
        at com.st.stlinkupgrade.app.b.a(SourceFile:136)
        at com.st.stlinkupgrade.app.MainApp.main(SourceFile:16)

It seems it is the f3 files authentication, but I don't know what we can do there...

vincent290587 commented 2 months ago

Definitely related to this:

https://github.com/RadioOperator/CMSIS-DAP_for_STLINK-V3MINI/issues/1

I don't think there will be a fix anytime soon, I am fine to close this issue