Crossware

Table of Contents        Previous topic       Next topic       

C/C++ COMPILER->Compiler command line options->Generate Relocatable Vectors (/Vr)

By default, when automatically coding an interrupt vector, the compiler will generate this code in an absolute code section.

The /Vr command line option tells the compiler to generate the code in a relocatable code section instead.

It is up to the developer to position this relocatable code section, typically using an entry in the linker script.  The relocatable section names used are as follows:

InterruptRelocatable section name
Undefined interrupt__undefined_vector
Software interrupt__software_vector
Prefetch abort interrupt__prefetch_abort_vector
Data abort interrupt__data_abort_vector
IRQ interrupt__irq_vector
FIQ interrupt__fiq_vector
When this command line option is used, an LDR R15,<interrupt function address> instruction is generated.  This allows the storage and run-time addresses of the interrupt vector code to be further apart than the would be allowed by a branch instruction.  

The interrupt function address value must be stored separately in memory and the compiler puts this into a further relocatable code section called __vector_memory_pool.  The developer must position this relocatable section.  Typically it's run-time location will be close to that of the interrupt vector sections.