Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
1cf15fc
sys/registry: add runtime config registry core
LasseRosenow Mar 4, 2026
a181b44
examples: add registry_core example
LasseRosenow Mar 4, 2026
fdb64fa
Example: Fix readme and make static
LasseRosenow Mar 5, 2026
84acaa1
Remove guards and rename indices to ids
LasseRosenow Mar 5, 2026
19f606f
Apply suggestions from code review
LasseRosenow Mar 5, 2026
a8899e9
Update examples/advanced/registry/registry_core/main.c
LasseRosenow Mar 5, 2026
cf78c9e
Update sys/include/registry.h
LasseRosenow Mar 5, 2026
c379121
Apply suggestions from code review
LasseRosenow Mar 5, 2026
e10c66b
Fix doxygen modules
LasseRosenow Mar 5, 2026
99b6354
Fix compilation errors
LasseRosenow Mar 5, 2026
a05fb4f
Document registry_apply_cb_scope_t
LasseRosenow Mar 5, 2026
d46d812
registry_instance_t => registry_schema_instance_t
LasseRosenow Mar 5, 2026
3a9ee36
Rename "user" in documentation to "consumer"
LasseRosenow Mar 5, 2026
ff85ad3
Add description field to registry_schema_instance_t
LasseRosenow Mar 5, 2026
a13fbb2
Improve documentation and rename mapping to get_parameter_value_from_…
LasseRosenow Mar 5, 2026
4e51e40
Add autogen and fix doxygen groups
LasseRosenow Mar 5, 2026
0fe8b8a
Update sys/include/registry.h
LasseRosenow Mar 5, 2026
81931b9
Fix makefiles
LasseRosenow Mar 6, 2026
5584698
Remove makefile.include
LasseRosenow Mar 6, 2026
782014d
Remove useless guards in schema c files
LasseRosenow Mar 6, 2026
3b7854c
Improve apply_callback
LasseRosenow Mar 6, 2026
2f4ddef
Add basic doc WIP
LasseRosenow Mar 6, 2026
438e32a
Apply suggestions from code review
LasseRosenow Mar 6, 2026
23f0208
Mark function as _ static
LasseRosenow Mar 6, 2026
6661ecb
Apply suggestions from code review
LasseRosenow Mar 6, 2026
ca93e97
Fix
LasseRosenow Mar 6, 2026
0012d43
Update sys/registry/registry.c
LasseRosenow Mar 6, 2026
02147fe
Fix
LasseRosenow Mar 6, 2026
4c20b3d
Fix Kconfig
LasseRosenow Mar 6, 2026
c40bec5
Fix util
LasseRosenow Mar 6, 2026
dafe60f
Fix string format white space
LasseRosenow Mar 9, 2026
428b22a
Use fmt.h in util.c
LasseRosenow Mar 9, 2026
f05c9f8
Fix util.c overflow
LasseRosenow Mar 9, 2026
5da6fa4
Fix rgb-led description
LasseRosenow Mar 9, 2026
ee87700
Fix schema description fields
LasseRosenow Mar 9, 2026
2977a4c
Fix debug include and define order
LasseRosenow Mar 9, 2026
7b96dcc
Fix comment for memcpy
LasseRosenow Mar 10, 2026
fe34b9f
add auto_init priority define
LasseRosenow Mar 10, 2026
33fa046
Fix doc
LasseRosenow Mar 10, 2026
163899c
Add tests
LasseRosenow Mar 10, 2026
08e36af
Cleanup tests
LasseRosenow Mar 10, 2026
4202adc
Fix documentation
LasseRosenow Mar 10, 2026
76a846b
Fix static tests
LasseRosenow Mar 10, 2026
ad0ff3f
Improve documentation
LasseRosenow Mar 10, 2026
6556394
Improve doc
LasseRosenow Mar 11, 2026
d61c699
Fix static test
LasseRosenow Mar 11, 2026
a342161
Improve doc
LasseRosenow Mar 11, 2026
d66606a
Fix documentation
LasseRosenow Mar 11, 2026
223d8e6
Rename "registry" to "runtime_config"
LasseRosenow Mar 11, 2026
cd0b64f
Fix
LasseRosenow Mar 11, 2026
f1dafd1
Fix
LasseRosenow Mar 11, 2026
3181834
Improve documentation
LasseRosenow Mar 11, 2026
80abe32
Apply suggestions from code review
LasseRosenow Mar 12, 2026
104a5e4
Fix doc
LasseRosenow Mar 12, 2026
8351aae
Fix
LasseRosenow Mar 12, 2026
8ed2ed6
Apply suggestions from code review
LasseRosenow Mar 12, 2026
faa6840
Clean
LasseRosenow Mar 12, 2026
3837945
Fix looooooong liiiiiines
LasseRosenow Mar 12, 2026
f7437e3
Fix more old style comments
LasseRosenow Mar 12, 2026
c576421
Rename opaque => bytes
LasseRosenow Mar 12, 2026
b4f76c2
Improve doc
LasseRosenow Mar 13, 2026
90851da
Update sys/runtime_config/runtime_config.c
LasseRosenow Mar 13, 2026
4ff4e3c
Format
LasseRosenow Mar 13, 2026
5991db6
Improve documentation
LasseRosenow Mar 13, 2026
7534ffd
Improve doc
LasseRosenow Mar 13, 2026
313a167
Add documentation of missing features
LasseRosenow Mar 13, 2026
413f911
Fix images
LasseRosenow Mar 13, 2026
8538b2a
Improve doc
LasseRosenow Mar 13, 2026
4f90b2f
Merge doc.md with runtime_config.h
LasseRosenow Mar 31, 2026
69c9d82
sys/runtime_config: fix namespace description
LasseRosenow Apr 1, 2026
7a0852f
sys/runtime_config: Remove wrong const and fix castings
LasseRosenow Apr 1, 2026
26fd28f
sys/runtime_config: refactor tree_traversal_depth calculation and use…
LasseRosenow Apr 1, 2026
3b452bf
tests: fix rename
LasseRosenow Apr 1, 2026
b67b636
Rename "Runtime config" to "Runtime configuration"
LasseRosenow Apr 1, 2026
6b393bb
examples/runtime_config: use pointer instead of copying struct
LasseRosenow Apr 1, 2026
e91822d
sys/runtime_config: prefix RUNTIME_CONFIG_UTIL_FORMAT_FLOAT_PRECISION…
LasseRosenow Apr 1, 2026
6a3acca
sys/runtime_config: make util.c more readable
LasseRosenow Apr 1, 2026
a31f21a
sys/runtime_config: Add float precision macro to kconfig
LasseRosenow Apr 1, 2026
3721346
sys/runtime_config: rename config macros to be prefixed with CONFIG_
LasseRosenow Apr 1, 2026
0bf7ffd
sys/runtime_config: fix doc.md security warning
LasseRosenow Apr 1, 2026
f652556
test/runtime_config: mark files as autogenerated
LasseRosenow Apr 1, 2026
2d9e780
Update sys/runtime_config/doc.md
LasseRosenow Apr 1, 2026
dc75328
Update sys/runtime_config/doc.md
LasseRosenow Apr 1, 2026
ed3685b
Update sys/runtime_config/doc.md
LasseRosenow Apr 1, 2026
e081f61
sys/runtime_config: doc: mark config managers as not yet existing
LasseRosenow Apr 1, 2026
c805af9
Merge branch 'pr-runtime-configuration-registry-core' of github.com:L…
LasseRosenow Apr 1, 2026
bff7aa2
sys/runtime_config: Improve docs
LasseRosenow Apr 1, 2026
90682ba
sys/runtime_config: improve docs
LasseRosenow Apr 1, 2026
9253b1b
sys/runtime_config: mark input values as not NULL
LasseRosenow Apr 1, 2026
e528421
sys/runtime_config: Replace remaining "config" with "configuration" a…
LasseRosenow Apr 1, 2026
5c59fcc
doc: fix runtime_config images
LasseRosenow Apr 1, 2026
d80b375
Fix
LasseRosenow Apr 1, 2026
55e77cb
Fix
LasseRosenow Apr 1, 2026
10e27ae
Remove unused error code
LasseRosenow Apr 1, 2026
9abf919
sys/runtime_config: rename _export to _traverse_config_tree
LasseRosenow Apr 1, 2026
ba8e488
fix
LasseRosenow Apr 1, 2026
3043d2f
Fix
LasseRosenow Apr 1, 2026
3e656fb
Fix errors in tests
LasseRosenow Apr 2, 2026
ec324e6
Fix float test
LasseRosenow Apr 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion doc/doxygen/riot.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,11 @@ HTML_EXTRA_FILES = src/css/bootstrap.min.css \
src/js/riot-doxy.js \
../../sys/net/application_layer/unicoap/docs/unicoap-layers.svg \
../../sys/net/application_layer/unicoap/docs/unicoap-layers-comms.svg \
../../sys/net/application_layer/unicoap/docs/unicoap-layers-comms-apis.svg
../../sys/net/application_layer/unicoap/docs/unicoap-layers-comms-apis.svg\
../../sys/runtime_config/docs/api_structure.svg\
../../sys/runtime_config/docs/architecture.svg\
../../sys/runtime_config/docs/namespaces_and_storages.svg\
../../sys/runtime_config/docs/runtime_config.svg

# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
# should be rendered with a dark or light theme.
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ Here is a quick overview of the examples available in the RIOT:
| [sock_tcp_echo](./networking/misc/sock_tcp_echo/README.md) | This is a simple TCP echo server / client that uses the SOCK API. |
| [lwip_ipv4](./networking/misc/lwip_ipv4/README.md) | This is a simple UDP client / server using LWIP for IPv4. |


## Advanced Examples

| Example | Description |
Expand All @@ -144,6 +143,7 @@ Here is a quick overview of the examples available in the RIOT:
| [senml_saul](./advanced/senml_saul/README.md) | This example demonstrates the usage of the SAUL (Sensor Actuator Uber Layer) module with the SenML (Sensor Measurement Lists) format. |
| [opendsme](./advanced/opendsme/README.md) | This example demonstrates the usage of the OpenDSME module in RIOT. |
| [xipfs](./advanced/xipfs/README.md) | This example demonstrates the usage of XIPFS for creating and executing an executable file. |
| [runtime_config_core](./advanced/runtime_config/runtime_config_core/README.md) | This example demonstrates the most basic usage of the `Runtime configuration` module. |

## Examples from Guides

Expand Down
24 changes: 24 additions & 0 deletions examples/advanced/runtime_config/runtime_config_core/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# name of the application
APPLICATION = runtime_config_example_core

# If no BOARD is found in the environment, use this default:
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../../../..

# required modules
# enable board_led schema (sys/board_led) of the Runtime configuration module
USEMODULE += runtime_config_namespace_sys_board_led
# enable the ztimer to turn the led on and off every second
USEMODULE += ztimer_sec

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
# development process:
DEVELHELP ?= 1

# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1

include $(RIOTBASE)/Makefile.include
14 changes: 14 additions & 0 deletions examples/advanced/runtime_config/runtime_config_core/README.md
Comment thread
mguetschow marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Runtime Configuration Core

This application demonstrates the most basic usage of the `Runtime configuration` module.
It implements a BOARD LED schema and continuously changes its value every second.

## Usage

Simply build and flash the application for your target board:

```shell
BOARD=YOUR_BOARD_NAME_HERE make flash term
```

Now you should see the terminal continuously print out different LED states.
106 changes: 106 additions & 0 deletions examples/advanced/runtime_config/runtime_config_core/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/*
* SPDX-FileCopyrightText: 2023-2026 Lasse Rosenow <lasse.rosenow@haw-hamburg.de>
* SPDX-FileCopyrightText: 2023-2026 HAW Hamburg
* SPDX-License-Identifier: LGPL-2.1-only
*/

/**
* @ingroup examples
* @{
*
* @file
* @brief Runtime configuration core minimal example application to demonstrate
* how to use the "Runtime configuration" module without any of its extensions.
*
* @author Lasse Rosenow <lasse.rosenow@haw-hamburg.de>
*
* @}
*/

#include <string.h>
#include <stdio.h>
#include <unistd.h>

#include "periph_cpu.h"
#include "led.h"
#include "board.h"
#include "runtime_config.h"
#include "runtime_config/namespace/sys.h"
#include "runtime_config/namespace/sys/board_led.h"
#include "ztimer.h"

/* This callback gets called, when new configurations shall be applied.
* If interacting with configurations of drivers then this callback should be
* implemented by the driver itself. For custom application logic, we need to
* define this for ourselves. */
static runtime_config_error_t board_led_instance_apply_cb(
const runtime_config_group_or_parameter_id_t *group_or_parameter_id,
const runtime_config_schema_instance_t *instance)
{
const runtime_config_sys_board_led_instance_t *instance_data = (const runtime_config_sys_board_led_instance_t *)instance->data;

/* Either apply all parameters of the instance or only the given parameter.
* For a single LED there is no difference as it only has one parameter. */
if ((group_or_parameter_id == NULL) ||
(*group_or_parameter_id == RUNTIME_CONFIG_SYS_BOARD_LED_ENABLED)) {
/* Get the correct field from the instance_data variable */
bool led_state = instance_data->enabled;
/* Turn the LED on or off depending on the led_state */
if (led_state == true) {
/* This is the apply_cb function of instance 0, so we toggle LED 0 as well */
Comment thread
mguetschow marked this conversation as resolved.
LED_ON(0);
Comment thread
mguetschow marked this conversation as resolved.
}
else {
LED_OFF(0);
}
}

return 0;
}

/* This belongs into the BOARD or Driver for example */
static runtime_config_sys_board_led_instance_t board_led_instance_data = {
.enabled = 0,
};

static runtime_config_schema_instance_t board_led_instance = {
.data = &board_led_instance_data,
.apply_cb = &board_led_instance_apply_cb,
};

/* This belongs into our main application */
int main(void)
{
runtime_config_init();

/* init schemas */
runtime_config_add_schema_instance(&runtime_config_sys_board_led, &board_led_instance);

bool board_led_enabled = false;

while (true) {
/* Invert the BOARD LED, to make it turn on and off on each subsequent cycle */
board_led_enabled = !board_led_enabled;

/* Create runtime_config_node_t for the board_led_parameter */
const runtime_config_node_t parameter_node = {
.type = RUNTIME_CONFIG_NODE_PARAMETER,
.value.parameter = {
.instance = &board_led_instance,
.parameter = &runtime_config_sys_board_led_enabled,
},
};

/* Set new runtime configuration value */
runtime_config_set(&parameter_node, &board_led_enabled, sizeof(board_led_enabled));

/* Apply the runtime configuration value to change the LED state
* (in this case calls the apply_cb function: "board_led_instance_apply_cb") */
runtime_config_apply(&parameter_node);

/* Sleep for 1 second and then do it again*/
ztimer_sleep(ZTIMER_SEC, 1);
}

return 0;
}
6 changes: 6 additions & 0 deletions makefiles/pseudomodules.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,12 @@ PSEUDOMODULES += psa_riot_hashes_sha_512_224
PSEUDOMODULES += psa_riot_hashes_sha_512_256
PSEUDOMODULES += psa_riot_hashes_hmac_sha256
PSEUDOMODULES += fortuna_reseed

# Runtime configuration modules are pseudomodules unless stated otherwise
PSEUDOMODULES += runtime_config_%
# Runtime configuration sys schemas
NO_PSEUDOMODULES += runtime_config_namespace_sys

PSEUDOMODULES += riotboot_%
PSEUDOMODULES += rtt_cmd
PSEUDOMODULES += saul_adc
Expand Down
1 change: 1 addition & 0 deletions sys/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ rsource "fido2/Kconfig"
rsource "net/Kconfig"
rsource "progress_bar/Kconfig"
rsource "psa_crypto/Kconfig"
rsource "runtime_config/Kconfig"
rsource "shell/Kconfig"
rsource "shell_lock/Kconfig"
rsource "usb/Kconfig"
Expand Down
3 changes: 3 additions & 0 deletions sys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ endif
ifneq (,$(filter netutils,$(USEMODULE)))
DIRS += net/netutils
endif
ifneq (,$(filter runtime_config,$(USEMODULE)))
DIRS += runtime_config
endif
ifneq (,$(filter sema,$(USEMODULE)))
DIRS += sema
endif
Expand Down
4 changes: 4 additions & 0 deletions sys/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -730,4 +730,8 @@ ifneq (,$(filter wifi_scan_list,$(USEMODULE)))
USEMODULE += l2scan_list
endif

ifneq (,$(filter runtime_config%,$(USEMODULE)))
include $(RIOTBASE)/sys/runtime_config/Makefile.dep
endif

include $(RIOTBASE)/sys/test_utils/Makefile.dep
Loading
Loading