modules: Add zcbor Kconfig and cmake recipe
The commit adds files for the zcbor to be built as module. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
parent
2dfb883158
commit
22c32cfbb4
3 changed files with 26 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ source "modules/Kconfig.tinycbor"
|
|||
source "modules/Kconfig.tinycrypt"
|
||||
source "modules/Kconfig.vega"
|
||||
source "modules/Kconfig.xtensa"
|
||||
source "modules/zcbor/Kconfig"
|
||||
source "modules/Kconfig.mcuboot_bootutil"
|
||||
|
||||
comment "Unavailable modules, please install those via the project manifest."
|
||||
|
|
@ -80,6 +81,9 @@ comment "CANopenNode module not available."
|
|||
comment "FFF module not available."
|
||||
depends on !ZEPHYR_FFF_MODULE
|
||||
|
||||
comment "zcbor module not available."
|
||||
depends on !ZEPHYR_ZCBOR_MODULE
|
||||
|
||||
# This ensures that symbols are available in Kconfig for dependency checking
|
||||
# and referencing, while keeping the settings themselves unavailable when the
|
||||
# modules are not present in the workspace
|
||||
|
|
|
|||
12
modules/zcbor/CMakeLists.txt
Normal file
12
modules/zcbor/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
if(CONFIG_ZCBOR)
|
||||
zephyr_include_directories(
|
||||
${ZEPHYR_ZCBOR_MODULE_DIR}/include
|
||||
)
|
||||
|
||||
zephyr_library()
|
||||
zephyr_library_sources(
|
||||
${ZEPHYR_ZCBOR_MODULE_DIR}/src/zcbor_common.c
|
||||
${ZEPHYR_ZCBOR_MODULE_DIR}/src/zcbor_decode.c
|
||||
${ZEPHYR_ZCBOR_MODULE_DIR}/src/zcbor_encode.c
|
||||
)
|
||||
endif()
|
||||
10
modules/zcbor/Kconfig
Normal file
10
modules/zcbor/Kconfig
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Copyright (c) 2022 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config ZEPHYR_ZCBOR_MODULE
|
||||
bool
|
||||
|
||||
config ZCBOR
|
||||
bool "zcbor library"
|
||||
help
|
||||
Enable zcbor CBOR encoder/decoder library
|
||||
Loading…
Reference in a new issue