<?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>Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72064/logs-from-the-qspi-application-using-xip</link><description>Hi, 
 I want to run QSPI application example on my nRF52840DK (PCA10056) board with logs seen via UART. I successfully uploaded QSPI bootloader example and Blinky SysTick example to my board. It&amp;#39;s running ok and I can see the logs from QSPI bootloader</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Mar 2021 13:05:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72064/logs-from-the-qspi-application-using-xip" /><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/299789?ContentTypeID=1</link><pubDate>Mon, 15 Mar 2021 13:05:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34f6d4d5-60b2-4238-a89b-c50e9e81c831</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Mula,&lt;/p&gt;
&lt;p&gt;Unfortunately no, the team is working on NCS and are quite busy. Since this issue is with logs only and not a stopper for development, they will look into it when they have time. This will now be registered as a bug on NRF_LOG with QSPI example, but i do not know when it will be picked up. So i suggest you continue your development without the logs until I update this case here. I cannot change the timeline of when the team picks up this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/299696?ContentTypeID=1</link><pubDate>Mon, 15 Mar 2021 09:29:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2381525-4d9d-4423-bc3f-80545d6a0f08</guid><dc:creator>arekwizz</dc:creator><description>[quote userid="6207" url="~/f/nordic-q-a/72064/logs-from-the-qspi-application-using-xip/297824#297824"]need to wait for an QSPI expert to look into this.[/quote]
&lt;p&gt;Hi Susheel Nuguru,&lt;/p&gt;
&lt;p&gt;Has the QSPI expert looked into this?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/297831?ContentTypeID=1</link><pubDate>Thu, 04 Mar 2021 13:48:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c407ae3-b932-4264-be1d-2c592de61272</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I have disabled the logs in ble_systick and everything works as normal.&amp;nbsp;Please disable logs until I come back to you with more information. not able to use logs is temporarily inconvenient but should not stop you from developing your product. It seems that i have to review the stack frames one by one to be able to stop what went wrong and when. Might take some time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/297824?ContentTypeID=1</link><pubDate>Thu, 04 Mar 2021 13:36:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e5c0a67-9ccc-4ef4-92e2-59f4405c7357</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;changing the RAM size and start address did not have any effect, still seeing the hardfault with the SP pointing to the wrong frame. At this point i am out of theories and need to wait for an QSPI expert to look into this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/297813?ContentTypeID=1</link><pubDate>Thu, 04 Mar 2021 13:17:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:856ce3c1-2fa4-43c0-a4d3-bbdec358c52a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I can see a corrupted stack frame since the hardfault is now pointing to the PC address 0x8 which does not makes sense. Could this be because of the overlap o RAM addresses we were using for the bootloader and the QSPI application? I need to test changing the RAM start addresses and sizes for both&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/297704?ContentTypeID=1</link><pubDate>Thu, 04 Mar 2021 09:12:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f4a5523-a5bf-43a4-a52f-01123edb8794</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Mula,&lt;/p&gt;
&lt;p&gt;I have trouble debugging the code when I&amp;nbsp; move the application to 0x1201000. If it is the logs that are causing the problem, please disable the logs temporarily. Not a good workaround but will buy both of us some time. I would need more time to see why this hardfault happens as I need to involve more people in this.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/297452?ContentTypeID=1</link><pubDate>Wed, 03 Mar 2021 10:56:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fc4e727-39f4-4398-a007-c5b1d642dff2</guid><dc:creator>arekwizz</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Susheel Nuguru&lt;/p&gt;
[quote userid="6207" url="~/f/nordic-q-a/72064/logs-from-the-qspi-application-using-xip/297208#297208"]I will try using Ozone as i am not good with debugging with gdb[/quote]
&lt;p&gt;What is the progress of debugging the problem from your side?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry for me being impatient, but it&amp;#39;s a quite big project, and I&amp;#39;m stuck and blocked at the moment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/297244?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 14:53:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa685046-07c5-401c-a75c-a2286c56fa03</guid><dc:creator>arekwizz</dc:creator><description>&lt;p&gt;&lt;span&gt;I want to use an external flash for the OTA update, we want to have 2 programs in the external flash in case we want to restore software to the previous version for some reason. Bootloader shall select which program it needs to start. The plan is that bootloader will read which program it needs to start from FDS(flash data storage) or any other permanent storage.&amp;nbsp; I develop the firmware for a device that is located in a hard to access location and having a backup procedure for OTA update is a required feature. I looked at the documentation of nRF52840 and I think that the solution should work.&amp;nbsp; I used GDB and Qt Creator to debug the project.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/297208?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 13:41:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21f86f42-2a0a-407c-be0c-bc93558c0a45</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I am able to reproduce your issue after changing the base address in the linker file and in the bootloader app. I am not sure yet what causes this but this needs some debugging. But why do you need to change the base address of the application? Technically it should run finie, but i am guessing that that one of the two example have a bug that do not bode well with this configuration change.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How are you debugging your application?&amp;nbsp;Are you using a debugger with a mode to just latch to the running program? I tried to use SES which did not work. I will try using Ozone as i am not good with debugging with gdb&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/297153?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 11:51:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:327a0004-2db1-4c37-b78a-5475143894c8</guid><dc:creator>arekwizz</dc:creator><description>[quote userid="6207" url="~/f/nordic-q-a/72064/logs-from-the-qspi-application-using-xip/297146#297146"]&lt;p&gt;I do not see any hardfaults, but i also do not see any logs from blinky systick example pushed to uart.&lt;/p&gt;
&lt;p&gt;I modified the sdk_config.h file with the same variables like you did, but there is no hardfault.&lt;/p&gt;[/quote]
&lt;p&gt;I forgot to mention that the hard fault appeared when I moved the program in the memory of external flash. To do that I changed flash origin in gcc_nrf52.ld linker script of BlinkySysTick example:&lt;br /&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;MEMORY
{
  FLASH (rx) : ORIGIN = 0x12010000, LENGTH = 0x100000
  RAM (rwx) :  ORIGIN = 0x20000000, LENGTH = 0x40000
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And I&amp;#39;ve also changed&amp;nbsp;QSPI_XIP_START_ADDR in qspi_bootloader main.c file to:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define QSPI_XIP_START_ADDR      0x12010000&lt;/pre&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;When the program was moved from the beginning of external flash memory as you can see above the hard fault appeared. When the program was put at the beginning of external flash memory, then there was no hard fault but the UART logs also didn&amp;#39;t show up.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/297146?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 11:25:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1423085-75df-47a3-bdae-90b2342d84bf</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Arkadiusz Mula,&lt;/p&gt;
&lt;p&gt;I tried adding NRF_LOGS for blink_systick_qspi example with uarte used.&lt;/p&gt;
&lt;p&gt;I do not see any hardfaults, but i also do not see any logs from blinky systick example pushed to uart.&lt;/p&gt;
&lt;p&gt;I modified the sdk_config.h file with the same variables like you did, but there is no hardfault.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/297041?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 07:18:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80a616e9-57a0-4f49-9f31-db9f1a7fe2a1</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Sorry, i did not get to verify this. Checking this today, I promise that i won&amp;#39;t postpone looking into this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/296889?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 14:17:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33b0cb03-7e95-4583-aeab-a46f1bf58120</guid><dc:creator>arekwizz</dc:creator><description>[quote userid="6207" url="~/f/nordic-q-a/72064/logs-from-the-qspi-application-using-xip/296576#296576"]&lt;p&gt;I will try this example on my desk on monday and will come back to you with my observations.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Have you found something?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/296609?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 15:27:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e319635b-e4df-4144-a7d1-b259a1af801b</guid><dc:creator>arekwizz</dc:creator><description>[quote userid="6207" url="~/f/nordic-q-a/72064/logs-from-the-qspi-application-using-xip/296576#296576"]Until then you can narrow down to the specific instruction inside&amp;nbsp;&lt;span&gt;nrf_fprintf_fmt which is causing the hardfault by starting the code in the debug mode?&lt;/span&gt;[/quote]
&lt;pre&gt;c&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;p_fmt&lt;span&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/296576?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 13:57:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20384ef7-41e3-44f0-a2c8-c8e4d51d68fe</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user=""]But when I add logs to the Blinky SysTick example then the QSPI bootloader works fine (I can see the logs from QSPI bootloader), but the program from external flash crashes on line 613 in&amp;nbsp;nrf_fprintf_fmt()&amp;nbsp;function from nrf_fprintf_format.c file, after NRF_LOG_FLUSH() call and I can&amp;#39;t see the logs.&amp;nbsp;[/quote]
&lt;p&gt;That seems strange, I have not run this example before, but it seems like it is not designed to run with the logs. Why not, I am not sure,&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will try this example on my desk on monday and will come back to you with my observations.&lt;/p&gt;
&lt;p&gt;Until then you can narrow down to the specific instruction inside&amp;nbsp;&lt;span&gt;nrf_fprintf_fmt which is causing the hardfault by starting the code in the debug mode?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logs from the QSPI application using XiP</title><link>https://devzone.nordicsemi.com/thread/296560?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 13:27:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:299fba4f-09ec-491c-a57a-39f17b4c105a</guid><dc:creator>arekwizz</dc:creator><description>&lt;p&gt;I will add more depth to my problem.&lt;/p&gt;
&lt;p&gt;I need to run firmware from external flash and store a new firmware for OTA there with the ability to switch between 2 firmware runtimes. I use the newest SDK17 version downloaded from your website a few days ago.&lt;/p&gt;
&lt;p&gt;What I did to this point:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Run example program on internal flash and was able to observe the logs on UART(both for&amp;nbsp;JLink USB output and UART PIN6)&lt;/li&gt;
&lt;li&gt;Run QSPI example bootloader on internal flash and Blinky SysTick example on the external flash. It worked and I saw LEDs blink. (I could see bootloader logs on UART)&lt;/li&gt;
&lt;li&gt;Modify blinky example to log something to UART (problem started here)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So the problem is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;UART logger prints only bootloader logs correctly&lt;/li&gt;
&lt;li&gt;Application from external flash prints random sign when the program is flashed to the begging of the external flash&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Application from external flash crashes when the program is flashed to the other part of the external flash. Application crashes on&amp;nbsp;&lt;span&gt;&amp;nbsp;line 613 in&amp;nbsp;nrf_fprintf_fmt(). Because of some empty string format. (p_fmt = &amp;quot;&amp;quot;)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;I use CMake to build the program and nrfjprog to flash the device&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m happy to provide all the necessary information. We can set up a&amp;nbsp; meeting where I can show you the problem if it is required.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I attach my programs:&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/QSPI_5F00_bootloader.zip"&gt;devzone.nordicsemi.com/.../QSPI_5F00_bootloader.zip&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/BlinkySysTick.zip"&gt;devzone.nordicsemi.com/.../BlinkySysTick.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>