How to extract the binary from STM32 MCU
you can download the flash content using a ST-Link probe and STM32CubeProg tool. you can't flash it to just &quot;any&quot; arduino board; it must be the exact same chip or same family MCU, if the IOs and peripherals used are the same.