Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to decompile .bin from Microchip EEPROM

Status
Not open for further replies.

Jamesscaggs

Newbie
Joined
Jun 12, 2021
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
40
This is probably a dumb question but I’ll ask it anyway. I’ve dumped a bin file from a Microchip EEPROM and am wanting to decompile it using Ghidra. When I import the file it detects the raw binary format but I need to select the language and compiler but I am not sure which to select. I have the data sheet for the EEPROM chip

https://ww1.microchip.com/downloads/en/DeviceDoc/doc3256.pdf

The microcontroller is this PIC

https://www.mouser.com/ProductDetai...C33EP16GS202-E-SS?qs=3K5NeMAIBDnPhqw/6zknnQ==
 

Hi,

I doubt that there is executable code in an external EEPROM connected to a PIC.

Klaus
 

Hi,

I doubt that there is executable code in an external EEPROM connected to a PIC.

Klaus
I am wanting to compare two different eeprom files from two boards of the same type. I have the two files but I don't understand what the next step is.
 

EEPROM is used for data storage, not program storage so there would be nothing Ghidra could recover. The program resides inside the PIC, the EEPROM is read or written by the program but only to store things like configuration or log files. The process of electrically reading and writing the EEPROM makes it virtually impossible to actually run a program inside it.

I think what you are trying to do is work out which addresses in the EEPROM hold specific information, to do that you can either use trial and error by making changes and then reading the EEPROM to see what difference is made, or you can attempt to decompile the code memory inside the PIC. I would caution you though that almost all commercial PIC code is protected electrically by setting a bit inside the IC. It doesn't prevent it being RE-programmed because erasing the device to clear the protection bit also wipes the program memory!

Also note that the addresses used to store data in the EEPROM are decided by the program so there is a risk that different program versions allocate them differently.

Brian.
 

You can store program code in EE but to execute it would need to move it
to FLASH and then execute from there. Could be a boot loader function.

Depends on PIC, 16F maybe no, 18F I think yes....if capability exists to use
bootlaoders, eg. program its own FLASH....

Regards, Dana.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top