How to extract the current Flash and EEPROM data from M5Stack fire to Windows11 file ?
-
Hello everybody.
I'm newby and I have searched to get the information in this Community but I coudn't get any useful topics. Please help me about the following issue.
Yesterday, I bought M5Stack fire based Self Balancing Robot kit (BALA2Fire) and I would like to extract the current preloaded software (for Flash and if possible for EEPROM) in the M5Stack fire, because the initial software will be overwritten by future sketch replacement.
I am considering software tools (Avrdude etc. ) may be able to extract the binary from M5Stack fire, but I couldn't have been trying yet because of wondering to influence or lose the initial software.
I am using Windows11 and please let me know how to extract whole current software (Flash data and if possible EEPROM data ) from M5Stack fire system.
Thank you in advance.
RuriObb
-
@RuriObb You cannot extract the source code from an ESP32 except a raw bin file.
But this is the example Arduino IDE source code (C, C++) on Github:
https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Application/Bala2 -
Thank you for your help.
But I doubt that the Bala2 source code (Bala2.ino) in the Github does not equal to preloaded software in Bala2fire product.
So first of all I need to extract the current binary content from Flash and EEPROM of Bala2fire, and save it to Windows file in case it will be necessary to restore the initial state in the future.
I investigated furthermore and I studied "esptool" can extract binary content from Flash memory (maybe also EEPROM) of M5Stack fire to Windows file, but I would like to know that the following process is correct or not for savIng and restoration full of binary content.
-
To read from 0x00000 to x400000 Flash memory content and
save it to Windows file (e.g. file name image4M.bin) by using
"esptool" -
To write from 0x00000 to x400000 Flash memory content with
image4M.bin
Regarding 4M, I think initial Bala2fire uses at most 4M byte Flash for preloaded software.
Thank you in advance.
RuriObb
-
-
I noticed that Arduino IDE can output tge detail Information on ELF file etc. while compiling. I think this detail information will be very helpful for studing further about the binary content in the M5Stack Flash memory.
Thank you everybody.