Hello Sebastian,
The following is an excerpt from the Build Tools Utilities manual, and shows the VECTOR command alternatives available.
VECTOR Command
This command is specially defined to initialize the vector table.
Use the syntax VECTOR <Number>. In this case, the linker allocates the vector depending on the target CPU. The vector number zero is usually the reset vector, but depends on the target. The Linker knows the default start location of the vector table for each target supported.
You can use the syntax VECTOR ADDRESS as well. The size of the entries in the vector table depend on the target processor.
Table 3.4 VECTOR Command Syntax and Descriptions
VECTOR ADDRESS 0xFFFE 0x1000
Indicates that the value 0x1000 must be stored at address 0xFFFE
VECTOR ADDRESS 0xFFFE FName
Indicates that the address of the function FName must be stored at address 0xFFFE.
VECTOR ADDRESS 0xFFFE FName OFFSET 2
Indicates that the address of the function FName,incremented by 2, must be stored at address 0xFFFE
The last syntax may be very useful when working with a common interrupt service routine.
.
An alternative method for handling this situation would be to compile and link the code in the normal manner, as if the bootloader were not present. This will generate a S19 file for the code. Of course, the code will need to avoid using the area occupied by the bootloader, but the vectors will be at their normal location.
Then, for the cases where this file is handled by a bootloader, the bootloader itself can determine when it encounters a vector address, and automatically relocate the vector data to an alternative address location, known to itself. This would apply whether automatic vector redirection is applicable (for other than the reset vector), or vector redirection is via code within the bootloader.
Regards,
Mac