Keil Logo

C166: Changing the Location of the RESET Vector


Information in this knowledgebase article applies to:

  • C166 All Versions

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


Last Reviewed: Thursday, February 25, 2021


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.