ARM Technical Support Knowledge Articles

RELOCATING INTERRUPT VECTOR TABLES

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

How do I relocate the interrupt vector table from address 0x0000 to a different address?

ANSWER

This is a three-step process that involves:

Assuming that you want to relocate the reset and interrupt vectors and your program to offset 0xC000, proceed as follows.

  1. Copy the startup code (usually STARTUP.A51) into your project. uVision asks if you want to do this each time you begin a project. If it has not already been added to your project, look in the KEILC51LIB folder. Open the startup code source file and locate a line that contains "CSEG AT 0". Change this line to: "CSEG AT 0C000h".
  2. Set the (INTVECTOR) compiler directive to a value of 0xC000. If you use uVision, set the interrupt offset option to 0xC000 (this is located under Options for Target — C51).
  3. Change the starting address for CODE space to 0xC000 using the CODE BL51 Linker Directive or the CLASSES LX51 Linker Directive. If you use uVision, change the code starting address under Options for Target — BL51 Linker to 0xC000.

Save the changes and rebuild your project.

You should now see a gap in your link map of 0xC000 before your first code segment.

SEE ALSO

Article last edited on: 2008-06-08 18:56:14

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