ARM Technical Support Knowledge Articles

LOCATE CODE CLASS IN DIFFERENT 64KB SEGMENT

Applies to: CX51 C Compiler

Answer


Information in this article applies to:


QUESTION

We are using a Philips 80C51MX controller and an external 512KB Flash ROM. We do not want to put any single instruction below 96KB (into the on-chip ROM of the controller). Any code including startup and initialization code must be after the 96KB limit.

Is there a way to ensure that memory is not used in this area? Currently it seems that the startup code and interrupt vectors are located in this area.

ANSWER

Yes, you can easily locate the CODE memory class to any other address region. Just specify the memory regions of your application directly as memory classes in the uVision dialog page Project — Options for Target — LX51 Locate as described below:

Disable:  Use Memory Layout from Target Dialog

User Classes:
CODE ($0x818000, 0x818000-0x81FFFF), ECODE(0x818000-0x87FFFF)

The $0x818000 in the CODE memory class moves all interrupt vectors to the memory region 0x818000. You need to redirect the interrupt vectors in the on-chip ROM of your system to this address range.

MORE INFORMATION

SEE ALSO

Article last edited on: 2006-10-23 16:45:11

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