Help Recovering and Editing code from a ESP32 S2 board

Hi All...

Sorry for the noob question but im a little stuck, A few months back I done a project on a esp32 board. Im now re-visiting it to upgrade it and I have found I cant find the original sketch.

I do however have a working board with it on. I know i cant recover the the sketch but I have download a bin file from the board.

Ive put the bin in an hex editor and can see what I need to edit but when I save and reupload the new board doesnt like it.

I have uploaded the untouched bin to the board and all is good.

What am I missing?
Any help would be great..

Thanks

I wonder what that means.

Did you change the file format so the loader can actually process it?

Sorry.

Basically the program does not run on the board.
Its a wifi monitor with lcd nothing runs - its dead

Not sure what you mean.

I loaded the bin file in hxd and then edited some text (which is just a web address the lcd displays) so nothing major and then save as and made a new bin file

Sorry very newbie for this area

That could be due to any number of problems. If the program can be successfully uploaded, it "runs" and does something.

The error messages give important clues.

Help the helpers by reading and following the directions in the "How to get the best out of this forum" post, linked at the head of every forum topic.

ANY file could be appended with .BIN. That does not automatically make it a format that can be used by the program that uploads a .BIN file to your Arduino.
Uploadable records are usually formatted with a beginning address and a count of the number of bytes in this record. Your .BIN file has none of that.

I was thinking it could be way the new bin is saved?

As the edited content of the bin should not effect how the program runs.

Thanks anyway for your time

What happens if you revise the original file, save it then revise it back to its original state and save it again. Does it work as it did originally when uploaded ?

Good call I will try this shortly.

Ok so I edited the file changing 1 text character only and saved.
Uploaded and its a no go.
Edited the file back to original and saved, uploaded and fine.

Sounds like there is a data integrity checksum value in the file.

If you ever get around to posting the error messages, people might be able to help.

Yes was thinking some kind of checksum.

I dont get any error messages as its just installed on the board with lcd attached, it just doesnt operate.

Good luck with your project.

I doubt you can just edit the bin file because that would change the address locations of where things are stored. I think your best bet is starting over. Your lucky its only been a couple of months instead of a couple of years.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.