0

Is it possible to extract a backup of the sketch uploaded to a NodeMCU (as I know that it is possible to backup the firmware).

If so, using which tools?

asked Jul 18, 2019 at 21:30
2
  • 1
    is your goal just to have a backup of the hexcode, or actually de-compile it back into C/C++? Commented Jul 18, 2019 at 22:43
  • esptool is THE tool for esp8266 Commented Jul 19, 2019 at 4:50

1 Answer 1

2

esptool.py is 'avrdude' for the esp8266. it can read the flash too. but you must know the addresses. tha first copy of the application always start at address 0x1000. the length of the application area depends on the size of the flash and the size of the SPIFFS.

> esptool.py read_flash -h
usage: esptool read_flash [-h] [--spi-connection SPI_CONNECTION]
 [--no-progress]
 address size filename
positional arguments:
 address Start address
 size Size of region to dump
 filename Name of binary dump
optional arguments:
 -h, --help show this help message and exit
 --spi-connection SPI_CONNECTION, -sc SPI_CONNECTION
 ESP32-only argument. Override default SPI Flash
 connection. Value can be SPI, HSPI or a comma-
 separated list of 5 I/O numbers to use for SPI flash
 (CLK,Q,D,HD,CS).
 --no-progress, -p Suppress progress output
answered Jul 19, 2019 at 5:19
1
  • i was under the impression that the same tool that i use to flash (firmware) would be the one to get this job done. tks 4 confirming and indicating which options to use and how to use them. UPVOTED, ACCEPTED. :) Commented Jul 19, 2019 at 8:50

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.