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?
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?
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?
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 ?
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.