Placing functions of ansif.lib at a user defined sector

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

Placing functions of ansif.lib at a user defined sector

跳至解决方案
2,885 次查看
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,670 次查看
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,671 次查看
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,670 次查看
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,670 次查看
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