<?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>NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41124/nrf-log-crashlog-backend</link><description>I can&amp;#39;t get flashlog/crashlog to work properly. The symptoms are that when NRF_LOG_BACKEND_FLASH_START_PAGE is set to 0 (i.e logs are written to address right after the application code ends), the flashlog status CLI command reveals that logs are being</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 31 Jan 2020 18:31:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41124/nrf-log-crashlog-backend" /><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/232158?ContentTypeID=1</link><pubDate>Fri, 31 Jan 2020 18:31:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a0e934f-2e86-46eb-86c5-424d4358c6a3</guid><dc:creator>BretH</dc:creator><description>&lt;p&gt;It&amp;#39;s possible that the issue here relates to&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/57093/nrf_log_backend_flash-start-address-overlap-application"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/57093/nrf_log_backend_flash-start-address-overlap-application&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The suggested solution by abhipray could be related.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/185036?ContentTypeID=1</link><pubDate>Fri, 03 May 2019 06:47:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26b8ecfa-ac9e-445f-a7cd-e12a0663231c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;unfortunately no, i will ping the team to request prioritize this. For your reference, the ticket ID is&amp;nbsp;NRFFOETT-2282&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/183908?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 21:00:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20ebc621-b309-4e60-b17e-c32726e5f3f6</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Nordic folks, was this fixed in SDK 15.3.0?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/171529?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 01:34:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c3f73e3-e670-43f3-b439-70e2676750a9</guid><dc:creator>Kevin Choi</dc:creator><description>&lt;p&gt;Anyone solve this issue? I also have same problems.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/162223?ContentTypeID=1</link><pubDate>Tue, 18 Dec 2018 09:10:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2907ba0a-6470-4127-afd2-7f5fb05c6169</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I see, I am not able to replicate that problem, but I will report this to the team. Thanks for letting us know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/161761?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 19:10:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5830def3-d225-46ae-879d-be814dcc835a</guid><dc:creator>abhipray</dc:creator><description>&lt;p&gt;Yes, I understand. What I meant was if I set NRF_LOG_BACKEND_FLASH_START_PAGE to 0, the default RUNTIME START_ADDR is set to the flash page right after CODE_PAGE.&amp;nbsp;&lt;br /&gt;i.e&amp;nbsp;#define RUNTIME_START_ADDR \&lt;br /&gt; ((NRF_LOG_BACKEND_FLASH_START_PAGE == 0) \&lt;br /&gt; ? (CODE_PAGE_SIZE * (CEIL_DIV((uint32_t)CODE_END, CODE_PAGE_SIZE))) \&lt;br /&gt; : FLASH_LOG_START_ADDR)&lt;br /&gt;&lt;br /&gt;However, this causes the problem where flashlog read does not&amp;nbsp;present any logs even though flashlog status shows it&amp;#39;s accumulating logs. Things only start working after flashlog clear.&lt;br /&gt;&lt;br /&gt;Everything starts working normally if I change that line of code above to&lt;br /&gt;#define RUNTIME_START_ADDR \&lt;br /&gt; ((NRF_LOG_BACKEND_FLASH_START_PAGE == 0) \&lt;br /&gt; ? (CODE_PAGE_SIZE * (CEIL_DIV((uint32_t)CODE_END, CODE_PAGE_SIZE) + 1)) \&lt;br /&gt; : FLASH_LOG_START_ADDR)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/161647?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 11:49:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95fdef5c-fcfe-4e3a-86a4-3774f3478406</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You can use CODE_END as that does not guarantee that the page is empty to be used by log.&lt;/p&gt;
&lt;p&gt;You always need assign FLASH_START_PAGE to CEIL the CODE_END using below&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; (CODE_PAGE_SIZE*CEIL_DIV((uint32_t)CODE_END, CODE_PAGE_SIZE))&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/161520?ContentTypeID=1</link><pubDate>Wed, 12 Dec 2018 17:30:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfdaeb37-e4b7-4d0f-a10c-74a582ae2e84</guid><dc:creator>abhipray</dc:creator><description>&lt;p&gt;By CODE_PAGE I meant the flash page corresponding to CODE_END which is the macro for the address of the end of the code.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/161232?ContentTypeID=1</link><pubDate>Tue, 11 Dec 2018 14:14:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba2467b2-058b-419b-ba1d-781df52df742</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;what is CODE_PAGE here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/161090?ContentTypeID=1</link><pubDate>Mon, 10 Dec 2018 23:09:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff9eb92a-1e7f-462c-bfe4-6b144a2cb664</guid><dc:creator>abhipray</dc:creator><description>&lt;p&gt;I&amp;#39;m using arm-gcc. Turned out that there was an error in the linker script for the RAM section. I was not aligning one of the sections and variables were not ending up where they were supposed to, somehow corrupting the RAM. Patching the linker script fixed this particular issue where m_log_flash_fstorage was&amp;nbsp;getting corrupted.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Currently, everything looks good except for when I set the FLASH_START_PAGE to right after CODE_PAGE, then I can&amp;#39;t read logs until I clear them. As a temporary patch, I set&amp;nbsp;&lt;span&gt;FLASH_START_PAGE to CODE_PAGE+1 which seems to work.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/160880?ContentTypeID=1</link><pubDate>Mon, 10 Dec 2018 08:25:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85dc51bc-9a3b-4b33-bfcc-0f00410adc10</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;That is very strange. Which compiler are you using? looking at the code it does seem to do a memset on any structure which is related to this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/160269?ContentTypeID=1</link><pubDate>Tue, 04 Dec 2018 18:22:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33381c72-8171-4fc6-ae1e-b695d54a14b8</guid><dc:creator>abhipray</dc:creator><description>&lt;p&gt;Yes, that will work by extending the time before this situation arises again. If I increase NRF_LOG_BACKEND_PAGES, the situation is only delayed until the flash is filled up again. How can I prevent it from happening permanently? As a temporary patch, I simply don&amp;#39;t allow crashlog to enter panic mode if there is not enough room in the flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/160228?ContentTypeID=1</link><pubDate>Tue, 04 Dec 2018 14:27:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b51fd2e6-d9bf-4c2d-a68a-9a3ea940e877</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;seems like you need to increase the buffer if you want to enable crashlog and used up the backend pages before that&lt;/p&gt;
&lt;p&gt;#define NRF_LOG_BACKEND_PAGES&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/160120?ContentTypeID=1</link><pubDate>Tue, 04 Dec 2018 07:38:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec6953f2-9188-4361-84a1-2fefdd33f080</guid><dc:creator>abhipray</dc:creator><description>&lt;p&gt;Another bug I found was with&amp;nbsp;nrf_log_backend_flash_init(). It appears that m_log_flash_fstorage evt_handler is not being set. Adding&amp;nbsp;m_log_flash_fstorage.evt_handler = fstorage_evt_handler; fixes the issue where logs weren&amp;#39;t being logged properly.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Any reason why&amp;nbsp;m_log_flash_fstorage might be reset to 0x00 on entry into the&amp;nbsp;&lt;span&gt;nrf_log_backend_flash_init() function even though it is being initialized in the&amp;nbsp;NRF_FSTORAGE_DEF() declaration?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/160086?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 22:13:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4a3a958-9bd6-4f47-a733-6ae1d0b16e2f</guid><dc:creator>abhipray</dc:creator><description>&lt;p&gt;OK, found the source of the issue. When NRF_LOG_FINAL_FLUSH() is called when there&amp;#39;s no room in the flashlog, the&amp;nbsp;crashlog_marker_inject() function inside&amp;nbsp;nrf_log_backend_crashlog_panic_set() makes a call to nrf_fstorage_write(). nrf_fstorage_write() has a PARAM_CHECK call for addr_is_within_bounds() which fails. On failure, it prints to NRF_LOG_ERROR. At this point, crashlog is in panic state so it accepts that entry and tries another flash write which fails and another NRF_LOG_ERROR function is called ad infinitum/until hardfault.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;How do you suggest I patch this issue? If I disable the PARAM CHECK, then nrf_fstorage_write() succeeds and the adjacent flash page is written to which is undesirable.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/160077?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 19:52:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfba37da-6ca1-4997-8456-111bbaf5401c</guid><dc:creator>abhipray</dc:creator><description>&lt;p&gt;Some additional info-- When flashlog is filled and I comment out NRF_LOG_FINAL_FLUSH, the&amp;nbsp;rest of the firmware functions fine but it encounters this error right after booting:&lt;/p&gt;
&lt;p&gt;[00:00:12.239,000] &amp;lt;error&amp;gt; nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/160075?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 19:33:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cc4c874-2845-43b8-a4de-db72f4ff8117</guid><dc:creator>abhipray</dc:creator><description>&lt;p&gt;Any connection to this? &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/38514/nrf52840-logging-crashes-in-freertos"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/38514/nrf52840-logging-crashes-in-freertos&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/160074?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 19:32:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90f1bcb6-0085-416d-bcdd-f58178f2f082</guid><dc:creator>abhipray</dc:creator><description>&lt;p&gt;I doubled both defines:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define configMINIMAL_STACK_SIZE (1000)
#define configTOTAL_HEAP_SIZE (48000)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Again, everything is good until the flashlog gets filled. Then I see the HardFault when NRF_LOG_FINAL_FLUSH is called.&lt;br /&gt;&lt;br /&gt;How do you think the FreeRTOS heap config is related?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF LOG crashlog backend</title><link>https://devzone.nordicsemi.com/thread/160055?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 16:14:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16520597-cf27-4030-9043-b26433aa314d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Just a hunch but can you try to increase (maybe double) the below values in your FreeRTOSConfig.h file to see if that helps?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define configMINIMAL_STACK_SIZE
#define configTOTAL_HEAP_SIZE&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>