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.
I have created two pieces of code for the AT89C51CC01, the first is the bootloader, which is located in the flash memory space [0x7000 - 0x7FFF]. This compiles and runs fine, with the reset vector pointing to the startup code which is located at 0x7000. The second piece of code is the application, which is downloaded in the flash memory space [0x0000 - 0x6FFF]. What I have done is to re-direct the reset vector to jump to 0x7000 in the startup file to call the bootloader first, which will on finding a valid application calls the application startup code fixed at 0x0100. The problem I have, is if I change the startup.a51 code to CSEG AT 0 ?C_STARTUP: LJMP 0x7000 then I get an address space overflow, the compiler says it requires 208.4 bytes of DATA space. Yet, if I use the default startup.a51 file I dont get any errors, and only 83.2 bytes of DATA space is required? Has anyone seen this problem before and got any ideas how to solve it?
Just a guess but by adding the direct jump to 7000h you are no longer invoking the startup code which calls the main C function. And, overlay analysis is no longer being performed. Jon