The linker command file in the directory:
C:\Program Files\Freescale\CodeWarrior for DSC56800E v8.3\Stationery\DSP56800x_EABI\MC56F83xx\MC56F8345\Simple_C\lcf\MC56F834x_ldm_pROM-xRAM_linker.cmd
is part of the stationary of CW 8.3. I have attached a copy to this post.
Why is the MEMORY segment .p_flash_ROM_data only 0x0FFF in length and start at address 0x0001. This seems to be the segment that holds the C-environment variables that will be copied out to RAM. The reason I say that is because in the SECTION there is a reference to __xRAM_data_start = .; This indicates to me that RAM is related.
What is odd to me is that the P-memory is 128KB, up to address 0xFFFF, in the MC56F8345. This equates to address 0x8000 in word addressing although I am not sure this comes into play on this part. This stationary is targeted at the MC56F8345. Further, the linker file has the directive, ".data_in_p_flash_ROM : AT(__pROM_data_start)" which indicates that .p_flash_ROM_data is to come AFTER the application program code (.text). Therefore, the code (.text) MUST be less than 0xFFF by a reasonable amount so that there is still room for the C-environment data image within the 0x1000 boundary (start addr 1 + 0xFFF len = 0x1000).
Why would C-enviromment image MEMORY segment be created in such a way as to restrict the application size so dramatically? All of the stationary linker command files that I looked at for the 56800e (568000E?) core were created this way? It seems odd to me.
Also, why would the address start at 0x0001?
Why not 0x0000 (which would be wierd)?
But more realistically, why not 0x20? This would allow for a really simple program but provide a meaningful start point above 0x0000. There cannot be a 1 byte\word C-program (remember the directory ...\Simple_C\lcf\). In fact, 0x20 is probably to low.
It is easy to say, well these are just demo starting points but that is not a reasonable answer. I am new to these parts and these values indicate to me that this was done this way for a reason, not just arbitrary numbers.
Any help in understanding would be GREATLY appreciated.
P.S. Should this post be in the DSC forum or here in CW legacy tools where I have posted?
Original Attachment has been moved to: MC56F834x_ldm_pROM-xRAM_linker.cmd.zip