I'll add this just to add clarity to our discussion.
The PRM configuration I had hoped to use was (partial):
SEGMENTS /* here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. All addresses are 'logical' */
/* Banked FLASH */
ROM_8000 = READ_ONLY DATA_NEAR IBCC_NEAR 0x8000 TO 0xFEFF;
PLACEMENT /* here all predefined and user segments are placed into the SEGMENTS defined above. */
ROM_VAR, /* constant variables */
STRINGS, /* string literals */
/* in case you want to use ROM_4000 here as well, make sure
that all files (incl. library files) are compiled with the
option: -OnB=b */
NON_BANKED, /* runtime routines which must not be banked */
DEFAULT_ROM,
VIRTUAL_TABLE_SEGMENT,
_PRESTART, /* Used in HIWARE format: jump to _Startup at the code start */
STARTUP, /* startup data structures */
COPY /* copy down information: how to initialize variables */
INTO ROM_8000;
where all the ROM was on contiguous area from 8000 to FEFF. Since the PPAGE register defaults to 0xFE, there will be Flash located at 8000 to BFFF. This flash *could* be paged, but if I used the small memory model and didn't change the PPAGE register, it could be treated as non-paged. I used the -MapRAM option to have RAM at 4000-8000. Compiling and linking with this PRM file and the small memory model worked fine. However, when using the HIWAVE debugger, the Elf file (.abs) had program headers defined for ROM (flash) areas from 0x8000 to 0xFEFF exactly as requested. The S19 file on the other hand had data defined for 16 bit addresses from C0000 to FEFF and data defined using 24 bit addresses from FE8000 to FEBFFF. If I loaded the Elf file, the flash from 8000-BFFF was erased to FF and was not programmed with my program's code. However, the area from C000-FEFF was erased and programmed with that portion of my program's code. Loading the S19 file properly loaded the entire 8000-FEFF area. To debug, it was possible to load the S19 file and then load the symbols from the Elf file using FIle, Load Application, Load Symbols. Cumbersome but it worked.
Following Edward's advice, I changed my PRM file back to:
SEGMENTS /* here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. All addresses are 'logical' */
/* Banked FLASH */
ROM_8000 = READ_ONLY DATA_NEAR IBCC_NEAR 0xFE8000 TO 0xFEBFFF;
ROM_C000 = READ_ONLY DATA_NEAR IBCC_NEAR 0xC000 TO 0xFEFF;
PLACEMENT /* here all predefined and user segments are placed into the SEGMENTS defined above. */
ROM_VAR, /* constant variables */
STRINGS, /* string literals */
/* in case you want to use ROM_4000 here as well, make sure
that all files (incl. library files) are compiled with the
option: -OnB=b */
NON_BANKED, /* runtime routines which must not be banked */
_PRESTART, /* Used in HIWARE format: jump to _Startup at the code start */
STARTUP, /* startup data structures */
COPY, /* copy down information: how to initialize variables */
INTO ROM_C000;
DEFAULT_ROM,
VIRTUAL_TABLE_SEGMENT,
INTO ROM_8000,ROM_C000;
And added the -OnB-b option to the compiler options. The option is necessary to prevent a linker fix up error for function calls between the code in the two different segments. I originally didn't want to do this due to what I thought would be size and speed considerations. However, in my code the difference in size was about 4 bytes (out of 25kB), and there was no speed difference because the 3 byte BSR instruction takes 4 cycles, the same number of cycles as the 4 byte JSR instruction that replaced it when this option was used.
Using this set up, I have 32kB of Flash, 16kB of RAM (-MapRam option), with the small memory model for speed and no issues loading and debugging with the Elf file.
Thanks for all your help,
Bob