I need to exclude an array from being initialized during boot. Therefore I added a new memory section "m_data_reset" in processor expert:
And mapped this array into my new section:
static uint8_t __attribute__ ((section (".m_data_reset"))) array[SIZE];
As expected the new section isn't initialized by "zero_fill_bss()", but it gets zeroed by "__copy_rom_sections_to_ram()". I can manually suppress this by deleting the corresponding lines from ".romp" in the linker file:
.romp : AT(_romp_at)
__S_romp = _romp_at;
LONG(___m_data_reset_ROMStart); /* These lines */
LONG(___m_data_reset_RAMStart); /* I have to */
LONG(___m_data_reset_ROMSize); /* delete */
} > m_data
But as the linker file gets overwritten every time processor expert is run, I'm looking for a solution to tell processor expert to exclude this section from initialization. (Why is it included anyway in ".romp", the array isn't initialized? And it's not an array issue, a normal - non-array - variable is zeroed by "__copy_rom_sections_to_ram()" as well.)
The only possible solution I've found up to know is to prevent processor expert to generate the linker file at all and to maintain it manually.
I'm using CodeWarrior 10.6 for SKEAZN64 with the GNU tool chain.