??? 11/26/04 17:41 Read: times |
#82037 - One common reason why. Responding to: ???'s previous message |
I have worked on some projects where it was necessary to supply my own code for some common library functions. Some reasons?
1) The project shared source code between several targets that used different tool chains. 2) The code was used for several products that had different microcontrollers and the library for one microcontroller did not support certain functions that were in the other library. 3) I needed a highly efficient function that needed efficiency above and beyond that offered by the tool developer library code. I can think of one project where the memmove() function was designed to support both short (byte) and wide (word) pointers. The multi mode support made the library routine too inefficient. All that said I have to think back and I can say that each time I made special routines it was always favorable to rename them to non-standard names so as to make it very clear that my routines were included into the link map and not routines from the standard library. Bear in mind that if you make a customized strrev() function and call it the standard name, there may be other standard library functions that end up wanting to tell the linker to pull in the standard strrev() library function. If you rename your function you can then study the link map and easily see that the original strrev() has been linked in or not. Michael Karas |
Topic | Author | Date |
strcpy - inrinsic? | 01/01/70 00:00 | |
C231 | 01/01/70 00:00 | |
c231 | 01/01/70 00:00 | |
Maybe not strcpy? | 01/01/70 00:00 | |
strcpy | 01/01/70 00:00 | |
Finding Keil error descriptions | 01/01/70 00:00 | |
odd | 01/01/70 00:00 | |
additional info: source code | 01/01/70 00:00 | |
additional info | 01/01/70 00:00 | |
Your code | 01/01/70 00:00 | |
Thanks | 01/01/70 00:00 | |
Inefficient! | 01/01/70 00:00 | |
Inefficient! | 01/01/70 00:00 | |
One thing to note | 01/01/70 00:00 | |
I just can't resist it | 01/01/70 00:00 | |
One common reason why.![]() | 01/01/70 00:00 |