We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
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).
Hi Drew, i undertsand your solution but when i write a program that i want to load in RAM, i must attach start167.A66 to compile it. I would to have just functions in a hex file to call it in ram and return in flash executing program. How can i load only fonctions in disassembly code in external ram ? I try to use hex2bin but it doesn't work with .h86 hex2bin -s ***.h86 create a 0 octet .bin file ????????? I hope you will help me! Thanks Regards