How to incorporate thirdy-party libraries into my OS?
Posted: Fri Mar 23, 2018 6:54 am
I'm writing an OS for microcontrollers and I'd like to run it on some architectures, so I want to make it very easy to port. Also, I want to write just the kernel of the OS. I intend to use open source software to make every other component of the system. I'll use a free implementation of the C Standard Library and I intend to use the free libraries of peripheral drivers provided by the microcontrollers vendors instead of writing my own drivers.
The big problem here is that the C compiler for each microcontroller usually comes with peripherals drivers and a minimal implementation of the C Standard Library. So I'll need to add a more complete implementation of the C Standard Library in my project. But then I'll have conflicts between the two implementations.
I could just turn off the C Library that comes with the compiler, keeping just the peripheral drivers part. But I don't know how to do that. Is it possible?
What I think I can do is to download everything (C Standard Library, Microcontroller's Library), add them to my project's folder and edit them to fit my needs. That is an alternative but I don't know if it is the best one.
As this is a forum with lots of experienced OS programmers I think someone could give me some directions.
Should I just download everything and include it in my project's folder or should I keep compiler's library code in its own directory and try to make this two pieces of code work together somehow?
The big problem here is that the C compiler for each microcontroller usually comes with peripherals drivers and a minimal implementation of the C Standard Library. So I'll need to add a more complete implementation of the C Standard Library in my project. But then I'll have conflicts between the two implementations.
I could just turn off the C Library that comes with the compiler, keeping just the peripheral drivers part. But I don't know how to do that. Is it possible?
What I think I can do is to download everything (C Standard Library, Microcontroller's Library), add them to my project's folder and edit them to fit my needs. That is an alternative but I don't know if it is the best one.
As this is a forum with lots of experienced OS programmers I think someone could give me some directions.
Should I just download everything and include it in my project's folder or should I keep compiler's library code in its own directory and try to make this two pieces of code work together somehow?