I am using CodeWarrior 5.0, build 9061 for S12X with Build Tool Update 5.0.1, build 10038.
Our electronics supplier (who will manufacture the ECUs our code will run in) has an End Of Line test program they want to use to test the ECUs as they come off the manufacturing line. We have reserved space (in fixed flash) for this program. It has its own Interrupt Vector table, which is placed ast the end of their reserved address range, so we transfer control to it by an indirect call via the last word of their range (for example, 0x7F6FFE).
To simplify future maintenance of this application, we would like to have a single entry in the PRM file. If the EOL program's vector table were at the begining of its reserved range, this would be easy.
What I have been trying to do is figure out a way to get a section to always be placed at the end of its containing segment. The ALIGN directive does not seen to support this, and I can not find any other way to direct the linker to do this.
Since the size of the reserved address range could vary in the future, I can not rely on defining an object the size of the range in our application. Though I could (and do) put a size check in the application, as best I cal determine, this can only be a run time test.
Is there a way to direct the linker to locate a section at the end of its containing segment?