<?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>device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108658/device-reset-after-ota-update-no-mcuboo-rtt-logs</link><description>I come after this post . After following these steps i was unable to view RTT logs of the MCUBOOT. I am at Zephyr 2.6.99, nrd sdk 1.7.1 and working on OTA updates for a custum nrf52840 circuit board, that has RTT logging. The debbugger is a J-link EDU</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Mar 2024 13:46:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108658/device-reset-after-ota-update-no-mcuboo-rtt-logs" /><item><title>RE: device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/thread/474642?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2024 13:46:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:197fe58b-7be7-4341-8b4a-f2db0dbe3117</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Happy to hear you fix it.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/thread/474636?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2024 13:35:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64a96f79-3a11-476f-8401-740122ae5602</guid><dc:creator>apogatz98</dc:creator><description>&lt;p&gt;Hello Amanda,&lt;br /&gt;i just figured out that the whole issue was caused due to the following configs&lt;/p&gt;
&lt;div style="background-color:#1f1f1f;color:#cccccc;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;" data-darkreader-inline-bgcolor="" data-darkreader-inline-color=""&gt;
&lt;div&gt;CONFIG_BT_BUF_ACL_RX_SIZE=256&lt;br /&gt;
&lt;div style="background-color:#1f1f1f;color:#cccccc;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;" data-darkreader-inline-bgcolor="" data-darkreader-inline-color=""&gt;
&lt;div&gt;CONFIG_BT_L2CAP_TX_MTU=252&lt;/div&gt;
&lt;div&gt;, in my application, these values where set to 512.&lt;br /&gt;Now OTA works as expected.&lt;br /&gt;Thank you for your effort, and continuous support! This&lt;br /&gt;ticket can be closed.&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#569cd6;" data-darkreader-inline-color=""&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/thread/474630?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2024 13:22:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d60c268-7796-4b69-bfd1-30aeed7ecefc</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="apogatz98"]Keep in mind that all the above, do work with the smp_srv sample. My current issue with my application is that the either the update proccess stops (device manager progress bar freezes) or if the update is sent successfully i get the error:[/quote]
&lt;p&gt;Did you have the same changes with your application? As I explained, updating an unmodified image would get that error.&amp;nbsp;&lt;/p&gt;
[quote user="apogatz98"]Can i update to the latest Zephyr version but keep the NCS version 1.7.1.?[/quote]
&lt;p&gt;No, the NCS only supports the corresponding Zephyr version.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/thread/473358?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2024 09:03:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8489eda0-c631-449d-85ad-186ed9c75a39</guid><dc:creator>apogatz98</dc:creator><description>[quote userid="77782" url="~/f/nordic-q-a/108658/device-reset-after-ota-update-no-mcuboo-rtt-logs/472988"]&lt;p&gt;Did you modify the updated application? If so, what is that?&lt;/p&gt;
&lt;p&gt;Could elaborate on the detail what is the difference between the original and updated image? Is any config changed?&lt;/p&gt;[/quote]
&lt;p&gt;Hello Amanda. The only difference between the main application binary and the update binary is essentially:&lt;br /&gt;1)The build time. The update binary is built a few minutes later than the the main binary&lt;br /&gt;2)A print statement in the main function:&lt;br /&gt;- The update binary spams with a k timer every 2 seconds &amp;quot;I am a OTA Update&amp;quot;&lt;br /&gt;- The main binaryu spams with a ktimer every 2 seconds &amp;quot;I am an SMP Server&amp;quot;&lt;br /&gt;The ota update contains the same smp server, it&amp;#39;s just a debug message to distinguish them.&lt;br /&gt;Everythings else, is the same, even the pm_static.yml.&lt;br /&gt;Keep in mind that all the above, do work with the smp_srv sample. My current issue with my application is that the either the update proccess stops (device manager progress bar freezes) or if the update is sent successfully i get the error:&lt;br /&gt;Image in the secondary slot is not valid!&lt;br /&gt;And the device resets to the main application.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/108658/device-reset-after-ota-update-no-mcuboo-rtt-logs/472988"]Do you mean to update from NCS v1.7.1 to the latest NCS?[/quote]
&lt;p&gt;I mean, generally, is it possible to update from NCS v1..7.1 to the latest NCS but keeping the same Zephyr version?&lt;br /&gt;I think the oppostie questions makes more sense. Can i update to the latest Zephyr version but keep the NCS version 1.7.1.?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/thread/472988?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2024 14:53:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:101003a0-1de6-4826-9d3a-9570e926926f</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you modify the updated application? If so, what is that?&lt;/p&gt;
&lt;p&gt;Could elaborate on the detail what is the difference between the original and updated image? Is any config changed?&lt;/p&gt;
&lt;p&gt;If you update the image without modification,&amp;nbsp;&lt;span&gt;&lt;span dir="ltr"&gt;it will not be valied.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="apogatz98"]Can i use the latest NCS sdk while i am at Zephyr 2.6.99, or shoud they updated together ?[/quote]
&lt;p&gt;Do you mean to update from NCS v1.7.1 to the latest NCS? If so, it&amp;#39;s possible with the same memory lay by&amp;nbsp;pm_static.yml.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="apogatz98"]We have tried to move to a newer Zephyr version, so we can enjoy the latest NCS sdk, but the transition is rough since we are using I2C DMA and the custom driver used fot that is written with NCS sdk 1.7.1.[/quote]
&lt;p&gt;If you want to move to the latest NCS, you have to migrate the custom driver to be compatible with the latest version. Here are the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/releases_and_maturity/migration_guides.html"&gt;Migration guides&lt;/a&gt;, but I would suggest migrating to v2.0.0 for the first step since there are some big changes in v2.0.0.&amp;nbsp; Make sure the application can run with the latest NCS without issue, and then add the DFU features to test.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/thread/472255?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2024 14:14:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe31b881-73bb-4e88-9cd5-4b85c27b1abc</guid><dc:creator>apogatz98</dc:creator><description>&lt;p&gt;Hello Amanda,&lt;br /&gt;the &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/applications/matter_weather_station/configuration/thingy53_nrf5340_cpuapp/pm_static.yml"&gt;sample_pm_static.yml&lt;/a&gt;&amp;nbsp;file that you provided, appears to be invalid (i get error 404 file not found)&lt;br /&gt;I did copy the partitions.yml from /build directory of my project inside my project directory.&lt;br /&gt;Basicaly i get this behavior:&lt;br /&gt;- when my OTA update fails (Device Manager application&amp;#39;s progress bar stops) i notice that the secondary partition that is reserved for the OTA update binary, is filled partialy.&amp;nbsp;&lt;br /&gt;OTA update fails frequently though... i do not get any log for this failure.&lt;br /&gt;- when my OTA update seems to have been send (progress bar is full) , same behavior as previously. My application resets, and seconadary partition is empty!&lt;br /&gt;Here is my pm_static.yml:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;app:
  address: 0xc200
  end_address: 0x83000
  region: flash_primary
  size: 0x76e00
littlefs_storage:
  address: 0xfa000
  end_address: 0x100000
  placement:
    before:
    - end
  region: flash_primary
  size: 0x6000
mcuboot:
  address: 0x0
  end_address: 0xc000
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xc000
mcuboot_pad:
  address: 0xc000
  end_address: 0xc200
  placement:
    align:
      start: 0x1000
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0xc000
  end_address: 0x83000
  orig_span: &amp;amp;id001
  - app
  - mcuboot_pad
  region: flash_primary
  sharers: 0x1
  size: 0x77000
  span: *id001
mcuboot_primary_app:
  address: 0xc200
  end_address: 0x83000
  orig_span: &amp;amp;id002
  - app
  region: flash_primary
  size: 0x76e00
  span: *id002
mcuboot_secondary:
  address: 0x83000
  end_address: 0xfa000
  placement:
    after:
    - mcuboot_primary
    align:
      start: 0x1000
  region: flash_primary
  share_size:
  - mcuboot_primary
  size: 0x77000
sram_primary:
  address: 0x20000000
  end_address: 0x20040000
  region: sram_primary
  size: 0x40000&lt;/pre&gt;&lt;br /&gt;My ota update binary also has static partitioning, same way as my primary application.&lt;br /&gt;&lt;br /&gt;Also i got another question about NCS sdk version. Can i use the latest NCS sdk while i am at Zephyr 2.6.99, or shoud they updated together ?&lt;br /&gt;We have tried to move to a newer Zephyr version, so we can enjoy the latest NCS sdk, but the transition is rough since we are using I2C DMA and the custom driver used fot that is written with NCS sdk 1.7.1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/thread/471123?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2024 18:54:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58a4a3a4-00b8-45de-9702-10b0a3393448</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you update the file with modifications?&lt;/p&gt;
&lt;p&gt;Do you update the file with the same memory layout?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To perform DFU, you must&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html#ug-pm-static"&gt;&lt;span&gt;define a static partition map&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;because the dynamically generated partitions can change between builds. This is also important when you use a precompiled HEX file as a child image instead of building it. In such cases, the newly generated application images may no longer use a partition map compatible with the partition map used by the bootloader. As a result, the newly built application image may not be bootable by the bootloader. See&lt;/span&gt;&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders/bootloader.html#static-partition-requirement-for-dfu"&gt;&lt;span&gt;Static&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;partition&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;requirement&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;for&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;DFU&lt;/span&gt;&lt;/a&gt;&amp;nbsp;doc.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To create pm_static, I would start by doing the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/applications/matter_weather_station/configuration/thingy53_nrf5340_cpuapp/pm_static.yml"&gt;sample_pm_static.yml&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Open your old build/partitions.yml&lt;/li&gt;
&lt;li&gt;Observe that the content in the autogenerated file is similar to the pm_static file from the two files above.&lt;/li&gt;
&lt;li&gt;Open &amp;lt;your_project&amp;gt;/pm_static.yml&lt;/li&gt;
&lt;li&gt;Copy app and mcuboot content from partitions.yml to pm_static.yml&lt;/li&gt;
&lt;li&gt;Compare with sample_pm_static.yml and remove all parts of yml that are not needed (such as end_address)&lt;/li&gt;
&lt;li&gt;Try to build the project.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Please be aware that NCS&lt;span&gt;&amp;nbsp;1.7.1 is pretty old. I would suggest you move to the latest version NCS v2.5.2 for bug fixings.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/thread/471100?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2024 16:01:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02d4516d-d930-49e9-8842-83e02263abf8</guid><dc:creator>apogatz98</dc:creator><description>&lt;p&gt;Hello Amanda, i followed your suggestion on using UART for debugging. I resorted on using the nrf52840dk.&lt;br /&gt;i got these logs from mcuboot:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v2.6.99-ncs1-1  ***

I: Starting bootloader

I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3

I: Secondary image: magic=good, swap_type=0x3, copy_done=0x3, image_ok=0x1

I: Boot source: none

I: Swap type: perm

E: Image in the secondary slot is not valid!

I: Bootloader chainload address offset: 0xc000

I: Jumping to the first image slot

&lt;/pre&gt;&lt;br /&gt;after that my device resets to the original flashed binary as i decribed earlier. I also check the flash &lt;br /&gt;memory map with the nrf connect programmer app, and to me surprise, the secondary slot was empty.&lt;br /&gt;I other words, the flash map was the same before and after the OTA update.&lt;br /&gt;&lt;br /&gt;For referenece these are the UART logs i got when i managed to perform an OTA update with the smp_srv sample using overlay-bt.conf :&lt;br /&gt;&lt;img style="max-height:534px;max-width:482px;" height="534" src="https://devzone.nordicsemi.com/resized-image/__size/964x1068/__key/communityserver-discussions-components-files/4/pastedimage1709049200230v1.png" width="482" alt=" " /&gt;&lt;br /&gt;How can i approach this &amp;quot;Image in the secondary slot is not valid!&amp;quot; error ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/thread/470958?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2024 09:16:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e2dbbe3-dbc7-40bb-be47-c35680e58569</guid><dc:creator>apogatz98</dc:creator><description>&lt;p&gt;It&amp;#39;s true, on nrf52840 DK, i was able to see bootloader logs from uart.&lt;br /&gt;My custom circuit board has a only a 6pin jtag connector, no usb output. &lt;br /&gt;Is it possible to debug through UART ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/thread/470881?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 22:21:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca8e4b69-27dd-4683-a975-79eb4a7d84a5</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;I would suggest you use UART for debug logs to avoid potential issues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/thread/470768?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 13:50:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f5c335d-956e-4fbb-aa04-b255f3e42e3e</guid><dc:creator>apogatz98</dc:creator><description>&lt;p&gt;Hello Amanda,&lt;br /&gt;as i said, i&amp;nbsp; allready followed the changes of the post that you provided.&lt;br /&gt; The only change i had to was to comment:&lt;br /&gt;CONFIG_BOOT_ENCRYPT_IMAGE=n&lt;br /&gt;in prf.conf of bootloader&lt;br /&gt;since at build time i got this error:ncs/bootloader/mcuboot/boot/zephyr/prj.conf:7: warning: attempt to assign the value &amp;#39;n&amp;#39; to the undefined symbol BOOT_ENCRYPT_IMAGE&lt;/p&gt;
&lt;p&gt;error: Aborting due to Kconfig warnings&lt;br /&gt;&lt;br /&gt;Here is my child_image\mcuboot.conf:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000

# Disable UART Console and enable the RTT console
CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y

# Config logger
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n

CONFIG_MULTITHREADING=y&lt;/pre&gt;&lt;br /&gt;Thank you for your time!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device reset after OTA update, no MCUBOO rtt logs</title><link>https://devzone.nordicsemi.com/thread/470755?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 13:34:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13231b8f-d706-4896-8733-da06235436f5</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Check out &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/84936/add-rtt-logs-to-mcuboot"&gt;this post&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If that cannot help, please provide the&amp;nbsp;&lt;span&gt;child_image\mcuboot.conf.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>