Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add option to build LoRaMac sources as a static library#1368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
dmeehan1968 wants to merge31 commits intoLora-net:master
base:master
Choose a base branch
Loading
fromWavetrend:enhance/build-static-library

Conversation

dmeehan1968
Copy link

Intention of this PR is to allow developers to build the LoRaMac sources as a static library for inclusion in their own projects.

A separate directory is added to the project calledas-lib which contains a set of CMakeLists.txt files that shadow the directory structure undersrc. A backwards compatible change is made to the project root CMakeLists.txt which, when provided with the option LORAMAC_AS_LIB, will direct CMake to reference theas-lib directory instead ofsrc. The option default is OFF so that the past build behaviour is preserved as the default.

A README.md is provided in theas-lib directory with an outline of options/settings that can be applied to the build. A standardLORAMAC_ prefix is applied to all options to aid interoperatibility with other project sources.

This is a rough draft and is currently working within my own project. I will add usage instructions to the README shortly.

I'm currently loading the repo into the project via CMake's FetchContent, as this allows the inclusion of the project root viaadd_subdirectory whilst specifying other options, such as building regional specific variants (my own projects tend to have different builds for each desired LoRaWAN region, rather than a single multi-region build (although this is also intended to be supported by this facility).

Feedback, enhancements and criticism welcome.

MarekNovakACRIOS reacted with thumbs up emoji
@MedadRufus
Copy link

Would be useful.

@mluis1mluis1 requested a review fromdjaeckleOctober 20, 2022 08:55
@mluis1
Copy link
Contributor

Thanks for the proposition.
We will consider it for a future major release.

dmeehan1968 reacted with thumbs up emoji

@dmeehan1968
Copy link
Author

There is an argument with this that its used to rework the examples (using the parallel directory structure to leave the legacty as-is) so that they are built using the static library targets. In time, this can then be worked back into the src tree.

I don't see that as being a change of interface (respect your choice as to when to integrate of course).

I can't really do the range of examples due to lack of hardware/toolchain. In fact I only have our custom boards which are only MCU/radio similar to the B-L027-LRWAN-1 example, but it's at least the same toolchain. I could do an example based off that if you're interested. Do you think that should be another PR, or add to this?

@dmeehan1968dmeehan1968force-pushed theenhance/build-static-library branch fromc372cbb toa7a07e8CompareMarch 24, 2023 13:42
@dmeehan1968
Copy link
Author

Rebased onto current master, v4.7.0 (plus comment fix)

@danak6jq
Copy link

Watching this closely.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@devilish66694devilish66694devilish66694 approved these changes

@djaeckledjaeckleAwaiting requested review from djaeckle

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@dmeehan1968@MedadRufus@mluis1@danak6jq@devilish66694

[8]ページ先頭

©2009-2025 Movatter.jp