create library function

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

create library function

1,279件の閲覧回数
guochunhua
Contributor II

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

0 件の賞賛
返信
4 返答(返信)

1,094件の閲覧回数
guochunhua
Contributor II

Hi Jennie

I have created a lib project, and wrote my lib file as follows

1.png

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

0 件の賞賛
返信

1,094件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,094件の閲覧回数
BlackNight
NXP Employee
NXP Employee

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

0 件の賞賛
返信

1,094件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Chuhua,

1. In CW 10.7, we can create library with wizard, just select "library" for project type.

pastedImage_1.png

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!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信