Tool/software:
Dear Team,
Is there any sample code to demonstrate in-built library access like math functions(sin, cos)?
And any sample code for creating a custom library and using the custom library in another code?
Thanks and Regards,
Lenin
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Dear Team,
Is there any sample code to demonstrate in-built library access like math functions(sin, cos)?
And any sample code for creating a custom library and using the custom library in another code?
Thanks and Regards,
Lenin
Hi Lenin.
We got all software code resources provided here https://www.ti.com/product/MSP430F47167#software-development, you can check them to see if there's anything you need.
Best Regards,
Peter
This isn't particularly difficult but details will vary between tools. And what you want to accomplish. If you want to write something in assembly that can be called from C, you have to follow the ABI. Registers to save/restore and pass parameters in and such.
You would end up with a .h file with function prototypes for C programs and a binary file (either a single .o file or a collection in a library) that you tell the linker to use.
I couldn't find any library access code example like 'sin function' or creating a library from assembly language. Can you please share an example working library code?
**Attention** This is a public forum