ARM Technical Support Knowledge Articles

CHANGING THE LOCATION OF THE RESET VECTOR

Applies to: C166 C Compiler

Answer

QUESTION

When I finish linking and load the code to the emulator or simulator, the first instruction is a jmp at address zero. How do I change the location of the jmp instruction?

ANSWER

The 166 toolset has an L166 directive 'VECTAB', which allows you to specify the interrupt vector table. You can simply add the VECTAB directive to the Linker invocation line, as in the following example:

L166 xxx.obj directives VECTAB (2000H)

If you are running uVision/166 you can reach this control with Options - L166 Linker - Location - Interrupt Vector Table Address.

The directive does not only modify the start address of the RESET vector. It is an offset which is added to all Interrupt Vectors. This is typical of what you may need when debugging with a monitor or other environment when interrupt vectors must be relocated.

SEE ALSO

Article last edited on: 2005-07-06 17:16:41

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