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

execute program in RAM

Hi,
I work on ST10F168 with Keil V2.38
I have a standart program in flash and i want to load via SCIO a program in external RAM in order to execute it. What the good format can i load in RAM : h86 or lib
My problem is to decode a *.h86 in hexadecimal to write it in RAM in disassembly in order to execute it.
If you know the best format to do it, and the procedure to create it.
A lot of suggestions are happened!

Thanks
Regards

Parents
  • A .lib file probably won't do you much good, since it's not a complete, linked program. You'd have to link it yourself.

    Decoding a hex file into binary is straightforward enough. Keil has the format posted on this site. The biggest disadvantage of a hex file is that it's more than twice as big as necessary. On the other hand, it's good at skipping gaps if you have a lot of non-contiguous regions to describe. You're likely to want to compress the hex file for storage.

    I usually just use a raw binary image (see hex2bin) linked for the appropriate RAM address, and copy that from flash to RAM for execution. No decoding necessary. Compression is still possible, and will take care of any problems with large runs of zeros (etc).

Reply
  • A .lib file probably won't do you much good, since it's not a complete, linked program. You'd have to link it yourself.

    Decoding a hex file into binary is straightforward enough. Keil has the format posted on this site. The biggest disadvantage of a hex file is that it's more than twice as big as necessary. On the other hand, it's good at skipping gaps if you have a lot of non-contiguous regions to describe. You're likely to want to compress the hex file for storage.

    I usually just use a raw binary image (see hex2bin) linked for the appropriate RAM address, and copy that from flash to RAM for execution. No decoding necessary. Compression is still possible, and will take care of any problems with large runs of zeros (etc).

Children