<?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>MCUboot loses pending update image in slot 1 after reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111974/mcuboot-loses-pending-update-image-in-slot-1-after-reset</link><description>I&amp;#39;m trying to download and flash an MCUboot image at runtime. All goes well, the image is flashed to the secondary slot, confirmed, and marked for upgrade. The secondary slot is in external spi flash. On reboot MCUboot has no knowledge of the secondary</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 15 Jun 2024 16:15:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111974/mcuboot-loses-pending-update-image-in-slot-1-after-reset" /><item><title>RE: MCUboot loses pending update image in slot 1 after reset</title><link>https://devzone.nordicsemi.com/thread/488951?ContentTypeID=1</link><pubDate>Sat, 15 Jun 2024 16:15:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f783828a-3d1a-4bdc-a16a-55c99199b4a8</guid><dc:creator>Voxorin</dc:creator><description>&lt;p&gt;I have confirmed the issue was due to an improperly signed image generated by the CI.&lt;/p&gt;
&lt;p&gt;The image wasn&amp;#39;t signed correctly because I forgot to ensure the correct NRF python dependencies were installed.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the zephyrproject-rtos/ci-base which has the Zephyr python dependencies preinstalled but not the dependencies required for Nordic&amp;#39;s version of MCUboot.&lt;/p&gt;
&lt;p&gt;Adding this to the image solved my issue:&lt;br /&gt;&lt;pre class="ui-code" data-mode="xml"&gt;- name: Update Python dependencies
    run: |
      pip install -r zephyr/scripts/requirements.txt
      pip install -r nrf/scripts/requirements.txt
      pip install -r bootloader/mcuboot/scripts/requirements.txt&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot loses pending update image in slot 1 after reset</title><link>https://devzone.nordicsemi.com/thread/488933?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2024 21:20:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a95eeb9d-743e-43ab-b933-b90cfb58c56a</guid><dc:creator>Voxorin</dc:creator><description>&lt;p&gt;It turns out the image actually isn&amp;#39;t valid. Something must be different about the CI build env.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot loses pending update image in slot 1 after reset</title><link>https://devzone.nordicsemi.com/thread/488906?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2024 15:05:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a7a596d-8ec5-42ac-b890-eebe4a7933f0</guid><dc:creator>Voxorin</dc:creator><description>&lt;p&gt;Here&amp;#39;s a less verbose log:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;inf&amp;gt; mcuboot: Starting bootloader
&amp;lt;inf&amp;gt; mcuboot: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
&amp;lt;inf&amp;gt; mcuboot: Secondary image: magic=good, swap_type=0x3, copy_done=0x3, image_ok=0x1
&amp;lt;inf&amp;gt; mcuboot: Boot source: none
&amp;lt;inf&amp;gt; mcuboot: Image index: 0, Swap type: perm
&amp;lt;err&amp;gt; mcuboot: Image in the secondary slot is not valid!
&amp;lt;inf&amp;gt; mcuboot: Bootloader chainload address offset: 0x20000
&amp;lt;inf&amp;gt; mcuboot: Jumping to the first image slot&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot loses pending update image in slot 1 after reset</title><link>https://devzone.nordicsemi.com/thread/488898?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2024 14:27:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27345cc7-26ab-491b-90a9-ef3885f134d5</guid><dc:creator>Voxorin</dc:creator><description>&lt;p&gt;It took me a bit to get MCUboot logging working, but I finally saw a useful message: &lt;span style="background-color:#999999;"&gt;mcuboot: Image in the secondary slot is not valid!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;It isn&amp;#39;t obvious to me why the image isn&amp;#39;t valid.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s (part of) the stack trace:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:10.471,740] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20005130 - rx_bufs 0x20005138 - 1␛[0m
[00:00:10.473,358] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20005140 (2), current_rx 0x20005140 (2), tx buf/len 0x20005128/1, rx buf/len 0x20005128/1␛[0m
[00:00:10.475,769] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_tx: tx buf/len 0x20005177/1␛[0m
[00:00:10.476,989] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x20005177/1␛[0m
[00:00:10.478,179] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_tx: tx buf/len (nil)/0␛[0m
[00:00:10.479,339] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_rx: rx buf/len (nil)/0␛[0m
[00:00:10.480,468] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: finish_transaction: Transaction finished with status 0␛[0m
[00:00:10.481,781] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20005130 - rx_bufs 0x20005138 - 1␛[0m
[00:00:10.483,428] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20005140 (2), current_rx 0x20005140 (2), tx buf/len 0x20005128/1, rx buf/len 0x20005128/1␛[0m
[00:00:10.485,839] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_tx: tx buf/len 0x20005177/1␛[0m
[00:00:10.487,030] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x20005177/1␛[0m
[00:00:10.488,250] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_tx: tx buf/len (nil)/0␛[0m
[00:00:10.489,379] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_rx: rx buf/len (nil)/0␛[0m
[00:00:10.490,539] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: finish_transaction: Transaction finished with status 0␛[0m
[00:00:10.491,851] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20005130 - rx_bufs 0x20005138 - 1␛[0m
[00:00:10.493,499] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20005140 (2), current_rx 0x20005140 (2), tx buf/len 0x20005128/1, rx buf/len 0x20005128/1␛[0m
[00:00:10.495,910] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_tx: tx buf/len 0x20005177/1␛[0m
[00:00:10.497,100] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x20005177/1␛[0m
[00:00:10.498,321] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_tx: tx buf/len (nil)/0␛[0m
[00:00:10.499,450] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_rx: rx buf/len (nil)/0␛[0m
[00:00:10.500,610] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: finish_transaction: Transaction finished with status 0␛[0m
[00:00:10.501,922] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20005130 - rx_bufs 0x20005138 - 1␛[0m
[00:00:10.503,570] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20005140 (2), current_rx 0x20005140 (2), tx buf/len 0x20005128/1, rx buf/len 0x20005128/1␛[0m
[00:00:10.505,950] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_tx: tx buf/len 0x20005177/1␛[0m
[00:00:10.507,171] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x20005177/1␛[0m
[00:00:10.508,392] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_tx: tx buf/len (nil)/0␛[0m
[00:00:10.509,521] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_rx: rx buf/len (nil)/0␛[0m
[00:00:10.510,681] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: finish_transaction: Transaction finished with status 0␛[0m
[00:00:10.511,993] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20005130 - rx_bufs 0x20005138 - 1␛[0m
[00:00:10.513,610] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20005140 (2), current_rx 0x20005140 (2), tx buf/len 0x20005128/1, rx buf/len 0x20005128/1␛[0m
[00:00:10.516,021] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_tx: tx buf/len 0x20005177/1␛[0m
[00:00:10.517,211] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_rx: rx buf/len 0x20005177/1␛[0m
[00:00:10.518,432] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_tx: tx buf/len (nil)/0␛[0m
[00:00:10.519,592] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_rx: rx buf/len (nil)/0␛[0m
[00:00:10.520,721] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: finish_transaction: Transaction finished with status 0␛[0m
[00:00:10.522,033] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: tx_bufs 0x20005140 - rx_bufs (nil) - 1␛[0m
[00:00:10.523,620] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_buffers_setup: current_tx 0x20005150 (1), current_rx (nil) (0), tx buf/len 0x20005138/1, rx buf/len (nil)/0␛[0m
[00:00:10.525,878] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: spi_context_update_tx: tx buf/len (nil)/0␛[0m
[00:00:10.527,038] ␛[0m&amp;lt;dbg&amp;gt; spi_nrfx_spim: finish_transaction: Transaction finished with status 0␛[0m
[00:00:10.528,320] ␛[1;31m&amp;lt;err&amp;gt; mcuboot: Image in the secondary slot is not valid!␛[0m
[00:00:10.583,068] ␛[0m&amp;lt;inf&amp;gt; mcuboot: Bootloader chainload address offset: 0x20000␛[0m
[00:00:10.584,259] ␛[0m&amp;lt;inf&amp;gt; mcuboot: Jumping to the first image slot␛[0m&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot loses pending update image in slot 1 after reset</title><link>https://devzone.nordicsemi.com/thread/488492?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2024 12:24:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6e8e5e0-f084-4e7d-87d6-1dfddddf8563</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I would have expected &lt;span&gt;MCUboot&amp;nbsp;&lt;/span&gt;to swap here.&lt;/p&gt;
[quote user=""]My `mcuboot.conf`:[/quote]
&lt;p&gt;Could you try to enable logging for MCUboot&amp;nbsp;? The MCUboot log should hopefully be able to tell us more about what is happening.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Enable logging
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>