Hi
you can use Codewarrior create your own lib file. To create .lib file, you need follow the steps below.(please also refer the attached mylib project)
- Create one project with wizard.(I use QG8 as target chip)
- change the file name main.c as the lib name (in sample is mylib.c)
- define the lib functions in mylib.c
- add header file mylib.h in the project, and declare the prototype of the lib functions in it.
- add “#include mylib.h” in mylib.c
- delete the following files from the project: start08.c, derivative.h, *.prm, MC9S08QG8.h, MC9S08QG8.c, ansiis.lib.c
- Press ALT+F7, in “Target Setting”, select “Libmaker for HC08” as Linker in the second droplist. In “Libmaker for HC08”, name your Library Filename.(the sample use mylib.lib), Click OK to close this window.
The following is how to use the lib file in the project:
- copy “mylib.lib” and “mylib.h” to your current project folder.
- import “mylib.lib” and “mylib.h” in your current project
- add “#include "mylib.h"”in the main.c file
- then you can use the lib functions in your current project code.
can it help you?
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------