ARM Technical Support Knowledge Articles

GLOBAL VARIABLE PROBLEM WITH DALLAS 390 CONTIGUOUS MODE

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

I'm using Dallas 390 in contiguous mode and my global variables do not seem to be initialized. Is this a problem?

CAUSE

Yes. The DS80C390 requires a modified INIT.A51 and the START390.A51

RESOLUTION

You must download and use C51 compiler V6.23 or later, and do the following modifications on the INIT.A51 file:

;------------------------------------------------------------------------------
;
;  Far Memory Support
;
;  If the C application contains variables in the far memory space that are
;  initialized, you need to set the following define to 1.
;
; --- Set XBANK = 1 when far variables should be initialized
$SET (XBANK = 1)
;
;------------------------------------------------------------------------------
;
;  Dallas 390/400/5240 CPU Contiguous Mode
;
;  If you are using the Dallas Contiguous Mode, you need to set the following
;  define to 1.
;
; --- Set DS390 = 1 when CPU runs in Dallas Contiguous Mode
$SET (DS390 = 1)
;
;------------------------------------------------------------------------------

Set XBANK and DS390, as showed above, save the new file and add it to your project as the last file on your project.

After downloading the 6.23 version, you must download and use the START390.A51 file ( it may be requested on the attached files section below ) because this Startup file has the correct load sequence of MCON and ACON registers ( Memory Configuration Register and Address Configuration Register ). MCON must be configured before ACON.

The START390.A51 that originally downloads with V6.23 has the wrong loading sequence, so it will not work on your hardware. That is why you should use the modified version.

SEE ALSO

ATTACHED FILES

Request the files attached to this knowledgebase article.

Article last edited on: 2005-05-25 08:06:29

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential