<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>For the nRF54 series, how to write logs into ZMS  just by changing prj.conf</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/124989/for-the-nrf54-series-how-to-write-logs-into-zms-just-by-changing-prj-conf</link><description>I am porting a ncs project from nrf52832 into nrf54l15 
 If want to reuse existing Log functions of system of zephyr, like supported by NVS, is there any way to do it? 
 Nordic AI said nrf54l15 should use ZMS to protect flash, and need to manually implement</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Nov 2025 08:33:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/124989/for-the-nrf54-series-how-to-write-logs-into-zms-just-by-changing-prj-conf" /><item><title>RE: For the nRF54 series, how to write logs into ZMS  just by changing prj.conf</title><link>https://devzone.nordicsemi.com/thread/553254?ContentTypeID=1</link><pubDate>Tue, 04 Nov 2025 08:33:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d203373-9379-4b93-9aad-76f72559b4f2</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi again Shawn&lt;/p&gt;
[quote user="listplot3d_dev"]&lt;p&gt;2.output to local file, with existing prj.conf options&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;mainstream market is happy about that, while Noridc strongly recommends another option&lt;/p&gt;[/quote]
&lt;p&gt;I&amp;#39;ll just reiterate the previous comment I made about this with one an addition: ZMS is developed and intended to be used to store data in RRAM and not as a logging backend to a file system. If you wish, you can use the FS logging backend instead, but that will introduce extra wear and tear on the RRAM due to this solution isn&amp;#39;t using any ZMS implementation. The issue is with the implementation that has the appropriate algorithm to handle reading and writing to RRAM (which the nRF54L15 SoC uses).&lt;/p&gt;
[quote user="listplot3d_dev"]&lt;p&gt;3.output to ZMS file&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;which is recommended by Nordic. But currently, only project with scenarios picky enough or with developers geeky enough, would choose this option.&lt;/p&gt;[/quote]
&lt;p&gt;I&amp;#39;ve never said &amp;quot;we recommend you to a ZMS file&amp;quot;. What we&amp;#39;ve said is that ZMS is better to use with RRAM, but there is no built in logging to file-system backend.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For the nRF54 series, how to write logs into ZMS  just by changing prj.conf</title><link>https://devzone.nordicsemi.com/thread/553240?ContentTypeID=1</link><pubDate>Tue, 04 Nov 2025 03:45:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb135448-0184-4c1b-b112-53c0798d3160</guid><dc:creator>listplot3d_dev</dc:creator><description>&lt;p&gt;Thanks Andreas, here is my latest conclusion:)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;for logging API with nRF54L15, there are 3 scenarios:&lt;/p&gt;
&lt;p&gt;1. output to UART/serial.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;no problem at all. everybody is happy about that.&lt;/p&gt;
&lt;p&gt;2.output to local file, with existing prj.conf options&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;mainstream market is happy about that, while Noridc strongly recommends another option&lt;/p&gt;
&lt;p&gt;3.output to ZMS file&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;which is recommended by Nordic. But currently, only project with scenarios picky enough or with developers geeky enough, would choose this option.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please correct me if anything wrong&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Best Regards&lt;/p&gt;
&lt;p&gt;-Shawn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For the nRF54 series, how to write logs into ZMS  just by changing prj.conf</title><link>https://devzone.nordicsemi.com/thread/553031?ContentTypeID=1</link><pubDate>Fri, 31 Oct 2025 13:53:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d3693c4-19c6-4b43-ac58-f73b1bd030d3</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi Shawn,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry for potentially causing an existential crisis heh&lt;/p&gt;
[quote user="listplot3d_dev"]1.&amp;lt;zephyr/logging/log.h&amp;gt; api is a mainstream logging module in NCS[/quote]
&lt;p&gt;Yes, it is&lt;/p&gt;
[quote user="listplot3d_dev"]2.nrf54l15 is a mainstream chip from Nordic[/quote]
&lt;p&gt;Yes it is&lt;/p&gt;
[quote user="listplot3d_dev"]3.nrf54l15 need to use ZMS, if developer want to use zephyr logging API[/quote]
&lt;p&gt;It doesn&amp;#39;t need to do this, but it is strongly recommended due to it using RRAM and not Flash&amp;nbsp;&lt;/p&gt;
[quote user="listplot3d_dev"]if above three statements are true, then how do developers write logging? I can only think of 2 options:[/quote]
&lt;p&gt;Logging is done regularly with zephyr logging API, but the issue we&amp;#39;re discussing in this case is how to &amp;quot;use the logging to file system together with ZMS&amp;quot;. This does not have any built in backend per now. Logging over UART/serial is not an issue since this does not use logging to a ZMS file system.&lt;/p&gt;
&lt;p&gt;Does this make sense to you? I&amp;#39;m more than happy to dive deeper into this. I don&amp;#39;t want to have caused any misunderstandings here&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For the nRF54 series, how to write logs into ZMS  just by changing prj.conf</title><link>https://devzone.nordicsemi.com/thread/552479?ContentTypeID=1</link><pubDate>Mon, 27 Oct 2025 12:53:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7f24104-e3b6-4103-b778-35b7bba88b18</guid><dc:creator>listplot3d_dev</dc:creator><description>&lt;p&gt;Thanks Andreas for your detailed answer. You triggered me to re-consider whether following believes with NCS logging system is correct:&lt;/p&gt;
&lt;p&gt;1.&amp;lt;zephyr/logging/log.h&amp;gt; api is a mainstream logging module in NCS&lt;/p&gt;
&lt;p&gt;2.nrf54l15 is a mainstream chip from Nordic&lt;/p&gt;
&lt;p&gt;3.nrf54l15 need to use ZMS, if developer want to use zephyr logging API&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;if above three statements are true, then how do developers write logging? I can only think of 2 options:&lt;/p&gt;
&lt;p&gt;option 1.it is not mainstream behavior of using zephyr logging api based on nrf54l15. If so, which NCS sample can be referred as recommended practice for dealing with that?&lt;/p&gt;
&lt;p&gt;option 2.most of teams working with nrf54l15, need to invent the wheel for ZMS backend. And from Nordic technical team&amp;#39;s perspective, it is a acceptable design, unless sales department get involved.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please correct me if I miss anything...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Best Regards&lt;/p&gt;
&lt;p&gt;-Shawn&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For the nRF54 series, how to write logs into ZMS  just by changing prj.conf</title><link>https://devzone.nordicsemi.com/thread/552357?ContentTypeID=1</link><pubDate>Fri, 24 Oct 2025 13:02:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a14199f3-187a-4c96-8d39-f7401c8feeb8</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi Shawn,&lt;/p&gt;
&lt;p&gt;Apologies for the long wait. It&amp;#39;s been quite a week..&lt;/p&gt;
&lt;p&gt;First things first, no there&amp;#39;s no ZMS logging backend. But you can add your own backend that uses the logging which is based on ZMS API:&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/services/logging/index.html#logging-backends"&gt;https://docs.zephyrproject.org/latest/services/logging/index.html#logging-backends&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;ZMS supports FS functions such as :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;zms_mount()&lt;/strong&gt;: Mounts a ZMS file system onto the device specified in the &lt;code&gt;fs&lt;/code&gt; structure.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;zms_clear()&lt;/strong&gt;: Clears the ZMS file system from the device.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;zms_write()&lt;/strong&gt;: Writes an entry to the file system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;zms_delete()&lt;/strong&gt;: Deletes an entry from the file system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;zms_read()&lt;/strong&gt;: Reads an entry from the file system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;zms_read_hist()&lt;/strong&gt;: Reads a history entry from the file system.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All these functions operate on a pointer to a file system structure (&lt;code&gt;struct zms_fs *fs&lt;/code&gt;), confirming that ZMS provides file system-level operations and management functions&amp;nbsp;&lt;a title="https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/group_zms_high_level_api.html" href="https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/group_zms_high_level_api.html" rel="noopener noreferrer" target="_blank"&gt;ZMS API Functions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So to conclude, there&amp;#39;s no config that does handles this for you out of the box, but it is possible to use ZMS and logging together. If you wish, you can request this as a feature request through your regional sales manager and/or investigate if anyone else in the Zephyr discord forums have been doing the same, but I&amp;#39;ve not been able to find anything internally stating that this is something that we will prioritize to add support for as of yet&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For the nRF54 series, how to write logs into ZMS  just by changing prj.conf</title><link>https://devzone.nordicsemi.com/thread/551832?ContentTypeID=1</link><pubDate>Fri, 17 Oct 2025 13:51:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b873a66e-b461-49b0-871c-24a6a26b3de8</guid><dc:creator>listplot3d_dev</dc:creator><description>&lt;p&gt;Thanks for your reply&amp;nbsp;Andreas.&lt;/p&gt;
&lt;p&gt;Yes, I meant to use&amp;nbsp;&amp;lt;zephyr/logging/log.h&amp;gt; api functions such as LOG_INF() ,LOG_ERR().&lt;/p&gt;
&lt;p&gt;In my understanding, with nrf52 series, if to redirect log into file on soc flash, developer doesn&amp;#39;t need to specific code for that, and changes in prj.conf and overlay should be enough, with following example for nrf52832:&lt;/p&gt;
&lt;p&gt;-----------------conf.prj-------------&lt;/p&gt;
&lt;p&gt;# Enable Zephyr logging&lt;br /&gt;CONFIG_LOG=y&lt;br /&gt;CONFIG_LOG_BACKEND_FS=y&lt;br /&gt;CONFIG_LOG_BACKEND_FS_FILE_SIZE=4096&lt;br /&gt;CONFIG_LOG_BACKEND_FS_FILES_LIMIT=4&lt;br /&gt;CONFIG_LOG_BACKEND_FS_DIR=&amp;quot;/log&amp;quot;&lt;br /&gt;CONFIG_LOG_DEFAULT_LEVEL=3&amp;nbsp; # Info level&lt;br /&gt;&lt;br /&gt;# Enable LittleFS and flash support&lt;br /&gt;CONFIG_FILE_SYSTEM=y&lt;br /&gt;CONFIG_FILE_SYSTEM_LITTLEFS=y&lt;br /&gt;CONFIG_FLASH=y&lt;br /&gt;CONFIG_FLASH_MAP=y&lt;br /&gt;CONFIG_FLASH_PAGE_LAYOUT=y&lt;br /&gt;CONFIG_MAIN_STACK_SIZE=2048&lt;/p&gt;
&lt;p&gt;--------main.c-----------&lt;/p&gt;
&lt;p&gt;#include &amp;lt;zephyr/kernel.h&amp;gt;&lt;br /&gt;#include &amp;lt;zephyr/logging/log.h&amp;gt;&lt;br /&gt;#include &amp;lt;zephyr/fs/fs.h&amp;gt;&lt;br /&gt;#include &amp;lt;zephyr/fs/littlefs.h&amp;gt;&lt;br /&gt;&lt;br /&gt;LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);&lt;br /&gt;&lt;br /&gt;void main(void)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; LOG_INF(&amp;quot;Hello World! Logging to file system.&amp;quot;);&lt;br /&gt;&amp;nbsp; &amp;nbsp; while (1) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOG_INF(&amp;quot;Periodic log message.&amp;quot;);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; k_sleep(K_SECONDS(5));&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;----------------nrf52832.overlay-------------&lt;/p&gt;
&lt;p&gt;/ {&lt;br /&gt;&amp;nbsp; &amp;nbsp; chosen {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; zephyr,flash-controller = &amp;amp;flash0;&lt;br /&gt;&amp;nbsp; &amp;nbsp; };&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; /* LittleFS partition (adjust address/size as needed) */&lt;br /&gt;&amp;nbsp; &amp;nbsp; littlefs_storage: partition@7c000 {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label = &amp;quot;storage&amp;quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reg = &amp;lt;0x0007c000 0x00004000&amp;gt;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; };&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&amp;amp;flash0 {&lt;br /&gt;&amp;nbsp; &amp;nbsp; partitions {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; compatible = &amp;quot;fixed-partitions&amp;quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #address-cells = &amp;lt;1&amp;gt;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #size-cells = &amp;lt;1&amp;gt;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* ... other partitions ... */&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; storage_partition: partition@7c000 {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label = &amp;quot;storage&amp;quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reg = &amp;lt;0x0007c000 0x00004000&amp;gt;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;br /&gt;&amp;nbsp; &amp;nbsp; };&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;----------------------&lt;/p&gt;
&lt;p&gt;So ideally, if this simplicity applies for ZMS as well, it would be wonderful.&lt;/p&gt;
&lt;p&gt;Could your provide&lt;span style="white-space:pre-wrap;"&gt; a helloworld example with above 3 files for same functionality shown above, based on nrf54l15+ncs 3.1.1? I believe it would make the answer very clear.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="white-space:pre-wrap;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="white-space:pre-wrap;"&gt;Thanks a lot!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="white-space:pre-wrap;"&gt;-Shawn&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="white-space:pre-wrap;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="white-space:pre-wrap;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: For the nRF54 series, how to write logs into ZMS  just by changing prj.conf</title><link>https://devzone.nordicsemi.com/thread/551652?ContentTypeID=1</link><pubDate>Thu, 16 Oct 2025 06:02:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d7e7915-7923-4e3c-a675-7239ac452187</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hello Shawn,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s correct as you say that we recommend to use ZMS instead of flash storage for the nRF54L and nRF54H devices. As described in&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf54l/zms.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf54l/zms.html&lt;/a&gt;, which is probably what the Kapa chat bot sourced it&amp;#39;s statement from, &amp;quot;&lt;em&gt;&lt;span&gt;&amp;nbsp;ZMS utilizes a flexible data management system that reduces write and erase cycles, extending the lifespan of non-volatile&lt;/span&gt;&lt;/em&gt; memory.&amp;quot;, meaning that ZMS is tailored to fit both SRAM and MRAM better than the flash memory storage options.&lt;/p&gt;
[quote user=""]If want to reuse existing Log functions of system of zephyr, like supported by NVS, is there any way to do it?&amp;nbsp;[/quote]
&lt;p&gt;Could you give me an example/reference to clarify if I&amp;#39;m on the same page as you w.r.t &amp;quot;existing Log functions..&amp;quot;? Is it the &amp;lt;zephyr/logging/log.h&amp;gt; api you&amp;#39;re referring to, or is it something else?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>