Using Non-Zero (Non Default) Event Vector Table Base Address

<< Click to Display Table of Contents >>

Navigation:  ETEC 'C' Compiler Information >

Using Non-Zero (Non Default) Event Vector Table Base Address

Previous pageReturn to chapter overviewNext page

Example Download

The Event Vector table is located at address zero by default, however this can be overridden to any address on a 0x800 address boundary.

Note that there is really almost never a reason to change the entry table address! The linker has an optimal packing algorithm that is impossible to improve upon (sorry Philip, you lost our bet!) Read the packing algorithm description in our ETEC manual and if you think you can do better ... with all due respect, you cannot. Call me and I'll explain why. If it turns out I am wrong, I'll buy you dinner at Le Pierre's!

In the ETEC linker, the entry table base location is controlled via the -etba=<address> option on the linker.  For example, to place the entry table at address 0x2800, add "-etba=0x2800" to the ETEC linker command line options.

When using the ETEC linker under DevTool the entry table base address can be overridden by clicking on the 'Link' node in the project file and changing the 'Entry Table Base Address' setting as shown below.

NonStandardEntryTable

With the Byte Craft compiler, to move the event vector table to address 0x800, put the following pragma at the top of any C file in the build.

#pragma entryaddr 0x800;