When I downloaded the program to the board, it didn't work. I reviewed the memory mapping tables.
I found the startup address was 0x800, but the memory mapping is 0x000~0x7ff.
So I changed the linker control string from:
PRINT(".\asd.m51") RAMSIZE(256)
I changed RAMSIZE(256) to RAMSIZE(128) and add memory limiting string 'CODE(0X0000-0X07FF)':
PRINT(".\asd.m51") RAMSIZE(128) CODE(0X0000-0X07FF)
But it still maps to address over 0x800 and returns this error:
*** ERROR L107: ADDRESS SPACE OVERFLOW
I also change other settings:

What should I do?
Apparently you are using the evaluation version of the development kit.
The relevant page "Limitations" lists (among others) this restriction:
C51 Evaluation Tools
- Programs start at offset 0x0800. Programs generated with the evaluation software may not be programmed into single-chip devices with less than 2 Kbytes of on-chip ROM.
There is no way around it. So you need to buy a license and install it, if you urgently want to use Keil C51.
Or you use another compiler (and editor/IDE). Unfortunately (for you) recommendations are off-topic here, but if you use your web fu with "open source c compiler for 8051", I'm sure you will find some suitable compiler system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With