The compilation principles and execution sequence of starts12x.s and project.prm, and how other files are used during compilation and execution, I need to refer to what documents (IDE: codewarrior)
Hi Xudai,
This is the basic file structure from compiler to linker. Hope this helps.
Hope this helps.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jennie,
Thank you for your reply. So on page 21 of the document 《HC12 C and assembly mix》,
LINK test.abs /* Name of the executable file generated.*/
NAMES test.o END /* Name of the object files in the application */
SECTIONS
MY_ROM= READ_ONLY 0x800 TO 0x8FF; /* READ_ONLY memory area */
MY_RAM= READ_WRITE 0xB00 TO 0xBFF; /* READ_WRITE memory area */
MY_STK= READ_WRITE 0xA00 TO 0xAFF; /* READ_WRITE memory area */
END
PLACEMENT
DEFAULT_ROM, cstSec INTO MY_ROM; /* Code should be allocated in MY_ROM */
DEFAULT_RAM INTO MY_RAM; /* Variables should be allocated in MY_RAM */
SSTACK INTO MY_STK; /* Stack will be allocated in MY_STK. */
END
INIT entry /* entry is the entry point to the application. */
VECTOR ADDRESS 0xFFFE entry
How to understand "LINK test.abs" and "INIT entry",Why do we add "INIT entry", what if we don't have this?Similarly, in the project.prm file of the Bootloader_S12X of AN4258SW, why would you add INIT _BootStart?
Have a great day,
Xudai Guo