<?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>nRF5340 MCUBoot single slot using either serial or ACM0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87658/nrf5340-mcuboot-single-slot-using-either-serial-or-acm0</link><description>Hi fellas, 
 First of all sorry for the long post but I&amp;#39;m stuck for quite some time now and I need your help. I guess better provide more info than less. 
 I am working with a custom board which is very-very similar to the evaluation kit using the nRF5340</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 May 2022 15:26:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87658/nrf5340-mcuboot-single-slot-using-either-serial-or-acm0" /><item><title>RE: nRF5340 MCUBoot single slot using either serial or ACM0</title><link>https://devzone.nordicsemi.com/thread/367463?ContentTypeID=1</link><pubDate>Wed, 11 May 2022 15:26:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dac32743-44dd-4bda-8da5-56aa0271c67a</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;I believe updating the network core would not be possible. I&amp;#39;ll look into it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 MCUBoot single slot using either serial or ACM0</title><link>https://devzone.nordicsemi.com/thread/367429?ContentTypeID=1</link><pubDate>Wed, 11 May 2022 13:10:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73dcdaa1-c611-43dd-9c89-75c1ef8f4079</guid><dc:creator>DorianN</dc:creator><description>&lt;p&gt;Hi Oivind,&lt;/p&gt;
&lt;p&gt;Will give them a shot and post my findings&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EXTRA&lt;/p&gt;
&lt;p&gt;BTW do you know if it would be possible to update the netcore using such a setup, i.e. using mcuboot with the single slot?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 MCUBoot single slot using either serial or ACM0</title><link>https://devzone.nordicsemi.com/thread/367359?ContentTypeID=1</link><pubDate>Wed, 11 May 2022 09:56:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:852a20e7-1aff-4061-80fa-38a2bc72a6fb</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;The mcuboot configs can be set in [project]/child_image/mcuboot.conf&lt;br /&gt;You will likely have to create the child_image directory and mcuboot.conf file.&lt;/p&gt;
&lt;p&gt;The modifications you made to nrf5340dk_nrf5340_cpuapp_defconfig should have the same effect if you add them to the project&amp;#39;s prj.conf.&lt;/p&gt;
&lt;p&gt;This should result in a more elegant setup.&lt;/p&gt;
&lt;p&gt;Also, have you tried not including the overlay where you edit the flash? Do you see any change if you remove it and leave everything else the same?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 MCUBoot single slot using either serial or ACM0</title><link>https://devzone.nordicsemi.com/thread/367320?ContentTypeID=1</link><pubDate>Wed, 11 May 2022 07:54:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61527541-6fd1-41c7-9d1d-257ce3ce55e4</guid><dc:creator>DorianN</dc:creator><description>&lt;p&gt;Forgot to add the overlay conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf5340dk_nrf5340_cpuapp.overlay&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/delete-node/ &amp;amp;boot_partition;
/delete-node/ &amp;amp;slot0_partition;

&amp;amp;flash0 {
	/*
	 * For more information, see:
	 * https://docs.zephyrproject.org/latest/guides/dts/legacy-macros.html#legacy-flash-partitions
	 */
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x00000000 0x10000&amp;gt;;
		};
		slot0_partition: partition@10000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0x00010000 0xF0000&amp;gt;;
		};
	};
};
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 MCUBoot single slot using either serial or ACM0</title><link>https://devzone.nordicsemi.com/thread/367312?ContentTypeID=1</link><pubDate>Wed, 11 May 2022 07:41:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3ea4876-2d8a-46ae-ba3b-12b51a148d41</guid><dc:creator>DorianN</dc:creator><description>&lt;p&gt;I have some news for anyone interested&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;So far I have achieved the following:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;1. Enabled and compile with Single slot&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;2. Enable serial MCUBoot functionality&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;3. Switch the dev board into bootloader mode&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;4. Transfer and write and update.bin&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;/p&gt;
&lt;p&gt;Settings for all the above&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:\Users\xxxx\ncs\v1.9.1\bootloader\mcuboot\boot\zephyr&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_PM=n

CONFIG_MAIN_STACK_SIZE=10240
CONFIG_MBEDTLS_CFG_FILE=&amp;quot;mcuboot-mbedtls-cfg.h&amp;quot;

CONFIG_BOOT_SWAP_SAVE_ENCTLV=n
CONFIG_BOOT_ENCRYPT_RSA=n
CONFIG_BOOT_ENCRYPT_EC256=n
CONFIG_BOOT_ENCRYPT_X25519=n

CONFIG_BOOT_UPGRADE_ONLY=n
CONFIG_BOOT_BOOTSTRAP=n

### mbedTLS has its own heap
# CONFIG_HEAP_MEM_POOL_SIZE is not set

### We never want Zephyr&amp;#39;s copy of tinycrypt.  If tinycrypt is needed,
### MCUboot has its own copy in tree.
# CONFIG_TINYCRYPT is not set
# CONFIG_TINYCRYPT_ECC_DSA is not set
# CONFIG_TINYCRYPT_SHA256 is not set

CONFIG_FLASH=y
CONFIG_FPROTECT=y

### Various Zephyr boards enable features that we don&amp;#39;t want.
# CONFIG_BT is not set
# CONFIG_BT_CTLR is not set
# CONFIG_I2C is not set

CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y # former CONFIG_MODE_MINIMAL
### Ensure Zephyr logging changes don&amp;#39;t use more resources
CONFIG_LOG_DEFAULT_LEVEL=0
### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
CONFIG_CBPRINTF_NANO=y


#########################################################################
# Declare for single slot and partition size for MCUBoot
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000
CONFIG_SINGLE_APPLICATION_SLOT=y

# Maybe needed TBD
#CONFIG_MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD=y
#CONFIG_BOOT_ERASE_PROGRESSIVELY=y

#Enable MCUBoot serial functionality
CONFIG_MCUBOOT_SERIAL=y

#Pin detection for bootloader for different boards
#Use first decalration for a nrf5340 devkit
#pins aer the default ones already decalred in KConfig
CONFIG_BOOT_SERIAL_DETECT_PORT=&amp;quot;GPIO_0&amp;quot;
CONFIG_BOOT_SERIAL_DETECT_PIN=23
#CONFIG_BOOT_SERIAL_DETECT_PORT=&amp;quot;GPIO_1&amp;quot;
#CONFIG_BOOT_SERIAL_DETECT_PIN=7
#CONFIG_BOOT_SERIAL_DETECT_PORT=&amp;quot;GPIO_0&amp;quot;
#CONFIG_BOOT_SERIAL_DETECT_PIN=5

# Check which high value is HIGH --&amp;gt; usually 0 is high
#CONFIG_BOOT_SERIAL_DETECT_PIN_VAL=1
CONFIG_BOOT_SERIAL_DETECT_PIN_VAL=0

# Check if LED is on
CONFIG_MCUBOOT_INDICATION_LED=y

CONFIG_BOOT_SERIAL_UART=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;--------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Settings inside your project --&amp;gt; proj.conf
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_SPEED_OPTIMIZATIONS=y

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2304
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE=y

# Enable USB subsystem
CONFIG_USB_DEVICE_STACK=y
CONFIG_BOOT_DELAY=1000

CONFIG_UART_CONSOLE=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;--------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:\Users\xxxx\ncs\v1.9.1\zephyr\boards\arm\nrf5340dk_nrf5340\nrf5340dk_nrf5340_cpuapp_defconfig&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_NRF53X=y
CONFIG_SOC_NRF5340_CPUAPP_QKAA=y
CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP=y

# Enable MPU
CONFIG_ARM_MPU=y

# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y

# enable GPIO
CONFIG_GPIO=y

# Enable uart driver
CONFIG_SERIAL=y

# Chanegs needed here
# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Solution is pretty hacky but it works for now.&lt;/p&gt;
&lt;p&gt;Will update when I find a more elegant solution&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 MCUBoot single slot using either serial or ACM0</title><link>https://devzone.nordicsemi.com/thread/367129?ContentTypeID=1</link><pubDate>Tue, 10 May 2022 10:03:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f4f1b29-7aa9-4974-bbee-2105e8317521</guid><dc:creator>DorianN</dc:creator><description>&lt;p&gt;Is there a sample or some guidelines to make a hello word application with a single slot mcuboot?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 MCUBoot single slot using either serial or ACM0</title><link>https://devzone.nordicsemi.com/thread/366977?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 13:43:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84f4c572-b69d-4acb-9ea9-f9f048590d7e</guid><dc:creator>DorianN</dc:creator><description>&lt;p&gt;Hi Oivind,&lt;/p&gt;
&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;I will check it out&lt;/p&gt;
&lt;p&gt;Do you have any other tips to make this work?&lt;/p&gt;
&lt;p&gt;Do I need to mess around with:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;\ncs\v1.9.1\bootloader\mcuboot\boot\zephyr\prj.conf&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;One more thing:&lt;/p&gt;
&lt;p&gt;Do I need to put the board in bootloader mode?&lt;br /&gt;I can see that the default button for the 5340DK is GPIO_0 -- port 23 || Button 1&lt;/p&gt;
&lt;p&gt;I have had problems trying to communicate with the board using newtmgr. It just hangs&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Dorian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 MCUBoot single slot using either serial or ACM0</title><link>https://devzone.nordicsemi.com/thread/366971?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 13:39:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b86b807d-bc3d-4920-8ccd-22d11302c8fe</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;CONFIG_MCUMGR_CMD_IMG_MGMT is the issue. It requires a mcuboot_secondary flash partition.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 MCUBoot single slot using either serial or ACM0</title><link>https://devzone.nordicsemi.com/thread/366963?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 13:26:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11276724-4d1d-4185-a249-28499c69407f</guid><dc:creator>DorianN</dc:creator><description>&lt;p&gt;Just something I found out during my experimentations:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_CMD_OS_MGMT=y
CONFIG_MCUMGR_CMD_STAT_MGMT=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;require dual bank to function&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>