<?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 netcore update with serial recovery</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101474/nrf5340-netcore-update-with-serial-recovery</link><description>Hello, 
 I have a custom board with a nRF5340 on it. The firmware gets built with MCUBoot in serial recovery mode to update the application core. The serial recovery mode is necessary for the update to work on this board. Updating the application core</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Jun 2024 21:15:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101474/nrf5340-netcore-update-with-serial-recovery" /><item><title>RE: nRF5340 netcore update with serial recovery</title><link>https://devzone.nordicsemi.com/thread/490432?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 21:15:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fbef2f2-7530-46a5-9e00-0e60cc9224f5</guid><dc:creator>Tyler Grunenwald</dc:creator><description>&lt;p&gt;To fix &amp;quot;&lt;span&gt;Missing dependencies:&amp;nbsp;&lt;/span&gt;&lt;span&gt;DT_HAS_ZEPHYR_SIM_FLASH_ENABLED&amp;quot;&lt;br /&gt;Add&amp;nbsp;&lt;strong&gt;CONFIG_ADD_MCUBOOT_MEDIATE_SIM_FLASH_DTS=y&amp;nbsp;&lt;/strong&gt;to your app&amp;#39;s prj.conf&lt;br /&gt;&lt;br /&gt;The required Kconfigs to enable serial recovery mode for app and net cores are as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;prj.conf:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Use mcuboot
CONFIG_BOOTLOADER_MCUBOOT=y

# Needed to support serial recovery of NET core
CONFIG_NRF53_UPGRADE_NETWORK_CORE=y
CONFIG_ADD_MCUBOOT_MEDIATE_SIM_FLASH_DTS=y&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;child_image/mcuboot.conf:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Sanity / nice-to-have
CONFIG_MCUBOOT_INDICATION_LED=y

# Support MCUBoot serial recovery mode
CONFIG_MCUBOOT_SERIAL=y
CONFIG_UART_CONSOLE=n

# Decrease memory footprint
CONFIG_SIZE_OPTIMIZATIONS=y

# Support serial recovery of the NET core
CONFIG_FLASH_SIMULATOR=y
CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y
CONFIG_FLASH_SIMULATOR_STATS=n
CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y
CONFIG_NRF53_RECOVERY_NETWORK_CORE=y
CONFIG_MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD=y
&lt;/pre&gt;&lt;/span&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;For a quick way to check if the firmware was actually updated, see&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BOOT_BANNER_STRING"&gt;CONFIG_BOOT_BANNER_STRING&lt;/a&gt;&amp;nbsp;which can be set for both app and net cores via &lt;strong&gt;prj.conf&lt;/strong&gt; and &lt;strong&gt;child_image/hci_ipc.conf&lt;/strong&gt; respectively&lt;/p&gt;
&lt;p&gt;The NET core prints logs on VCOM0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 netcore update with serial recovery</title><link>https://devzone.nordicsemi.com/thread/440883?ContentTypeID=1</link><pubDate>Fri, 11 Aug 2023 07:53:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac03dbcf-a436-4eef-97df-bc47d0664688</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;Hi Alex,&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t gotten to the bottom of this yet, sorry. Things are slowly returning to normal here now so I hope to find an answer soon.&lt;/p&gt;
&lt;p&gt;Meanwhile, my colleague has a &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/serial_recovery"&gt;github repo with various bootloader samples&lt;/a&gt; and I see that there has been a recent addition of serial updates on netcore. Would you mind taking a look, trying to build it on your machine and comparing to your current setup?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 netcore update with serial recovery</title><link>https://devzone.nordicsemi.com/thread/438638?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2023 21:58:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd707006-9c61-40ce-918b-6255cc5c8559</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;Hi Ryisen,&lt;/p&gt;
&lt;p&gt;Just wanted to let you know that I have taken over this case, as Kenneth is now on holiday. We are busy during the summer, but I&amp;#39;ll try to get back to you soon.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 netcore update with serial recovery</title><link>https://devzone.nordicsemi.com/thread/437791?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2023 07:35:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c729d853-b364-45ed-b58a-6ec74dba43cc</guid><dc:creator>Ryisen</dc:creator><description>&lt;p&gt;So I got back to this project and added the Kconfig parameters from the peripheral_uart sample to my central_bas project.&lt;/p&gt;
&lt;p&gt;However,&amp;nbsp;CONFIG_FLASH_SIMULATOR cannot be enabled because &amp;quot;&lt;span&gt;CONFIG_FLASH_SIMULATOR was assigned the value y, but got the value n. Missing dependencies:&amp;nbsp;&lt;/span&gt;&lt;span&gt;DT_HAS_ZEPHYR_SIM_FLASH_ENABLED&amp;quot;. There is however no Kconfig fragment to enable this.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And with&amp;nbsp;&lt;/span&gt;CONFIG_NRF53_RECOVERY_NETWORK_CORE, I get &amp;quot;&lt;span&gt;CONFIG_NRF53_RECOVERY_NETWORK_CORE was assigned the value y, but got the value n. Missing dependencies:&amp;nbsp;&lt;/span&gt;&lt;span&gt;n&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How can I solve these issues?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Alex&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;prj.conf of central_bas:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_NCS_SAMPLES_DEFAULTS=y

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_SMP=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_GATT_DM=y

# was before CONFIG_HEAP_MEM_POOL_SIZE=1024
CONFIG_HEAP_MEM_POOL_SIZE=2048 
#CONFIG_MAIN_STACK_SIZE=4096

CONFIG_BT_BAS_CLIENT=y

CONFIG_BT_SCAN=y
CONFIG_BT_SCAN_FILTER_ENABLE=y
CONFIG_BT_SCAN_UUID_CNT=1
CONFIG_BT_PRIVACY=y

CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y

CONFIG_DK_LIBRARY=y

# Enable nordic security backend and PSA APIs
CONFIG_NRF_SECURITY=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y

CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=8192
CONFIG_PSA_CRYPTO_DRIVER_OBERON=n
CONFIG_PSA_CRYPTO_DRIVER_CC3XX=y

### START added from peripheral_UART example
# Enable the UART driver
CONFIG_UART_ASYNC_API=y
CONFIG_NRFX_UARTE0=y
#CONFIG_NRFX_UARTE1=y 
CONFIG_SERIAL=y

CONFIG_GPIO=y

# Make sure printk is not printing to the UART console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# Enable the NUS service
CONFIG_BT_NUS=y
### END added from peripheral_UART example

### Added for MCUBoot as first-stage bootloader ###
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_IMAGE_VERSION=&amp;quot;1.0.0+0&amp;quot; # maj.min.rev+build

### Some command handlers require a large stack. Important for mcumgr, would otherwise timeout
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

### Update netcore
CONFIG_NRF53_UPGRADE_NETWORK_CORE=y
CONFIG_ADD_MCUBOOT_MEDIATE_SIM_FLASH_DTS=y&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;prj.conf of mcuboot:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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
CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0

### Added for serial recovery ###
CONFIG_MCUBOOT_SERIAL=y
CONFIG_BOOT_SERIAL_UART=y
#CONFIG_MCUBOOT_INDICATION_LED=y
### Only CONFIG_UART_CONSOLE=n should be necessary
CONFIG_UART_CONSOLE=n
#CONFIG_CONSOLE=n
#CONFIG_CONSOLE_HANDLER=n

### Enable wait for serial recovery ###
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU=y
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT=1000

### The following configurations are required to support serial recovery of the network image
CONFIG_PCD_APP=y

CONFIG_FLASH_SIMULATOR=y
CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y
CONFIG_FLASH_SIMULATOR_STATS=n

CONFIG_MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD=y
CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y
CONFIG_NRF53_RECOVERY_NETWORK_CORE=y
CONFIG_UPDATEABLE_IMAGE_NUMBER=1&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;prj.conf of hci_rpmsg:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_IPC_SERVICE=y
CONFIG_MBOX=y

CONFIG_HEAP_MEM_POOL_SIZE=8192

CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_BT_HCI_RAW_RESERVE=1
CONFIG_BT_MAX_CONN=16

CONFIG_BT_CTLR_ASSERT_HANDLER=y

# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
# Host number of completed commands does not follow normal flow control.
CONFIG_BT_BUF_CMD_TX_COUNT=10
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 netcore update with serial recovery</title><link>https://devzone.nordicsemi.com/thread/434581?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 05:53:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b97ca18-2245-48a5-97a0-ed7e785482fa</guid><dc:creator>Ryisen</dc:creator><description>&lt;p&gt;Alright, I will try to get it to work with this&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 netcore update with serial recovery</title><link>https://devzone.nordicsemi.com/thread/434437?ContentTypeID=1</link><pubDate>Tue, 04 Jul 2023 11:12:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0fce846-3e90-4f13-92e6-6989c2a9199a</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Due to summer vacation we are slightly reduced staff, so can you take a look at the peripheral uart example that show how you for instance can enable serial recovery of the network core:&amp;nbsp;&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/peripheral_uart/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/peripheral_uart/README.html#&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>