RELOCATING INTERRUPT VECTOR TABLES
Applies to: C51 C Compiler
Information in this article applies to:
How do I relocate the interrupt vector table from address 0x0000
to a different address?
This is a three-step process that involves:
Setting the starting address of your program (in the startup
Setting the offset for interrupt vectors (using a compiler
and Setting the address range for program code (using a linker
Assuming that you want to relocate the reset and interrupt vectors
and your program to offset 0xC000, proceed as follows.
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".
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).
Change the starting address for CODE space to 0xC000 using the
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
Save the changes and rebuild your project.
You should now see a gap in your link map of 0xC000 before your
first code segment.
Article last edited on: 2008-06-08 18:56:14
Rate this article
Disagree? Move your mouse over the bar and click