Hello all, My target is based on micro T89C51RD2 (with 64K flash, 1K RAM and 2K EEPROM), also in my target 32K SRAM and 8K EEPROM. I need that some values of some parameters will not bee initialized to zero after reset (not power down). I reed and implemented what was written in post http://www.keil.com/support/docs/826.htm, but it still not working. In the STARTUP.A51 I changed the XDATASTART and XDATALEN as follow: XDATASTART EQU 1C20H XDATALEN EQU 10000H In my program I locate the variable in addr 0x0000: volatile rcvMSG xdata stRxBuff[NUM][LEN] _at_ 0x1000; Am I missing something? Please help, Ruven
XDATASTART EQU 1C20H XDATALEN EQU 10000H Am I missing something? My guess is that the code wraps, so that you still clear all. Set the length to 10000-1c20 Erik
Hi Erik, Thanks for your respond. I tried to change XDATALEN from 10000H to E3E0H (10000H-1C20H), now I receive assembling error: STARTUP.A51(30): error A45: UNDEFINED SYMBOL (PASS-2) When I double click this message uVision points on XDATALEN. P.S. I don't think it's relevant to this case but I'm using the RTX-Full OS. Regards, Roberto
Hi again, I solve the assembler error by writing zero before the number (0E3E0H instead of E3E0H). Now I don't receive any errors but the variable value is still initialized to zero after reset. Any more ideas? Ruven.
You should use the simulator and check what happens in the startup code. From what you say everything seems correct (so you must make some other mistake).
Thanks a lot, I'll try to do so.
Is it possible that RTXCONF.A51 and RTXSETUP.DSL influence the STARTUP.A51 settings? Is there is a recommended order to put RTXCONF.A51, RTXSETUP.DSL, STARTUP.A51 and INIT.A51 in the project? Thanks a lot, R.H