Hi.
Excuse me, My MCU is 56f84789, and my version is codewarrior 10.7, how do I create library functions in codewarrior 10.7? and how can I call my library functions ?can you tell me in detail? thank you very much.
Best regards.
Chuhua guo
Hi Jennie
I have created a lib project, and wrote my lib file as follows
but there has no header file, I can not declare it in header file(.h), how can I do ? can you give me a video which show me how to create library functions and how to call it? thank you very much.
Best regards.
Chunhua Guo
Hi Chunhua,
Attached is the video and demo code I made.
Hope this helps.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Not a video, but something to read: A Library with ARM gcc and Eclipse | MCU on Eclipse
Same principle applies for DSC too.
I hope this helps,
Erich
Hi Chuhua,
1. In CW 10.7, we can create library with wizard, just select "library" for project type.
2. after creating the lib project, write your functions in source code and also declare it in header file (.h)
3. copy the generated .lib and .h to user project folder.
4. add the lib path to user project "properties", "settings", "DSC Linker", "input", "Additional Libraries"
Please follow above steps and see how it works.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------