I need to port some older 68K programs to Coldfire. The original programs were developed with a different toolset so this migration is complicated by tool differences as well as target differences.
Our custom boards use a boot loader that expects the program to start from address 0x4004. My problem is that the linker always places vector table "_vect" at the start of the code segment. I redefined the code segment in the linker file to start earlier so that the _startup routine would begin at 0x4004. Unfortunately this approach causes the vectortable to overwrite an area used by the boot loader. Also, location 0x4000 is used to store a checksum value that is verified by the boot loader so moving the code segment such that vector 1 resides at 0x4004 doesn't work either. Changing the boot loader is not an option my management will consider. Is there a way to tell the linker to place the vector table "_vect" array in another area other than the start of the code segment? I experimented with the "#pragma define_section vectortable ".vectortable" far absolute R" directive with no success.