I have been helping a customer get a better understanding of how to configure their LCF for our MC56F8037 using CodeWarrior 10.7. The reference material that we have been using include:
- 56800/E Digital Signal Controllers: MC56F8xxx/DSP5685x Targeting Manual
- AN5143 "Relocate Subroutines to PRAM for MC56F827xx DSC"
The examples provided in this documentation do not seem to clearly explain how to describe the P:RAM in the LCF. The customer needs to execute subroutines in P:RAM.
According to the 56F8037/56F8027 Data Sheet,
- P:$00_0000 to P:$00_7FFF = Program Flash
- P:$00_8000 to P:$00_8FFF = Program RAM
- X:$00_0000 to X:$00_0FFF = Data RAM
But the automatically generated linker command file produces the following:
.p_interrupts_ROM (RX) : ORIGIN = 0x0000, LENGTH = 0x0080 # reserved for interrupts
.p_flash_ROM (RX) : ORIGIN = 0x0080, LENGTH = 0x7F80
.p_flash_ROM_data (RX) : ORIGIN = 0x0000, LENGTH = 0x0FFF # internal xRAM mirror
# for pROM-to-xRAM copy
.x_internal_RAM (RW) : ORIGIN = 0x0000, LENGTH = 0x0FFF
Why is ".p_flash_ROM_data" not set to "ORIGIN = 0x8000"?
Why is there no ".p_RAM" space defined?
What would be the correct way to configure the linker command file so that the customer's subroutines can be relocated into Program RAM for the MCF8037 - as described in AN5143 for the MC56F827xx? How does the "pROM-to-pRAM copy utility" work (which is briefly mentioned in AN5143)?