Fixing EntryPoint

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Fixing EntryPoint

1,579 次查看
morag
Contributor I
Hi
Does anybody know how to fix the _EntryPoint function generated by Codewarrior to a specific address. I have written a bootloader for the MC9S12NE64 and need to be able to fix the application startup point. At the moment I am using a #pragma and placing it in a block of code but am not convinced that every compilation will result in _EntryPoint being at the same address. Any suggestions??
Thanks
Morag
0 项奖励
回复
1 回复

600 次查看
CrasyCat
Specialist III
Hello
I would recommend placing the function in a specific user defined section and placing the section at first in the section list within a PLACEMENT line.
 
There is one exception to that (as far as I can remember).
If you have a command INIT _EntryPoint in your .PRM file, then _ENTRY will be allocated in section .init (Which is predefined section for entry point) and then .init must be the first section in the section list.
 
Also make sure _EntryPoint is the only function in the user defined section.
 
CrasyCat
0 项奖励
回复