Skip to content

Commit

Permalink
RIOT: Modify Kconfig / app.config to remove dep model
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdeep1 committed Apr 2, 2024
1 parent 214665a commit c88c783
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 22 deletions.
2 changes: 1 addition & 1 deletion examples/riot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pkg:
cd pkg_libcoap && cp -r * ../RIOT/pkg/libcoap
@HAVE_KCONFIG=`grep libcoap/Kconfig RIOT/pkg/Kconfig | wc -l` ; \
if [ "$${HAVE_KCONFIG}" = 0 ] ; then \
sed -i '/rsource "libcose\/Kconfig"/irsource "libcoap\/Kconfig"' RIOT/pkg/Kconfig ; \
sed -i '/rsource "flashdb\/Kconfig"/irsource "libcoap\/Kconfig"' RIOT/pkg/Kconfig ; \
fi

examples:
Expand Down
11 changes: 9 additions & 2 deletions examples/riot/examples_libcoap_client/Kconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
if USEMODULE_LIBCOAP
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
menu "libcoap-client"
depends on USEPKG_LIBCOAP

config LIBCOAP_CLIENT_URI
string "CoAP URI to connect to"
default "coap://[fe80::405:5aff:fe15:9b7f]/.well-known/core"
Expand All @@ -10,4 +16,5 @@ config LIBCOAP_USE_PSK_ID
string "User ID to use for PSK communications"
default "user_abc"
depends on USEMODULE_TINYDTLS
endif # USEMODULE_LIBCOAP

endmenu # libcoap-client
4 changes: 1 addition & 3 deletions examples/riot/examples_libcoap_client/app.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
CONFIG_LIBCOAP_CLIENT_SUPPORT=y

CONFIG_LIBCOAP_CLIENT_URI="coap://[fe80::405:5aff:fe15:9b7f]/.well-known/core"

CONFIG_LIBCOAP_USE_PSK="secretPSK"
CONFIG_LIBCOAP_USE_PSK_ID="user_abc"

CONFIG_KCONFIG_USEPKG_LIBCOAP=y
# Logging levels are defined in pkg/libcoap using Kconfig

CONFIG_KCONFIG_USEPKG_TINYDTLS=y
11 changes: 9 additions & 2 deletions examples/riot/examples_libcoap_server/Kconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
if USEMODULE_LIBCOAP
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
menu "libcoap-server"
depends on USEPKG_LIBCOAP

config LIBCOAP_USE_PSK
string "Secret to use for PSK communications"
default "secretPSK"
Expand All @@ -12,4 +18,5 @@ config LIBCOAP_USE_PSK_ID
default "user_abc"
depends on USEMODULE_TINYDTLS
endif # LIBCOAP_CLIENT_SUPPORT
endif # USEMODULE_LIBCOAP

endmenu # libcoap-server
2 changes: 0 additions & 2 deletions examples/riot/examples_libcoap_server/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ CONFIG_LIBCOAP_SERVER_SUPPORT=y

CONFIG_LIBCOAP_USE_PSK="secretPSK"

CONFIG_KCONFIG_USEPKG_LIBCOAP=y
# Logging levels are defined in pkg/libcoap using Kconfig

CONFIG_KCONFIG_USEPKG_TINYDTLS=y
CONFIG_DTLS_PEER_MAX=2
CONFIG_DTLS_HANDSHAKE_MAX=2
9 changes: 2 additions & 7 deletions examples/riot/pkg_libcoap/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
menuconfig KCONFIG_USEPKG_LIBCOAP
bool "Configure libcoap"
menu "libcoap"
depends on USEPKG_LIBCOAP
help
Configure libcoap package via Kconfig.

if KCONFIG_USEPKG_LIBCOAP

choice LIBCOAP_DEBUG_LEVEL
bool "Set CoAP debugging level"
Expand Down Expand Up @@ -292,4 +287,4 @@ config LIBCOAP_MAX_OPTIONS
help
The maximum number of supported options.

endif # KCONFIG_USEPKG_LIBCOAP
endmenu # libcoap
2 changes: 1 addition & 1 deletion examples/riot/pkg_libcoap/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PKG_NAME=libcoap
PKG_URL=https://github.com/obgm/libcoap
PKG_VERSION=11d8e7cd72df78c9a56d6f5f6e7cf3cc469c99de
PKG_VERSION=214665ac4b44b1b6a7e38d4d6907ee835a174928
PKG_LICENSE=BSD-2-Clause

LIBCOAP_BUILD_DIR=$(BINDIR)/pkg/$(PKG_NAME)
Expand Down
11 changes: 9 additions & 2 deletions examples/riot/tests_pkg_libcoap/Kconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
if USEMODULE_LIBCOAP
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
menu "tests_libcoap"
depends on USEPKG_LIBCOAP

config LIBCOAP_USE_PSK
string "Secret to use for PSK communications"
default "secretPSK"
Expand All @@ -7,4 +13,5 @@ config LIBCOAP_USE_PSK_ID
string "Identifier (user) to use for PSK communications"
default "test_user"
depends on USEMODULE_TINYDTLS
endif # USEMODULE_LIBCOAP

endmenu # tests_libcoap
2 changes: 0 additions & 2 deletions examples/riot/tests_pkg_libcoap/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ CONFIG_LIBCOAP_CLIENT_SUPPORT=y
CONFIG_LIBCOAP_USE_PSK="secretPSK"
CONFIG_LIBCOAP_USE_PSK_ID="test_user"

CONFIG_KCONFIG_USEPKG_LIBCOAP=y
# Logging levels are defined in pkg/libcoap using Kconfig
CONFIG_LIBCOAP_LOG_ALERT=y

CONFIG_KCONFIG_USEPKG_TINYDTLS=y
CONFIG_DTLS_PEER_MAX=2
CONFIG_DTLS_HANDSHAKE_MAX=2

0 comments on commit c88c783

Please sign in to comment.