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

2k hex file for 100 bytes program?

As result it takes a lot of time to download. Are there any ways to minimise download code size?

Parents
  • I'm not sure where the problem is.

    Are you saying that your total program size is 100 bytes but the hex file is 2k? Hex files are usually much larger then the number of bytes in your program. The file is made up of a series of records. Each records contains a record type identifier, an address, one or more bytes of data and a checksum. Furthermore they are usually ASCII which doubles the size requirements (binary hex value 0x50 is stored as 0x35, 0x30). If you are transfering data to your target in ASCII format you could speed it up by transfering it in binary format. You would just have to define a protocol that both ends would have to follow.

    Or are you saying that your program is 100 bytes but things like startup code and C libraries are increasing the size of the program to 2k? If so you could write your program in assembler.

    Hope this helps. If not, please be more specific.

    -Walt

Reply
  • I'm not sure where the problem is.

    Are you saying that your total program size is 100 bytes but the hex file is 2k? Hex files are usually much larger then the number of bytes in your program. The file is made up of a series of records. Each records contains a record type identifier, an address, one or more bytes of data and a checksum. Furthermore they are usually ASCII which doubles the size requirements (binary hex value 0x50 is stored as 0x35, 0x30). If you are transfering data to your target in ASCII format you could speed it up by transfering it in binary format. You would just have to define a protocol that both ends would have to follow.

    Or are you saying that your program is 100 bytes but things like startup code and C libraries are increasing the size of the program to 2k? If so you could write your program in assembler.

    Hope this helps. If not, please be more specific.

    -Walt

Children
No data