🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to extract the current Flash and EEPROM data from M5Stack fire to Windows11 file ?

    M5Stack Fire
    2
    4
    531
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      RuriObb
      last edited by

      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

      teastainT 1 Reply Last reply Reply Quote 0
      • teastainT
        teastain @RuriObb
        last edited by

        @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

        Cheers, Terry!

        100% M5Stack addict with several drawers full of product!

        R 1 Reply Last reply Reply Quote 0
        • R
          RuriObb @teastain
          last edited by

          @teastain

          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.

          1. To read from 0x00000 to x400000 Flash memory content and
            save it to Windows file (e.g. file name image4M.bin) by using
            "esptool"

          2. 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

          R 1 Reply Last reply Reply Quote 0
          • R
            RuriObb @RuriObb
            last edited by

            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.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post