Skip to main content
Associate III
November 12, 2024
Question

Non-encrypted binary can't be flashed properly

  • November 12, 2024
  • 1 reply
  • 662 views

Hi everybody,

I am using a platform that is based on STM32. The developers of this platform have provided to me the firmware image as an encrypted .bin file. When I flash it via USB everything is fine.

Then I change their code and recompile everything using STM32CubeIDE. The produced binary is not encrypted. When I try to flash it, the flashing to the microcontroller fails. 

Could it be due to the fact that it is not encrypted? 

Note: when I flash my code using the .hex and an st-link everything works well.

 

Thank you in advance.

1 reply

Pavel A.
Super User
November 12, 2024

If the "bootloader" of this device expects encrypted binary, and you give it something else, of course it will fail.

As you've seen, it works when  flashed directly over ST-LINK.

 

 

 

Lyap94Author
Associate III
November 12, 2024

Thanks for your reply Pavel A.

So I guess I should try to encrypt the binary the same way they do.