.. _atm_settings-sample: Subsys: settings ################ Overview ******** This sample demonstrates how to use the atm_settings related functions to load tag data (key-value pairs) from the factory data and settings storage partitions , and to save tag data (key-value pairs) to the settings storage partition. Requirements ************ Atmosic EVK <:ref:`board | serial `> .. note:: This sample relies on building the settings subsystem with .. code-block:: console CONFIG_SETTINGS=y CONFIG_ATM_SETTINGS=y which will compile the settings and atm_settings related functions for the application to access factory data and settings storage. Building and Running ******************** This sample is built from ``openair/samples/subsys/settings``. Build command: .. code-block:: bash west build -p always -b //ns openair/samples/subsys/settings --sysbuild -T samples.subsys.settings.atm Flash command: .. code-block:: bash west flash --skip-rebuild --verify --device [--jlink] --fast_load [--erase_flash] .. note:: Before running this sample, the factory data and settings storage binary files must be programmed. When using sysbuild, these binary files are automatically generated by the Atmosic Zephyr Settings Generator Tool <:ref:`ZSG Tool `> based on the YAML files in the tag_data folder. Using west flash will also automatically program these binary files. Sample Output ************* When the device boots up, the console output shows: .. code-block:: console load FACTORY/COMPANY_ID key: 0xa24 load FACTORY/SERIAL_NUMBER key: 0x12345678 load SETTINGS/VERSION key: 1.23 save SETTINGS/TEST_KEY key: 0x5aa50ff0 load SETTINGS/TEST_KEY key: 0x5aa50ff0 save SETTINGS/TEST_KEY key: 0xa55af00f load SETTINGS/TEST_KEY key: 0xa55af00f