This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

.hex to .elf conversion?

Hi,

I am using SDCC compiler to run my C code on CC2430 (which contains 8051 controller). Problem is that SDCC generates .hex file! But I need a .elf file as output, because I want to use an elf_Loader to dynamically relocate the code! I have read a lot about SDCC compiler and there is no way that I can generate .elf from it!

So is there any way to convert .hex to .elf???
If not, then how can I interpret and read the .hex file after it has been loaded on the target board?

Thanks in advance,
--
Mudassir

Parents
  • "I am using SDCC compiler..."

    Don't you think it's a bit cheeky to be using Keil's forum, then?!

    "...to run my C code"

    No, a compiler does not run code - it merely translates it from source to object.

    "dynamically relocate the code!"

    Doesn't sound like a great idea for 8051 code - why do you want to do it?

    "So is there any way to convert .hex to .elf???"

    You'd probably have to convert the hex to binary, and then from binary to elf...

Reply
  • "I am using SDCC compiler..."

    Don't you think it's a bit cheeky to be using Keil's forum, then?!

    "...to run my C code"

    No, a compiler does not run code - it merely translates it from source to object.

    "dynamically relocate the code!"

    Doesn't sound like a great idea for 8051 code - why do you want to do it?

    "So is there any way to convert .hex to .elf???"

    You'd probably have to convert the hex to binary, and then from binary to elf...

Children