Hello Li Rui,
I add more comments about CodeWarrior LCF file(Link command file), you could customize 8306_SOM_ROM.lcf to help you to implement your purpose.
For MPC8360, if MSR[IP] is 1, the base address is 0xfff00000, a system reset exception is executed using the
vector at offset 0x100 relative to the base, so you need to put .reset section at 0xfff00000.
If you require printf running in RAM, you could relocate .text section executing in RAM.
MEMORY {
ram : org = 0x00000000
rom_base : org = 0xfff00000
rom : org = 0xffe00000 //Your required Flash location
}
... ...
| GROUP : { |
| | .text (TEXT) : {} //Relocate .text in RAM |
| | .data : {} |
| | .sdata : {} |
| | .sbss : {} |
| | .sdata2 : {} |
| | .sbss2 : {} |
| | .bss : {} |
| | .PPC.EMB.sdata0 : {} |
| | .PPC.EMB.sbss0 : {} |
} > ram
| GROUP : { |
| | .=0xFFF00000; |
| | .reset LOAD(0xFFF00000): {} |
| | .init LOAD(.): {} |
| | |
| } > rom_base |
For more information about lcf, please refer to the document Freescale\CodeWarrior PA V8.8\Help\PDF\Power Arch Build Tools Reference.pdf.
In addition, you also need to specify the your ROM image base address from Edit->ROM Version Settings->Linker->EPPC Linker ->Generate ROM image.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------