Just out of curiosity, is NON_BANKED distributed into multiple segments by default, or did you change this setup? In V4.7, NON_BANKED is placed into ROM_C000 only.
Well either way, when distributing the content of a single section with __near functions (as the ones in rtshc12.c) into multiple placements, then linking may fail with the fixup overflow message you got if the code was not built with -OnB=b, as described in the V4.7 prm.
So you can
- Place the content of some SHORT sections into ROM_4000, the content of others into ROM_C000.
The content of non code sections containing strings or constants can be distributed into multiple placements.
I do recommend this setup. In the prm it should look like the untested snippet below:
Code:
.....
_PRESTART, STARTUP, NON_BANKED INTO ROM_4000;
ROM_VAR, STRINGS, COPY INTO ROM_C000, ROM_4000;
..... - Or rebuild the code (and for rtshc12.c, the ANSI library) with -OnB=b.
Very probably just placing the content of NON_BANKED into either ROM_4000 or ROM_C000 (but not both...) in the prm file does resolve the issue for you.
Daniel