sorry for asking , im not good enough with esp32
my pc is reset and my coding is missing , but my code have inside the esp32 , how i can retrieve back the code inside the esp32 in c+++ (its a long code)
thank you
sorry for asking , im not good enough with esp32
my pc is reset and my coding is missing , but my code have inside the esp32 , how i can retrieve back the code inside the esp32 in c+++ (its a long code)
thank you
It is not possible to recover the C++ code from the ESP32 memory. The source code has been converted into machine instructions, which are stored in the memory.
i see , if i can get the hex code , is it possible to change it
Sure, you can change the binary data from the ESP32 memory, but how would you know what to change?
Welcome to the forum
If you are hoping to get your sketch back than you are out of luck because it is not on the board. You may be able to get the compiled binary file from the board but what would you do with it ?
i see , thank youu for the info , basically i need to rewrite back hm
thank youu!!
ahhh not my luck, sorry, im not good enough with the code so i will be lost
btw thank you for the fast responses
Hi @kyojinst
Depending on what you mean by "reset", it might be possible to recover your code in a different way. Arduino IDE copies your sketch to a temporary folder during the compilation process. It is possible the full sketch is still stored in that folder.
Assuming you are using Arduino IDE 2.x, it would be at this location:
C:\Users\<username>\AppData\Local\Temp\arduino\sketches\<some hash>\<sketch name>\<sketch name>.ino.cpp
(where <username> is your Windows username, and <some number> is some characters used to differentiate the folder name, and <sketch name> is the name of the sketch)
For example:
C:\Users\per\AppData\Local\Temp\arduino\sketches\3A9AF02994178C2791F98B37AF39F346\MySketch\MySketch.ino.cpp
If looking for it with your file manager or command line, note that the AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
/tmp/arduino/sketches/<some hash>/<sketch name>/<sketch name>.ino.cpp
(where <some hash> is some characters used to differentiate the folder name and <sketch name> is the name of the sketch)
$TMPDIR/arduino/sketches/<some hash>/<sketch name>/<sketch name>.ino.cpp
(where $TMPDIR is the system temporary folder, <some hash> is some characters used to differentiate the folder name, and <sketch name> is the name of the sketch)
For example:
/private/var/folders/sx/07hx_hp11nz50sf4ljwylj080000gn/T/arduino/sketches/3A9AF02994178C2791F98B37AF39F346/MySketch/MySketch.ino.cpp
If you are using Arduino IDE 1.x instead of 2.x, just let us know and we'll provide the equivalent path for that IDE version.
Note that a .cpp file extension has been appended to the original sketch filename.
You can try doing a search through that folder for the filename of your sketch.
This storage location is temporary in nature. It might be overwritten by Arduino IDE or deleted by your operating system at any time. So if you are going to try to recover the sketch from this location, you should do it as soon as possible and immediately move it to a safe location once you find it. You should also be careful to avoid performing actions that would trigger the loss of the data before attempting the recovery:
If you find the sketch file in the temporary folder, you will notice Arduino IDE made some changes in the code. These changes are minimal so it will be easy to convert the code back to your original sketch. We can help you out with that if you have trouble.