How can I create my own library?

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create my own library?

Jump to solution
754 Views
cody1
Contributor III

I use MC56F83783, then I program some functions which include some assembly code in the C function.

I used these assembly codes (MLIB/GFLIB) to write down new functions in C. Now, I want to block these new C functions to my library.

Is there any example that can teach me how to do it?

0 Kudos
1 Solution
707 Views
cody1
Contributor III

Excuse me, I said something wrong. About the ASM code in the C function that can not work. When I create a simple app and paste the library into this project, then I test it again. I found that it's work. Maybe I done another mistake cause the project can not work. I will keep debugging it. If I find the bug, then I will ask you again.

Thanks for your help.

Cody

View solution in original post

0 Kudos
6 Replies
747 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

From your description, it appears that you want to develop your own library, this is the procedure:

1)File->New->bareboard Project, you will se the menu as following:

2)in the main.c, delete all the main function

3)add your own api function and compile.

Hope it can help you

BR

XiangJun Rong

xiangjun_rong_0-1639374225122.png

 

0 Kudos
735 Views
cody1
Contributor III

I follow your step to create a library like the attached file. I pasted the output file of the library to my application project, then I build it again. I got a fail message. The message is shown below.

Image 1.jp.jpg

0 Kudos
729 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I have checked your code, it is okay to generate library.

But for your compilation error, it is another question, I do not have your data structure, pls solve it yourself.

BR

XiangJun Rong

0 Kudos
719 Views
cody1
Contributor III
When building the library, do I need to bring MILB-related files into the project library? I tried it before. I copied some ASM code from MLIB into my library and then built them again. I copied the build output files into my application project, and then built them again, they can compile my application completely and show no errors. Then I started testing the functions in the library. I found that all C functions that do not contain any ASM code can work. Some ASM code in C functions cannot run.
Could you keep helping me, please?
 
Thanks
 
Cody
0 Kudos
712 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I can pass the compilation and link stages for your project, for your issue that you can NOT run the code, can you clarify the code which can not run so that I can have a check.

BR

XiangJun Rong

0 Kudos
708 Views
cody1
Contributor III

Excuse me, I said something wrong. About the ASM code in the C function that can not work. When I create a simple app and paste the library into this project, then I test it again. I found that it's work. Maybe I done another mistake cause the project can not work. I will keep debugging it. If I find the bug, then I will ask you again.

Thanks for your help.

Cody

0 Kudos