1
\$\begingroup\$

I've currently have an Intel Hex file that is 109kb, but with AVR-SIZE and FLIP I see that it's actually only going to take up 37,344kb of space on the chip, unless I'm making a false assumption there.

Issue:

I have an AT89LP51RD2 which has 64k of flash memory used for ISP. I can program a Hex file that windows says is 49KB, and AVR-SIZE says is 19,129kb, and everything works beautifully. When I go to flash the larger (109kb/37kb) file I originally mentioned, FLIP doesn't bark at all yet my chip doesn't get programmed properly? well it at least doesn't boot up like the other, smaller, firmware does.

I feel like I'm missing something with these HEX/bin/data sizes, and maybe someone could clarify where I'm going wrong.

Any help would be amazing! Thank you!

\$\endgroup\$
  • \$\begingroup\$ Why don't you tell us why exactly you are confused. You have a way of determining the actual size of the executable, why don't you trust it? Have you looked at the format specification for the Intel Hex file to see what goes into it? \$\endgroup\$ – Joe Hass Jan 17 '14 at 17:17
  • \$\begingroup\$ possible duplicate of BatchISP & Oversized HEX files \$\endgroup\$ – Joe Hass Jan 17 '14 at 17:19
  • \$\begingroup\$ Wow... I'm confused because the firmware works on a 128k chip that is compatible with the 64k chip I'm using now,as stated by ATMEL support. The firmware programs and runs fine, yet when I put it on the 64k chip it programs and doesn't run. The size given by AVR-SIZE states it should fit on the chip. This is not a duplicate question because the other one I asked was specific to the behavior of FLIP/batchisp. Not the actual size of the firmware fitting on the chip... love the hate though gents \$\endgroup\$ – While-E Jan 17 '14 at 17:32
  • \$\begingroup\$ You say you have a hex file(?). I suggest you compare the memory footprints( flash addresses ) of both chip. Just telling compatible doesn't means HEX of one chip would also run on other chip. \$\endgroup\$ – vvy Jan 17 '14 at 19:42
  • 2
    \$\begingroup\$ Did you re-compile your program for the 64K chip, or are you trying to use the hex file for the 128K chip on the 64K one? A quick look at the specs for the AT89LP51RD2 and the AT89C51RE2 (a likely 128K part) shows significant differences - the 128K part has 8K ram, but the 64K one only has 2K, and there are differences in the number of I/O pins. If you are using the 128K hex file in the 64K chip, the program may be trying to use non-existing memory, or other features of the big chip that don't exist in the small one. \$\endgroup\$ – Peter Bennett Jan 17 '14 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.