Keil Logo

CX51: LOCATE CODE CLASS IN DIFFERENT 64KB SEGMENT


Information in this article applies to:

  • C51 Version 7

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 µVision 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

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Monday, October 23, 2006


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.