Hi! i have use p89c669 microcontroller and am29f040b [512 kb] flash.When i using the external code memory i can't initialize the array that have more than 4 values.if i initialize more than that the program will not be executed.if i comment the array the program was executed.the code was
const char red [256] = {0x00,0x00...0x00,0x00};
please help me!
regrads, K.T.Venkatesan.
yes! here it is!
LX51 LINKER/LOCATER V4.02 03/11/2008 11:52:22 PAGE 1 LX51 LINKER/LOCATER V4.02, INVOKED BY: C:\KEIL\C51\BIN\LX51.EXE COMMON {START_MX.obj}, COMMON {main.obj}, BANK1 {code bank 1.obj}, BANK1 {.\L51_BANK.obj} TO LC >> color BANKAREA (0X008000, 0X00FFFF) CLASSES (EDATA (0X7F0000-0X7F04FF)) CPU MODE: PHILIPS 80C51MX (ROM HUGE) MEMORY MODEL: LARGE INPUT MODULES INCLUDED: START_MX.obj (?C_STARTUP) COMMENT TYPE 0: AX51 V3.01 main.obj (MAIN) COMMENT TYPE 0: CX51 V8.01 code bank 1.obj (CODE_BANK_1) COMMENT TYPE 0: CX51 V8.01 .\L51_BANK.obj (?BANK?SWITCHING) COMMENT TYPE 0: AX51 V3.01 C:\KEIL\C51\LIB\CH51L.LIB (MALLOC) COMMENT TYPE 0: CX51 V7.20f C:\KEIL\C51\LIB\CH51L.LIB (INIT_MEM) COMMENT TYPE 0: CX51 V7.20f ACTIVE MEMORY CLASSES OF MODULE: LC color (?C_STARTUP) BASE START END USED MEMORY CLASS ========================================================== 7F0000H 7F0000H 7F04FFH EDATA 800000H 800000H 80FFFFH 0001CCH CODE 7F0000H 7F0000H 7F00FFH 000001H IDATA 000000H 800000H FFFFFFH 0002FAH HCONST 000000H 800000H FFFFFFH 000453H ECODE 000000H 000000H 00FFFFH 000020H XDATA 000000H 000000H FFFFFFH 000042H HDATA 7F0000H 7F0000H 7F007FH 000008H DATA
Hmmm,
You said before that you didn't use banking??!!
yes! today only i try the banking!
'trying' is the bane of many projects. the result of a 'try' may come out right even if what you 'try' is the wrong approach.
the dead easy way to handle this is to do two things a) make an .a51 module that contain ALL xdata and make them accessible from C by extern, then you have full control of the locations b) access the biggie in an assembler routine
you will be home free
Erik
I have done the exact same as above
Hi! the array problem was solved, now i using the banking method.but the bank size was limitted to 32kb.i can't enter more than 32kb in the keil/options for target1/bank area .
my heartly thanks to all!