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.
Hello I'm using the 8K version of the C51 tools. The code produced is less than 8192bytes. The linker thinks how ever that there is more than 8192 bytes and so doesn't complete. The last few lines of the code placer shows that there is plenty of code space left: CODE 1F81H 0003H INBLOCK ?PR?TD_SUSPEND?MAIN CODE 1F84H 0003H INBLOCK ?PR?POWERON_FPGA?FPGA ****************************************************************************** * RESTRICTED VERSION WITH 2000H BYTE CODE SIZE LIMIT; USED: 2017H BYTE (100%) * ****************************************************************************** Program Size: data=128.2 xdata=4530 code=8068 LINK/LOCATE RUN COMPLETE. 0 WARNING(S), 0 ERROR(S) Is this a bug ?
my best guess is that when a mosule is to be linked that will bring the code over the limit, it is ignored. Thus you get a code size less than 8k even as you actual program is bigger. Time to buy Erik
I have in the past been able to make my code a little smaller so that it fits. I have then checked the code in the debugger and found no extra code has been added. So I don't think my code is any bigger than the 8068 bytes
comment out routine x and the calls to it, note from the M51 the length of routine y and the total length of the program "A" (which now should fit). Then restore routine x and comment out routine y and the calls to it note from the M51 the length of routine x and the total length of the program "B" (which now should fit) so "A" + the length of x is the real length of your project. also "B" + the length of y is the real length of your project. Sometimes you have to jump through hoops to find out something, enjoy. Erik
But when I check with the debugger there isn't any extra code added. so A + length of x = B + length of Y = 8068 Dominic
how do you get it into the debugger if it does not link? Erik
by taking out a function of a known length as described above.