lib: create empty lib subsystem
Create lib subsystem with empty Kconfig menu, subsystem build file. Updated top-level build and documentation to include subsystem. This was created to provide an example of how the `lib/` directory can be connected to the Zephyr build system through `module.yml`, and so that CI can verify that the extension settings used here work with these sub-trees. . The approach follows the pattern of paralleling the Zephyr tree. An empty subsystem was implemented rather than a non-empty one in order to isolate the core changes from any specific library. This provides a clean reference for users. . It was assumed that some users will want to strip out the `lib/` subsystem separate from existing subsystems, and vice versa. . This was verified by: - visually verifying a clean build of: `west build -b custom_plank -p always example-application/app/` - visually verifying the subsystem appeared in the correct location in a clean build of: `west build -b custom_plank -p always example-application/app/` Signed-off-by: Gregory Shue <gregory.shue@legrand.us>
This commit is contained in:
parent
a061012215
commit
5a66095fa6
|
@ -5,3 +5,4 @@
|
||||||
# as the module CMake entry point (see zephyr/module.yml).
|
# as the module CMake entry point (see zephyr/module.yml).
|
||||||
|
|
||||||
add_subdirectory(drivers)
|
add_subdirectory(drivers)
|
||||||
|
add_subdirectory(lib)
|
||||||
|
|
1
Kconfig
1
Kconfig
|
@ -6,3 +6,4 @@
|
||||||
# module options by going to Zephyr -> Modules in Kconfig.
|
# module options by going to Zephyr -> Modules in Kconfig.
|
||||||
|
|
||||||
rsource "drivers/Kconfig"
|
rsource "drivers/Kconfig"
|
||||||
|
rsource "lib/Kconfig"
|
||||||
|
|
|
@ -10,6 +10,7 @@ applications. Some of the features demonstrated in this example are:
|
||||||
- [Custom boards][board_porting]
|
- [Custom boards][board_porting]
|
||||||
- Custom [devicetree bindings][bindings]
|
- Custom [devicetree bindings][bindings]
|
||||||
- Out-of-tree [drivers][drivers]
|
- Out-of-tree [drivers][drivers]
|
||||||
|
- Out-of-tree libraries
|
||||||
- Example CI configuration (using Github Actions)
|
- Example CI configuration (using Github Actions)
|
||||||
- Custom [west extension][west_ext]
|
- Custom [west extension][west_ext]
|
||||||
|
|
||||||
|
|
6
lib/CMakeLists.txt
Normal file
6
lib/CMakeLists.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
# The visibility and compilation of libraries may be controlled
|
||||||
|
# with a Kconfig setting as follows:
|
||||||
|
#
|
||||||
|
# add_subdirectory_ifdef(CONFIG_CUSTOM_LIB custom_lib)
|
6
lib/Kconfig
Normal file
6
lib/Kconfig
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Copyright (c) 2021 Legrand North America, LLC.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
menu "Libraries"
|
||||||
|
|
||||||
|
endmenu
|
Loading…
Reference in a new issue