Placing functions of ansif.lib at a user defined sector

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

Placing functions of ansif.lib at a user defined sector

ソリューションへジャンプ
2,279件の閲覧回数
elil
Contributor I
Hi,
 
1) For my project(based on HC08) I have to place some code at a specified flash sector. The problem is that one of the functions, who has to be placed there, reffers to other functions, generated by the compiler (ansif.lib) and placed at unwanted by me flash area. I have to prevent it and to enforce the linker to put them at a specified by me sector. How can I do it ?
 
2) I don't have a checksum of the s19 file either from the CodeWarrior or from P&E CyclonePro programmer. What can I do with that?
 
Thank you in advance,
 
Eli.
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,064件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
1) Is this about the runtime support (rtshc08.c)?
depending on your code, it might or might not be possible to avoid to generate runtime support calls.
Otherwise, one way is to copy the library file to your source directory, add it to your project and adapt it to your needs. Make sure this file is in the link tab before the ansi library. Not sure without more info if this is what you are looking for.

2) Can you try to more closely explain what the problem is?

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,065件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
1) Is this about the runtime support (rtshc08.c)?
depending on your code, it might or might not be possible to avoid to generate runtime support calls.
Otherwise, one way is to copy the library file to your source directory, add it to your project and adapt it to your needs. Make sure this file is in the link tab before the ansi library. Not sure without more info if this is what you are looking for.

2) Can you try to more closely explain what the problem is?

Daniel
0 件の賞賛
返信
1,064件の閲覧回数
elil
Contributor I
Dear Sir,
 
Excuse me for the delay.
1) You're right, the problem is rtshc08.c
 
2) I need the routines, that  belonging to rtshc08.c,for example _ICMP,_COPY, etc, and linked with my project to be placed at the defined by me flash segment. My problem is that the segment, where these routines are placed now, may be erased in some condition.
Is there any linker directive which can put these routines at a wanted segment ?
 
Thanks,
 
Eli.
0 件の賞賛
返信
1,064件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
I'm not aware how the linker would support this.
The clean way is to place those functions into their own section, say to copy the rtshc08.c file to your project, add it to your project, change the link order it comes first and then adapt the content of your local rtshc08.c. Less clean ways would take advatage to things like the link order to get them placed especially.

Hmm. I wonder if you should not completely place DEFAULT_ROM into the "safe" area. Or build two separate applications with a clear and defined interface. One which would stay in the protected memory area (let's call it the loader...) and the rest. Having a part of your application code erased while some other part remains seems a bit dangerous just as concept.

Daniel