You must make sure that the vector table is linked to the program. This isn't done, since CW can't see it used from anywhere in the code - it is just called from the hardware itself, but the compiler doesn't know that.
First, you need to make the vector table global for the project, by putting a prototype in some h file:
extern void (* near const vectors[])(void);
Second, you need to enforce the linker to include the vector table through the prm file:
ENTRIES
vectors
END
Third, you need to put the reset vector from the prm file into your own vector table. Remove the line
VECTOR 0 _Startup
from the prm file and set _Startup as the reset vector in your vector table. This is causing the overlap error.
All interrupt service routines used in the vector table must have their prototypes visible to vectors.c or you will get linker errors from that too. That is, vectors.c needs to include all h files containing prototypes to interrupts.
Message Edited by Lundin on 2009-03-23 09:39 AM