Reading source code from microprocessors

Thread Starter

JuanjoGele

Joined Jul 15, 2016
7
Hi guys!

I wonder if there is a way to read the source code from a microprocessor. I have in my own a few microprocessors and I want to read them. They are from different developers. I have microprocessors from NXP, Xilinx, Nuvoton and Atmel.

I just want to know if a socket to read any of them exists. I want to change its source code to improve it. I would like to have the libraries they use. I have been investigating in some pages and I saw a device called Cyclone Universal but I don't know if it is very useful.

Best regards. Thank you.
 

Sensacell

Joined Jun 19, 2012
3,432
1) Some micros have code protection and cannot be read

2) The code you extract is not source code, it's raw assembly code, not human readable.

While what you suggest is theoretically possible, it would be the intellectual equivalent of climbing Everest with no oxygen and 2 broken legs.
You would have to breakdown the function of the software by brute analysis of the gibberish opcodes.

There are programs called dis-assemblers, but this only gets you 1% started
 

absf

Joined Dec 29, 2010
1,968
Most microprocessors have their programs stored externally in ROM, otp-PROM, EPROM or flash memories. Unlike microcontrollers who store their programs inside the uC chips.

You can extract the object codes from the external ROM if you have the device readers. But as @Sensacell has said the code is hard to interpret if you do not understand how the uP is connected and where the IOs are going...
 

atferrari

Joined Jan 6, 2004
4,764
Most microprocessors have their programs stored externally in ROM, otp-PROM, EPROM or flash memories. Unlike microcontrollers who store their programs inside the uC chips.

You can extract the object codes from the external ROM if you have the device readers. But as @Sensacell has said the code is hard to interpret if you do not understand how the uP is connected and where the IOs are going...
Chances would increase if you have a functional board available. There is one guy posting in EEVBlog who does reverse engineering with sophisticated techniques and elements but always on a complete circuit.
Not precisely what you would try to do.

But then, if you got the capability to improve a certain piece of code, you could be in condition of writing the equivalent from scratch. That is what I would try.
 
Last edited:

absf

Joined Dec 29, 2010
1,968
Depends on the human :)
I am sure those pioneers (like Steve Wozniak or Bill Gates) who develop computers like Apple II and Atari should be able to read the HEX of 6502 and convert them to assembly without the help of a computer.

I can only remember a few like A9 = LDA #$xx and 60 = RTS. And what is 8D ? STA $xxxx perhaps...

Allen
 
Last edited:

John P

Joined Oct 14, 2008
2,025
There are such things as "de-compilers", software that can take an assembly language file, or maybe hex code for a particular processor, and generate a high-level language file from it. I'm highly dubious about whether that file would have any resemblance to code that a human would write or could ever understand, but maybe it can work.

Here's someone who says they can do it:
https://www.hex-rays.com/products/decompiler/
 

hp1729

Joined Nov 23, 2015
2,304
I am sure those pioneers (like Steve Wozniak or Bill Gates) who develop computers like Apple II and Atari should be able to read the HEX of 6502 and convert them to assembly without the help of a computer.

I can only remember a few like A9 = LDA #$xx and 60 = RTS. And what is 8D ? STA $xxxx perhaps...

Allen
Sure you can. Manually or by a dis-assembler/ Done it often.
What kind of programmer does he have? Put it on the programmer and read it, if it can be read.
No programmer? It depends on the chip.
Vague questions can only get vague answers. What specific type of chip does he have?
 

Thread Starter

JuanjoGele

Joined Jul 15, 2016
7
Thank you all for your responses!
Im gonna be more accurate. I need to read different microprocessor structures. I attach a few photos of the microprocessors i wanna read.
I just need an universal socket to read them. I just want to read it, then i will think about how interpret its content.

Thank you so much guys!
 

Attachments

hp1729

Joined Nov 23, 2015
2,304
I think we need more info on microprocessor types. House numbers don't help. Find out what family each is and get a data sheet to tell how to read them, if it is possible. Some of them may just be programmable logic and not an actual processor at all.
 
Thank you all for your responses!
Im gonna be more accurate. I need to read different microprocessor structures. I attach a few photos of the microprocessors i wanna read.
I just need an universal socket to read them. I just want to read it, then i will think about how interpret its content.

Thank you so much guys!
if you know how you can read cod from microchip please told me
 
Top