Skip to main content
MGogr.1
Senior
July 2, 2025
Question

Program bin file from Cube Programmer

  • July 2, 2025
  • 2 replies
  • 643 views

I have two stm32f429 Discovery boards. I programmed one of the board using cube ide; the output of which was as expected. Then using cube programmer I read and saved the bin file from that board. Using that bin file I programmed my another board which was successful, but there was no output.

Is there any another method to do this?

I am doing this because I want to save bin file from my custom board and program it to another board and I don't have original code.

2 replies

KnarfB
Super User
July 2, 2025

Besides the flash, there is also the user/option bytes area. You may want to compare those with STM32CubeProgrammer. 

Otherwsie, if you save the *entire* flash as .bin, the boards shall behave identically.

The only exception is if the firmware actively works against that, like by evaluating the unique device id etc..

hth

KnarfB

MGogr.1
MGogr.1Author
Senior
July 2, 2025

I compared  both the files and it says no difference found. But no output in second board.

MGogr.1
MGogr.1Author
Senior
July 2, 2025

Did you even understand what I want to do?? Or should I explain it again!

I'm using .bin file to program my board. The output of which should be simple PWM pulse which I'm not getting.

So its not a hardware issue as I'm using STM Discovery boards to test my setup. Since its a bin file I can not check in Disassemble / Debug nor it can be Stuck in Error_Handler() or HardFault_Handler().

It can be a problem of Cube programmer not programming properly or steps I'm following are not correct.

Tesla DeLorean
Guru
July 2, 2025

So probably not recovering and writing enough. There's 2MB of FLASH, so 0x08000000 to 0x081FFFFF

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..