<?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>nrf52832: MCUboot in NCS v2.5.1 with direct-xip-revert takes ~800 ms to load an image</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107591/nrf52832-mcuboot-in-ncs-v2-5-1-with-direct-xip-revert-takes-800-ms-to-load-an-image</link><description>I am running a nrf52832 with MCUboot in NCS v2.5.1 using direct-xip-revert (I have also tried this with other boot methods, including swap and swap with scratch). 
 I have found that in all cases, MCUboot takes roughly 700-800 ms to boot an image. With</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Mar 2024 18:45:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107591/nrf52832-mcuboot-in-ncs-v2-5-1-with-direct-xip-revert-takes-800-ms-to-load-an-image" /><item><title>RE: nrf52832: MCUboot in NCS v2.5.1 with direct-xip-revert takes ~800 ms to load an image</title><link>https://devzone.nordicsemi.com/thread/476013?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 18:45:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e0b68bc-b3af-4539-87c3-f261a901f8f0</guid><dc:creator>jrhaws</dc:creator><description>&lt;p&gt;Yeah, no signature is not an option. And I am already running off the internal clock instead of the crystal.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll look into getting hard measurements from the time power is available on the rail to my code running. Right now all I know is that have to provide power for at least 750 ms before I can connect to the device.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll get more data and report back.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832: MCUboot in NCS v2.5.1 with direct-xip-revert takes ~800 ms to load an image</title><link>https://devzone.nordicsemi.com/thread/476009?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 18:03:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bc4a3d9-279c-4854-940e-901527f9e277</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi jrhaws,&lt;/p&gt;
&lt;p&gt;If you want to skip the validation step to save boot time, you can look into &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v2.0.99-ncs1/boot/zephyr/Kconfig#L75-L77"&gt;CONFIG_BOOT_SIGNATURE_TYPE_NONE&lt;/a&gt;. However, this is really not recommended, because it compromises too much security.&lt;/p&gt;
&lt;p&gt;Instead, could you please take a look at the discussion in the DevZone case linked below and see if the ideas there&amp;nbsp;can help you?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/88787/mcuboot-boot-time"&gt;MCUBOOT Boot time&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;span&gt;Please&amp;nbsp;be informed&lt;/span&gt;&lt;span&gt;&amp;nbsp;that our team is currently having reduced availability due to the Easter holiday. There will be some delays in our response during this time, but&amp;nbsp;we will respond to you at the earliest opportunity.&amp;nbsp;Our apologies for the inconvenience.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832: MCUboot in NCS v2.5.1 with direct-xip-revert takes ~800 ms to load an image</title><link>https://devzone.nordicsemi.com/thread/475201?ContentTypeID=1</link><pubDate>Thu, 21 Mar 2024 15:58:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5d0ac9a-7867-48c1-a9d4-0db672149bd2</guid><dc:creator>jrhaws</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;I finally got around to testing this, and I&amp;#39;m getting warnings in my build and the setting is not getting set.&amp;nbsp;My previous testing was just that the option didn&amp;#39;t break the build - it doesn&amp;#39;t break it because it doesn&amp;#39;t actually get set!&lt;/p&gt;
&lt;p&gt;Enabling&amp;nbsp;CONFIG_BOOT_VALIDATE_SLOT0_ONCE does not take effect unless I DISABLE&amp;nbsp; CONFIG_BOOT_VALIDATE_SLOT0 and also ENABLE&amp;nbsp;CONFIG_SINGLE_APPLICATION_SLOT.&lt;/p&gt;
&lt;p&gt;This is not what I want to do because&amp;nbsp;when I do, it disables direct-xip bootloader.&lt;/p&gt;
&lt;p&gt;Any other thoughts on how we can speed this up?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832: MCUboot in NCS v2.5.1 with direct-xip-revert takes ~800 ms to load an image</title><link>https://devzone.nordicsemi.com/thread/469482?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2024 12:13:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08801481-577d-40f1-9709-7649d2f6a27c</guid><dc:creator>Hakon</dc:creator><description>[quote user="jrhaws"]Will this configuration option only validate that slot once as well?[/quote]
&lt;p&gt;I believe it should do that, but you should probably test this to be sure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832: MCUboot in NCS v2.5.1 with direct-xip-revert takes ~800 ms to load an image</title><link>https://devzone.nordicsemi.com/thread/468147?ContentTypeID=1</link><pubDate>Thu, 08 Feb 2024 23:08:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5eda4f09-216b-41dc-883e-2b937256318e</guid><dc:creator>jrhaws</dc:creator><description>&lt;p&gt;I can confirm that this does allow me to set that option and build. I will do some testing to be certain that it does what I want it to, but I do have a follow up question.&lt;/p&gt;
&lt;p&gt;Can you confirm that this will only validate the slots once? I am operating in direct-xip-revert mode in MCUboot, so will boot from slot 1 when that is where the image resides. Will this configuration option only validate that slot once as well?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832: MCUboot in NCS v2.5.1 with direct-xip-revert takes ~800 ms to load an image</title><link>https://devzone.nordicsemi.com/thread/467926?ContentTypeID=1</link><pubDate>Wed, 07 Feb 2024 13:10:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a4e4473-a8a1-49ac-aaff-e3f93b7766a3</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Sorry for the confusion, the config should be CONFIG_BOOT_VALIDATE_SLOT0_ONCE. &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/v1.10.99-ncs1-2/boot/zephyr/include/mcuboot_config/mcuboot_config.h#L58"&gt;It defines MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832: MCUboot in NCS v2.5.1 with direct-xip-revert takes ~800 ms to load an image</title><link>https://devzone.nordicsemi.com/thread/466829?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2024 17:58:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b170f41-191e-4b03-8506-d975a19f68e8</guid><dc:creator>jrhaws</dc:creator><description>&lt;p&gt;Hakon - any more thoughts on this? I&amp;#39;m stuck, having tried everything I can find in the docs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832: MCUboot in NCS v2.5.1 with direct-xip-revert takes ~800 ms to load an image</title><link>https://devzone.nordicsemi.com/thread/466314?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 22:42:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03590d36-c676-4b4f-8f68-61e46f6f99f5</guid><dc:creator>jrhaws</dc:creator><description>&lt;p&gt;I did give that a try, but it seems that results in build failure. I get similar errors when building with it in proj.conf and mcuboot.conf. I think it belongs in prj.conf, but the docs are not clear.&amp;nbsp;&amp;nbsp;Either way, it will not build with that set.&lt;/p&gt;
&lt;p&gt;I also tried setting it in my CMakeLists.txt (which has the same effect as putting it directly in prj.conf) and I get the same errors.&lt;/p&gt;
&lt;p&gt;Am I not using/setting it correctly?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:/git/brickyard_pru/communication/pru_app/child_image/mcuboot.conf:6: warning: attempt to assign the value &amp;#39;y&amp;#39; to the undefined symbol MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE

error: Aborting due to Kconfig warnings&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832: MCUboot in NCS v2.5.1 with direct-xip-revert takes ~800 ms to load an image</title><link>https://devzone.nordicsemi.com/thread/466270?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 14:54:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4a112be-362c-4988-9aee-991d1456ee55</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I believe you can set MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE=y, as mentioned &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/design.html#integrity-check"&gt;here&lt;/a&gt;. This can potentially reduce the boot time by a few seconds.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832: MCUboot in NCS v2.5.1 with direct-xip-revert takes ~800 ms to load an image</title><link>https://devzone.nordicsemi.com/thread/465872?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2024 17:44:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14c05077-2f46-4702-a29b-f228438457d6</guid><dc:creator>jrhaws</dc:creator><description>&lt;p&gt;I have been able to cut my boot time in half&amp;nbsp;with this mcuboot.conf and prj.conf. The biggest help was to use the internal RC oscillator for MCUboot as well.&lt;/p&gt;
&lt;p&gt;Is there anything else I can do to speed things up? Is there a way I can just have the image validated once, instead of everytime (fully understanding the security implications)?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#child_image/mcuboot.conf
CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
CONFIG_BOOT_DIRECT_XIP=y
CONFIG_BOOT_DIRECT_XIP_REVERT=y

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_MULTITHREADING=y
CONFIG_LOG=n
CONFIG_SERIAL=n
CONFIG_CONSOLE=n
CONFIG_PRINTK=n

# From Nordic to disable Crypto RNG
CONFIG_HW_CC3XX=n
CONFIG_ENTROPY_CC3XX=n
CONFIG_ENTROPY_NRF5_RNG=y
CONFIG_CC3XX_BACKEND=n
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# build configuration options
CONFIG_COMPILER_WARNINGS_AS_ERRORS=y

# drivers
CONFIG_FPU=y
CONFIG_WATCHDOG=y
CONFIG_NRFX_TWIS1=y
CONFIG_SPI=y
CONFIG_SPI_SLAVE=y
CONFIG_FLASH=y

# dfu and mcuboot
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_STREAM_FLASH_ERASE=y
CONFIG_FLASH_MAP=y
CONFIG_STREAM_FLASH=y
CONFIG_MCUBOOT_IMG_MANAGER=y
CONFIG_IMG_MANAGER=y
CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT=y

# Enable the BLE stack with GATT Server configuration
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SMP=y
CONFIG_BT_GATT_DYNAMIC_DB=y
CONFIG_BT_DEVICE_NAME=&amp;quot;MyDevice&amp;quot;
CONFIG_BT_LIM_ADV_TIMEOUT=60
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_BT_RX_STACK_SIZE=1536

# Enable time slicing and multithreading
CONFIG_TIMESLICING=y
CONFIG_TIMESLICE_SIZE=2
CONFIG_MULTITHREADING=y

# Disable Bluetooth features not needed
CONFIG_BT_PHY_UPDATE=n
CONFIG_BT_GATT_CACHING=n
CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=n
CONFIG_BT_HCI_VS_EXT=n


# Reduce Bluetooth buffers
CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT=4
CONFIG_BT_BUF_EVT_RX_COUNT=8
CONFIG_BT_L2CAP_TX_BUF_COUNT=16
# CONFIG_BT_CTLR_TX_PWR_MINUS_8=y

# libraries
CONFIG_MINIMAL_LIBC_RAND=y

# debug options
# CONFIG_BT_DEBUG_LOG=y
# CONFIG_ASSERT=y
# CONFIG_DEBUG_THREAD_INFO=y
# CONFIG_DEBUG_OPTIMIZATIONS=y
# CONFIG_SHELL=y
# CONFIG_SIZE_OPTIMIZATIONS=n
# CONFIG_SPEED_OPTIMIZATIONS=n

# release options
CONFIG_BT_DEBUG_NONE=y
CONFIG_ASSERT=n
CONFIG_DEBUG_THREAD_INFO=n
CONFIG_DEBUG_OPTIMIZATIONS=n
CONFIG_SHELL=y
CONFIG_SIZE_OPTIMIZATIONS=y
CONFIG_SPEED_OPTIMIZATIONS=n&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>