 | Discussion Forum |  |
|
|
Avoiding startup initialization of variablesNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Ruven H Posted 7-Jul-2003 16:11 GMT Toolset C51 |  Avoiding startup initialization of variables Ruven H 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 | | Read-Only Author erik malund Posted 7-Jul-2003 16:36 GMT Toolset C51 |  RE: Avoiding startup initialization of variables erik malund 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 | | Read-Only Author Ruven H Posted 8-Jul-2003 06:55 GMT Toolset C51 |  RE: Avoiding startup initialization of variables Ruven H 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 | | Read-Only Author Ruven H Posted 8-Jul-2003 08:10 GMT Toolset C51 |  RE: Avoiding startup initialization of variables Ruven H 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. | | Read-Only Author Keil Support Intl. Posted 8-Jul-2003 09:24 GMT Toolset C51 |  RE: Avoiding startup initialization of variables Keil Support Intl. 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). | | Read-Only Author Ruven H Posted 10-Jul-2003 09:16 GMT Toolset C51 |  RE: Avoiding startup initialization of variables Ruven H Thanks a lot, I'll try to do so. | | Read-Only Author Ruven H Posted 10-Jul-2003 10:07 GMT Toolset C51 |  RE: Avoiding startup initialization of variables Ruven H 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 | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|