I have a project for AT89c2051, which only include one file named main.c. the following is the content of main.c:
sfr P1 = 0x90;
void main() { P1 = 0x0a5; while(1); }
in the dialog of "Options for Target '...'"(target sheet) i setup as follows: Memory Model: Small: Variables in DATA
Code Rom Size: Small: Program 2k or less and the others item are default(blank).
My link out file is as follows(main.m51),
BL51 BANKED LINKER/LOCATER V6.15 02/11/2009 23:24:55 PAGE 1
BL51 BANKED LINKER/LOCATER V6.15, INVOKED BY: E:\KEIL\C51\BIN\BL51.EXE main.obj TO thk_display IXREF MEMORY MODEL: SMALL INPUT MODULES INCLUDED: main.obj (MAIN) E:\KEIL\C51\LIB\C51S.LIB (?C_STARTUP)
LINK MAP OF MODULE: thk_display (MAIN)
TYPE BASE LENGTH RELOCATION SEGMENT NAME -----------------------------------------------------
* * * * * * * D A T A M E M O R Y * * * * * * * REG 0000H 0008H ABSOLUTE "REG BANK 0" IDATA 0008H 0001H UNIT ?STACK
* * * * * * * C O D E M E M O R Y * * * * * * * CODE 0000H 0003H ABSOLUTE 0003H 07FDH *** GAP *** CODE 0800H 000CH UNIT ?C_C51STARTUP CODE 080CH 0005H INBLOCK ?PR?MAIN?MAIN ...
******************************************************* Program Size: data=9.0 xdata=0 code=20 LINK/LOCATE RUN COMPLETE. 0 WARNING(S), 0 ERROR(S)
My questions: 1. How can i put models(C_C51STARTUP and ?PR?MAIN?MAIN) in 0x0100--0x07ff? For AT89c2051's rom only exists in this range.
2. The model of ?C_C51STARTUP came from where? Can it is need? If is not need how can i remove it?
3. I think keil is difficult to used than other tools such as IAR. It is realy?
my email is hbzou@iipc.zju.edu.cn Thanks!
"...0x0100--0x07ff? For AT89c2051's rom only exists in this range."
I think you should check that range.
That's not what I remember from when I last used the part.