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.
As result it takes a lot of time to download. Are there any ways to minimise download code size?
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