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

how to add prefix 0x to hex?

Hi! i am using P89c669 as master and P89v51 as Slave.The Slave program it self by using IAP method.the hex file for the program is received form master.so the master have the hex file.now the problem is to convert the normal hex to prefix added hex value [0x].because keil is not support the hex values without 0x prefix.Is there any solution for this.
Thanks & Regards,
K.T.Venkatesh.

Parents
  • Hi! The programing to the slave is not done by a technical person.the application is likely to download the SW by the UI menu access.For this purpose only i want the hex file in program.If i download the hex file with the code to the flash how can i retrive the datas from the flash memory.I thing it's some more difficult than the array method.
    Thanks & regards,
    K.T.Venkatesh.

Reply
  • Hi! The programing to the slave is not done by a technical person.the application is likely to download the SW by the UI menu access.For this purpose only i want the hex file in program.If i download the hex file with the code to the flash how can i retrive the datas from the flash memory.I thing it's some more difficult than the array method.
    Thanks & regards,
    K.T.Venkatesh.

Children
  • How do you program the master chip? Using Intel-hex or a binary download?

    If a binary download, you can bad it with 0xff up to a fixed size, and then concatenate with the binary data for a slave.

    If using Intel-hex, you can dump the slave data in Intel-hex format for location at a specific location in the flash, for example at offset 256kB into the flash memory.

    It doesn't matter which method you select. Your master program can assume that the slave data starts at a specific offset in the flash (such as 256kB into the flash). Either add a little header with info (CRC and size) of the slave program, or just assume that all data until end of flash (or until only 0xff remains) are part of the slave application.

  • Hi! i use the intel-hex only for program the master.Thanks a lot for both of you.
    Regards,
    K.T.Venkatesh.