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

4kB compiling

hello to all

I am using uVision to program the atmel at89c51 microcontroller. My code is slightly smaller than 4kb, as this chip has a 4kb memory. However, uVision has only two options for the size of the compling target, 2k and 64k. When i compile my code in 64k mode, the hex file is about 12kb(!), too large for the chip. What can i do to fix it?

Parents
  • Hi,

    Are you assuming that because the source files are 4k that the hex file will be the same size? Also just because the hex file is 12k doesnt necessarily mean it wont fit into the 89c51 as it is a 'text file' so have you checked what the address range of the file is (eg by loading it into a programmer?).
    If all else fails, can you not use a different chip eg 89c55 with more internal flash?

    Mark.

Reply
  • Hi,

    Are you assuming that because the source files are 4k that the hex file will be the same size? Also just because the hex file is 12k doesnt necessarily mean it wont fit into the 89c51 as it is a 'text file' so have you checked what the address range of the file is (eg by loading it into a programmer?).
    If all else fails, can you not use a different chip eg 89c55 with more internal flash?

    Mark.

Children
No data