- Integrate the Zephyr Settings subsystem to persist Modbus parameters. - Use NVS (Non-Volatile Storage) as the backend with a dedicated flash partition. - Modbus baudrate and slave ID are now loaded at startup. - Changes made via the shell are saved to flash and survive a reboot. - Add a 'reset' command to the shell for easier testing. - Fix all compiler and devicetree warnings for a clean build.
30 lines
524 B
Plaintext
30 lines
524 B
Plaintext
# Enable Console and printk for logging
|
|
CONFIG_CONSOLE=y
|
|
CONFIG_LOG=y
|
|
|
|
# Disable UART console
|
|
CONFIG_UART_CONSOLE=n
|
|
|
|
# Enable RTT console
|
|
CONFIG_RTT_CONSOLE=y
|
|
CONFIG_USE_SEGGER_RTT=y
|
|
|
|
# Enable Shell
|
|
CONFIG_SHELL=y
|
|
CONFIG_SHELL_BACKEND_RTT=y
|
|
CONFIG_REBOOT=y
|
|
|
|
# Enable Settings Subsystem
|
|
CONFIG_SETTINGS=y
|
|
CONFIG_SETTINGS_NVS=y
|
|
CONFIG_NVS=y
|
|
CONFIG_FLASH=y
|
|
CONFIG_FLASH_MAP=y
|
|
CONFIG_FLASH_PAGE_LAYOUT=y
|
|
CONFIG_SETTINGS_LOG_LEVEL_DBG=y
|
|
|
|
# Config modbus
|
|
CONFIG_UART_INTERRUPT_DRIVEN=y
|
|
CONFIG_MODBUS=y
|
|
CONFIG_MODBUS_ROLE_SERVER=y
|