Placing functions of ansif.lib at a user defined sector

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Placing functions of ansif.lib at a user defined sector

Jump to solution
1,951 Views
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.
Labels (1)
Tags (1)
0 Kudos
1 Solution
736 Views
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

View solution in original post

0 Kudos
3 Replies
737 Views
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 Kudos
736 Views
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 Kudos
736 Views
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