Fixing EntryPoint

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Fixing EntryPoint

1,578件の閲覧回数
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 返信

599件の閲覧回数
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 件の賞賛
返信