When I try to add a small segment of code to one file, it gives me the following error, although it works perfectly when I move that code segment to another file. It seems that the code causing the error is overflowing the allocated PAGE_E3 space, and I'm not clear on how to fix it. I tried to increase the size allocated for the PAGE_E3 while reducing the space allocated for the PAGE_E4 but it gives the same error pointing the same memory address.
This is the code segment I added to the already existing code:
UI32 tempArry[10] = {0};
for (int i = 0; i < 10; i++)
{
tempArry[i] = i;
}
I have the following questions:
1. Why does the behavior change when moving the code segment between files, as both codes appear to be in the default area?
2. How can I increase the PAGE_E3 space without interfering with other pages?
3. Is there a special approach to place a specific code segment in another PAGE_XX while keeping the remaining part of the file in a different page? If so, what would be the performance impact?
The linker parameter file for the MC9S12XDP512 (R3.prm) is attached: R3.zip for your reference.
Appreciate your help to figure out the issue as I'm pretty new...
Thanks
Madushan
PS: I tried to merge pages by doing following but still I got the same error.
SEGMENTS
/* PAGE_E3 = READ_ONLY 0xE30000 TO 0xE3BFFF;
PAGE_E4 = READ_ONLY 0xE48000 TO 0xE4BFFF; */
PAGE_E3E4 = READ_ONLY 0xE30000 TO 0xE4BFFF;
PLACEMENT
Solved! Go to Solution.
I would have resolved the issue by myself: There were two prm file involved in the build and I have only changed one file ... :). Once I changed both the files I would have successfully build it.
I would have resolved the issue by myself: There were two prm file involved in the build and I have only changed one file ... :). Once I changed both the files I would have successfully build it.
Any help @ZhangJennie ?