Toggle navigation
Help
Log In
Help
Log In
Home
Messages
Hashtags
Subgroups
×
×
×
Close
Likes
users@lists.zephyrproject.org
Messages
posterid:1954087
Adding a costume module to my project
×
Close
Search
Single
Toggle Dropdown
Messages
Topics
Expanded
Polls
previous page
#1873
next page
Adding a costume module to my project
#west
Stefan Hristozov
#1873
Hi,
I want to add a module to my project. My folder structure looks like this:
<top dir>
|---modules
| |---module1
| | |---CMakeLists.txt
| | |---inc
| | |---src
| | |---zephyr
| | |---module.yml
| |---module2
|---app
|---app1
Where modules/module1/CMakeLists.txt:
zephyr_interface_library_named(test)
target_include_directories(test INTERFACE inc)
zephyr_library()
zephyr_library_sources(
src/test.c
)
zephyr_library_link_libraries(test)
target_link_libraries(test INTERFACE zephyr_interface)
modules/module1/zephyr/module.yml:
build:
cmake: .
app/app1/CMakeLists.txt:
cmake_minimum_required
(VERSION 3.13.1)
include
(
$ENV{ZEPHYR_BASE}
/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project
(NONE)
set
(
$ENV{ZEPHYR_EXTRA_MODULES}
pbs_path/module1)
FILE
(GLOB app_sources src/*.c)
target_sources
(app PRIVATE
${app_sources}
)
target_include_directories
(app PRIVATE
$ENV{ZEPHYR_BASE}
/subsys/net/ip)
target_link_libraries
(app PRIVATE test)
Unfortunately, with this set up module1 doesn't get compiled and I get a linker error when I try to use functions from that module. I assume that something goes wrong with
ZEPHYR_EXTRA_MODULES but I don't know what.
Best regards
Stefan
More
All Messages By This Member
previous page
View All 4 Messages In Topic
next page
previous page
#1873
next page
Join
users@lists.zephyrproject.org to automatically receive all group messages.
×
Close
Report Message
Reason
Report to Moderators
I think this message isn't appropriate for our group. The Group moderators are responsible for maintaining their community and can address these issues.
Report to Zephyr Project Support
I think this violates the Terms of Service. This includes: harm to minors, violence or threats, harassment or privacy invasion, impersonation or misrepresentation, fraud or phishing.
Note:
Your email address is included with the abuse report.
×
Close
Verify Delete
Are you sure you wish to delete this message from the message archives of users@lists.zephyrproject.org?
This cannot be undone.
×
Close
Verify Repost
Are you sure you wish to repost this message?
More Options
More
Home
Hashtags
Subgroups
Terms
Toggle navigation
Terms
©
2023
Groups.io