Package Zephyr into a single library #62688
Replies: 2 comments
-
By the way, I should clarify that foo.lib is a fairly extensive library, and users of this lib would rarely need to do anything other than make various calls to the foo API and add some glue code. They are not expected include other libraries etc. or make system calls etc. This is very specific domain, and most users of this lib would be hobbyists rather than hardcode software developers. |
Beta Was this translation helpful? Give feedback.
-
Consider adding the library as a binary blob and then linking it as a static library. Here is an example from the stm32 ble stack: |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am new to Zephyr, I'm sorry if this question sounds naïve...
I have a baremetal library (let's call it foo.lib) for a specific ARM target board. It has an API defined in foo.h
Users of my lib typically write a small program (e.g. main.c) that includes foo.h and make a few calls to the foo API, and then they build it and link it with foo.lib with GNU embedded tool chain for ARM, for the specific target board.
I have recently ported this lib to Zephyr (mostly for the ease of maintaining my code), but I would like to maintain the same build environment for my users. Specifically, I want to avoid forcing my users to learn Zephyr and set up the Zephyr build environment (which admittedly can be rather daunting for newcomers). In essence, I want to avoid exposing Zephyr to my users, so that it is neatly packaged in foo.lib.
Question: is this even possible, or am I attempting something impossible?
If it is possible, are there any pointers as to how one can go about it? Are there other projects on Github that have done something similar?
Thanks a ton for your help, and I'm sorry again if my question sounds silly!
Beta Was this translation helpful? Give feedback.
All reactions