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 convert hex file to C source code?

Status
Not open for further replies.

abes137

Newbie level 4
Joined
Apr 20, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,327
Hi all,
I had programmed my ATMega32 microcontroller chip via AVR programming but later my hard disk crashed for unknown reasons. I could not retieve the data back on the hard disk. Interestingly my laptop hard disk (where I had back-up) also crashed due to voltage fluctuations. I can get the hex file back from the microcontroller chip but want to get the source code back in order to modify the program.

Please help.
 

Re: .hex to .c converter

I also had searched for .hex to .c converter...but to best of my knowledge, it is not available. :( :(
 

Re: .hex to .c converter

You can use a disassembler to generate more or less readable code. Some manual editing will be usually necessary to make it a valid assembly source. Reconstruction of the high level C code will be completely manual work. There's no unique relation of assembly to C code.
 
Re: .hex to .c converter

if you get any software for the same .i am sure it not work if it work it may contain error.
 

Re: .hex to .c converter

This question keeps popping up at edaboard, very often for different mcus.

going back from a .hex file to .asm file or list is not that difficult, but going from .hex to .c, is a different story altogether. For all practical purposes it is not viable, it may be possible but I haven't seen any such thing.
 

I think It is possible to convert to high-level language, if you have .asm and list files. but it is little hard but can with manual cording
 

Actually it's possible to retrieve the Hard disk information. Usually the problem is:
1. in the electronic -you can try to find the same HDD electronic (buy same HDD from eBay for example) and exchange it.
2. The problem is bad or weak sector or there is wrong record - you can use some software to recover data - Disk Recovery Software and Hard Drive Recovery tool for Windows or you can use SpinRite software, etc.
3. Mechanical - even if the problem is mechanical there are many companies who recover the info directly from the disk surface.

So if it's very valuable firmware it will be worth to recover the HDD info. The HDD data recovery is almost guaranteed but could take some amount of money. In all cases this is doable where converting HEX to C is in the area of the dreams.

Personally I recovered several times practically lost information on HDD with SpinRite, the companies who read the data directly from the disk surface claim that they can even recover the data which is overwritten because of the hystersis and mechanical unperfections of the positioning system.
 

Re: .hex to .c converter

Thanks. :) Can you please suggest where to get a disassembler?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top