how can I write a library function in codewarrior v10.4

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

how can I write a library function in codewarrior v10.4

770件の閲覧回数
guochunhua
Contributor II

Hi,excuse me,I have some problems need your help. they are as follows.

  1.how can I write a library function in codewarrior v10.4, can you give me an example program?

  2.how can I install the library function in my specified path,can you give me an example ?

  3.if I install the library function in my specified path, how can I call the function. can you give me an example?

ラベル(1)
タグ(1)
0 件の賞賛
5 返答(返信)

556件の閲覧回数
BlackNight
NXP Employee
NXP Employee
0 件の賞賛

556件の閲覧回数
guochunhua
Contributor II

Thank you for your help very much. I am sorry I want to know how to make and how to use a library function with MC56f84789 in codewarrior 10.4 ?

0 件の賞賛

556件の閲覧回数
TICS_Fiona
NXP Employee
NXP Employee

Hello  guo

To generate the library file, please open Project Properties, and select the linker output type as 'Library', and rename the artifact extension as 'lib'. You also need to remove the link command file from the building.

Output Type.png

artifact extension.JPG

Best Regards

Fiona Kuang

Technical Information & Commercial Support

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛

556件の閲覧回数
guochunhua
Contributor II

Thank you for your help very much. if I put my library function in another path, which is not my application program's path, how can I call the library function in my application program? can you give me an example? if you can give me an example with mc56f84789 in codewarrior 10.4, it's the best.

0 件の賞賛

556件の閲覧回数
TICS_Fiona
NXP Employee
NXP Employee

Hello guo

In your application project, please add your library in the Linker Input of the Project Properties, and in the C file which calls the library function, add the external function declaration for it.   Hope it helps!

lib.png

Best Regards

Fiona Kuang

Technical Information & Commercial Support

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛