Skip to content

sys/config: Add static conf handlers support#3628

Open
kasjer wants to merge 4 commits intoapache:masterfrom
kasjer:kasjer/sys-config-static-conf-handler
Open

sys/config: Add static conf handlers support#3628
kasjer wants to merge 4 commits intoapache:masterfrom
kasjer:kasjer/sys-config-static-conf-handler

Conversation

@kasjer
Copy link
Copy Markdown
Contributor

@kasjer kasjer commented May 6, 2026

So far conf_handlers could be registered at run time.
This approach delays loading of configuration till
application start processing events.

This limits what can be configured in config.

Now system supports static configuration,
conf_handler can be put in link time table
so conf_handler is ready from the very start
and configuration can be loaded earlier.

CONFIG_AUTO_LOAD syscfg value allows to load
configuration during initialization of config
subsystem as static handlers are already in place.

Dynamic handlers are still supported while discuraged.

sys/id nad sys/fault packages are converted to use static registration

stm32_eth now support configuration via sys/config as an example
how to use it

kasjer added 3 commits May 6, 2026 12:11
So far conf_handlers could be registered at run time.
This approach delays loading of configuration till
application start processing events.

This limits what can be configured in config.

Now system supports static configuration,
conf_handler can be put in link time table
so conf_handler is ready from the very start
and configuration can be loaded earlier.

CONFIG_AUTO_LOAD syscfg value allows to load
configuration during initialization of config
subsystem as static handlers are already in place.

Dynamic handlers are still supported while discuraged.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Now conf_handler is statically registerd at
build time.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Now id_conf handler is statically registered
at build time.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
@kasjer kasjer force-pushed the kasjer/sys-config-static-conf-handler branch 2 times, most recently from 3280fec to 0539e55 Compare May 6, 2026 10:14
Now MAC address can be configured in sys/config
instead of syscfg.

Additionally eth link can be brough up at startup.
DHCP can also be started atuomatically so when
application code starts network is already
correctly initialized.

STM32_ETH_MAC_ADDR syscfg value can be used for
specifying MAC address, STM32_MAC_ADDR is now
defunct (name was inconsistent with other values
and syntax was limiting how value can be used)

STM32_ETH_AUTO_UP syscfg value allows to set
link up during startup.

STM32_ETH_DHCP syscfg value allows to start DHCP
automatically.

When STM32_ETH_SYS_CONFIG syscfg value is 1
configuration is taken from sys/config instead
of syscfg.yml

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
@kasjer kasjer force-pushed the kasjer/sys-config-static-conf-handler branch from 0539e55 to d37215a Compare May 6, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant