dsPIC Hex file to C file conversion

Post
pareshic4u
Starting Member
2007/04/30 22:46:44
I have HEX file for dsPIC30f3011. I want to change it in C format (as per c30 compiler). Can anybody help me for this.
Thanks 
pic30
Super Member
RE: dsPIC Hex file to C file conversion 2007/05/01 00:57:16
Open your HEX file in MPLAB, look at the disassembly window, group the instruction sequences to the appropriate C statements, recreate the variables', functions' and strucutures' names and write down the results in a text editor. Then save your file with a .C extension and you're done. It's just as simple as converting time to money gringringrin
tony4l
Super Member
RE: dsPIC Hex file to C file conversion 2007/05/01 03:10:56
pic30: [8D]

pareshic4u, converting your hex file back to half-way legible assembler is as good as it will get. The problem is that, through compilation, essential information (e.g. variable and function names) have been lost. A program that reverts hex code back to assembly code is called disassembler.

I know that there are disassemblers for smaller Microchip controllers (16c/f, 17c & 18f) but I've not seen anything like that for dsPics.

May I ask for your motivation?

Cheers,
-Tony

albertm
Starting Member
RE: dsPIC Hex file to C file conversion 2007/05/01 09:03:13
I'm assuming you accidentally deleted all you projects files[8|]. Source Safe is your friend. And when you release a commercial product....good idea to enable code protection to control prying eyes.