Connect with us

Source code from HEX code ?

Discussion in 'Microcontrollers, Programming and IoT' started by AlenZGB, May 23, 2014.

Scroll to continue with content
  1. AlenZGB


    Feb 19, 2014
    Is there any program that can extract source code from HEX code that is originaly in PIC?
  2. flippineck


    Sep 8, 2013
    I don't know specific details regarding PIC but in general, converting hex code to source (use of a decompiler) is unreliable at best; all original comments etc in the source tend to be lost. Use of a disassembler may help if you are comfortable with reading and understanding the output assembly code?

    Most accurate / useful decompiler tool is a disassembler combined with an experienced human brain..
  3. AlenZGB


    Feb 19, 2014
    So its really possible but not 100% accurate.
    Thanks for info.
  4. Steve Garratt

    Steve Garratt

    Jul 22, 2014
    If the hex is raw machine code then I would forget any ideas about trying to decompile to any high level language that might have been used. On the other hand disassembling the code will produce a list of machine commands which is easier to decipher than raw hex code. Even this operation can go horribly wrong when data structures are encountered. At least will give you a chance of figuring out how it works.

    I've had to do this many times in the past and it has never been a job that I looked forward to so good luck.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day