2024-09-26 10:32 AM
I have your ST-LINK Utility connected to the STM32F405xx MCU on my FlashForge Creator Pro 2 3D printer (see screenshot below) and I want to capture the current firmware contents so I can revert to it if a planned firmware upgrade is unsuccessful.
The initial 'memory grid' display utility showed the memory from 0x8000000 to 0x8001000, and I tried saving this using 'File-Save As'. However, the saved file is only 4K bytes, and I was concerned that I'm only saving the first 4KB of a larger firmware image. Then I tried editing the 'Size' field to larger and larger values, and eventually got to the point where I saw a full row of '0000000's starting at 0x0800C6F0, and then rows of 'FFFFFFF's, starting at 0x0800C6F0 (see second image below). Then when I did another 'Save', the saved file size was 50KB rather than the 4KB from the first one. Is it safe to assume that saving everything up to the point where the display changes to 'FFFFFFF's gets the entire firmware image?
Assuming I have captured the entire firmware image correctly, am I correct in thinking that using the 'Target -> Program' command with the start address set to 0x08000000' and the file path set to point to the above uploaded binary will correctly revert whatever I have in the MCU to its original state?
TIA,
Frank
Solved! Go to Solution.
2024-09-26 11:02 AM
> Is it safe to assume that saving everything up to the point where the display changes to 'FFFFFFF's gets the entire firmware image?
Typically, yes, not but 100%. You could save the entire 2MB to be safe, but it's not likely there are things beyond that. Since it's easy to do, I would save the entire thing (size of 0x200000, might need to split it into two sections). Possibly the last page is used to store user data.
> Assuming I have captured the entire firmware image correctly, am I correct in thinking that using the 'Target -> Program' command with the start address set to 0x08000000' and the file path set to point to the above uploaded binary will correctly revert whatever I have in the MCU to its original state?
Yes, exactly.
ST-Link Utility is deprecated, but it works on the STM32F4 if you have a compatible firmware.
Consider using STM32CubeProgrammer.
2024-09-26 11:02 AM
> Is it safe to assume that saving everything up to the point where the display changes to 'FFFFFFF's gets the entire firmware image?
Typically, yes, not but 100%. You could save the entire 2MB to be safe, but it's not likely there are things beyond that. Since it's easy to do, I would save the entire thing (size of 0x200000, might need to split it into two sections). Possibly the last page is used to store user data.
> Assuming I have captured the entire firmware image correctly, am I correct in thinking that using the 'Target -> Program' command with the start address set to 0x08000000' and the file path set to point to the above uploaded binary will correctly revert whatever I have in the MCU to its original state?
Yes, exactly.
ST-Link Utility is deprecated, but it works on the STM32F4 if you have a compatible firmware.
Consider using STM32CubeProgrammer.
2024-09-26 08:11 PM
Thanks Guru - you answered my question completely. l did try using STM32CubeProgrammer, but I couldn't get it to connect to my MCU. The ST-LINK Utility connected on the first try. I like your idea of capturing the entire 2MB memory space - I think I'll do that in addition to capturing up to the 'FFFFFFFF' rows.
Frank