convert hex file back to code

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi
Is it possible to convert a .hex file back to the code?
I had written a program in basic and loaded it up on the micro.
But my HDD crashed, and i lost the program. The program is still loaded on the micro, so i read back the flash memory and it was stored as a .hex file. Now i need to figure out if theres a way i can turn this back to the code?

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

Try ReAVR
https://www.avrfreaks.net/index.php?module=FreaksTools&func=viewItem&item_id=272

Surely you must some printout of the code that you wrote or some other backup.

Ken

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's an amazing how common an occurance this is!

'Ain't gonna happen. When code written in a high-level language is compiled down to a HEX, all the human-readable aspect are stripped. The best you can possibly get is the pure assembler representation of the compiled code, not the actual code itself.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

amol,

Personally I like DISAVR for this - a thread search here will turn it up.

In future, if I were you I'd use the DVD drive, a USB memory stick a USB/Firewire external HDD or a netowrk to regularly back up any data that is "precious" - a small amount of work will save a LOT of heartache in the future!

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

I adopt the same policies what Cliff mentioned above.

There is another way which might be unorthodox is to email your own code to yourself or to your own service provider.

I do this all the time.
I email home stuff to work address.
At work email to my own private one like ****@yahoo.com.
That way there are copies floating around when you get into trouble?
Hint! You set a tag so it does not remove itself from the server area.

This has never left me out in the cold & it works well.

Also makes many printouts as hard copies at a regulator interval.
Write the date, time & filename on the printouts.

This I recommended to our members of the family who are doing IT & University degrees.
They also send me email containing their works of essays & thesis’s.
I never delete theirs at all but all will end up on a couple of backup CDs.
Just a precaution if you get caught out.

Just a few cents worth of paper will give you a peace of mind?

So, I don’t mind if anybody else would like to adopt this technique.

Ken

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Very NICE ! I've love it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You should also check out the resent thread regarding a similiar experience.

https://www.avrfreaks.net/index.p...

In particular, please check out my last post in this thread. Oh, thank the computer gods that I practiced what I preached!

In the end, you can use all of the new fangled do-hickey type programs you want but, nothing substitutes for a deciplined back-up regime.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston