<?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>nrf52840 + Zephyr: Custom bootloader base</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108252/nrf52840-zephyr-custom-bootloader-base</link><description>Hello I&amp;#39;m wondering what base I should use to build a custom Bootloader for the nRF52840 (the concept should also work for nRF5340, thus nRF5 SDK is no solution). The custom Bootloader needs to implement LittleFS and a custom crypto Library. On boot,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Feb 2024 17:41:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108252/nrf52840-zephyr-custom-bootloader-base" /><item><title>RE: nrf52840 + Zephyr: Custom bootloader base</title><link>https://devzone.nordicsemi.com/thread/470320?ContentTypeID=1</link><pubDate>Thu, 22 Feb 2024 17:41:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4aca1dd9-9773-471a-b131-31ae21f0a03b</guid><dc:creator>tomatosoup</dc:creator><description>&lt;p&gt;Not sure why it wasn&amp;#39;t working, but now it is working great &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f44d.svg" title="Thumbsup"&gt;&amp;#x1f44d;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 + Zephyr: Custom bootloader base</title><link>https://devzone.nordicsemi.com/thread/469967?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2024 09:01:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16ba3c6e-36a6-40b5-b76b-85fc5e4cf1a5</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should not need anything other than the configs you have here? Are you able to successfully update with &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/smp/mcuboot_smp_ble"&gt;this sample&lt;/a&gt;, just so we have a working reference for the process? And what are the differences when you compare with testing your own&amp;nbsp;project?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 + Zephyr: Custom bootloader base</title><link>https://devzone.nordicsemi.com/thread/469828?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 14:30:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34d783ce-3f9f-46e5-b382-8b06b80cfd52</guid><dc:creator>tomatosoup</dc:creator><description>&lt;p&gt;I have now tried to implement MCUBoot with SMP. I see the Service and can start a DFU with the Android App. But it goes from &amp;quot;VALIDATING...&amp;quot; to &amp;quot;UPLOAD COMPLETE&amp;quot; within seconds. Without properly updating the OTA and resetting the MCU.&lt;/p&gt;
&lt;p&gt;This is my prj.conf:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SMP=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_DEVICE_NAME=&amp;quot;EnteEnteMachine&amp;quot;

CONFIG_BT_BUF_ACL_RX_SIZE=255
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_BUF_CMD_TX_SIZE=255
CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=255

CONFIG_BT_L2CAP_TX_MTU=498

CONFIG_LOG=y

CONFIG_SPI=y
CONFIG_NRFX_SPIM3=y

CONFIG_I2S=y
CONFIG_NRFX_I2S0=y

CONFIG_NRFX_RNG=y

CONFIG_MAIN_STACK_SIZE=8192

CONFIG_BT_RX_STACK_SIZE=8192

CONFIG_HEAP_MEM_POOL_SIZE=8192


# SMP
# Enable Bootloader
CONFIG_BOOTLOADER_MCUBOOT=y
# Enable SMP Server
CONFIG_MCUMGR=y
CONFIG_MCUMGR_GRP_IMG=y
# CONFIG_MCUMGR_GRP_IMG dependencies
CONFIG_FLASH=y
CONFIG_IMG_MANAGER=y
# CONFIG_IMG_MANAGER dependencies
CONFIG_STREAM_FLASH=y
# CONFIG_MCUMGR dependencies
CONFIG_NET_BUF=y
CONFIG_ZCBOR=y
# Required for CONFIG_IMG_MANAGER
CONFIG_FLASH_MAP=y
# Enable BLE transfer
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP=y
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I suspect that the issue is that I use this common file for my GATT Services. Do I need to modify this first to be comatible with SMP?&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/bluetooth/central_gatt_write/src/gatt_write_common.c"&gt;github.com/.../gatt_write_common.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 + Zephyr: Custom bootloader base</title><link>https://devzone.nordicsemi.com/thread/469411?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2024 08:57:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28a9746e-ba85-4bd5-9a6f-d10f0f8d4f83</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Generally, adding a SMP server to your application and adding MCUboot is quite straigt-forward as long as you have enough avilable flash memory (you will need to fit both the bootloder, and the application two times (a primary and secondary slot of equal size).&lt;/p&gt;
&lt;p&gt;To do the update from the application (which is what is normally done with MCUboot in nRF Connect SDK), you should have a SMP server in your application. That is demonstrated by the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.2/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html"&gt;SMP server sample&lt;/a&gt;. I would also recomend &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples"&gt;this set of unoficcial samples&lt;/a&gt;&amp;nbsp;that a colleague of me have made that demonstrates most aspects of DFU. We are also working on a more comprahensive guide but for now, the documentation together with these samples (particularily the second link) is probably the best way to get started.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 + Zephyr: Custom bootloader base</title><link>https://devzone.nordicsemi.com/thread/469362?ContentTypeID=1</link><pubDate>Sun, 18 Feb 2024 19:56:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adf1392e-cb18-4a99-89d4-8c6042d099aa</guid><dc:creator>tomatosoup</dc:creator><description>&lt;p&gt;Ok, MCUboot might be indeed a good solution, as it seems to provide an API to supply the update from within the Application.&lt;br /&gt;&lt;br /&gt;Is there a guide on how to implement MCUboot into an already existing nRF Connect Project? Also, is there an example/guide on how to use the MCUboot API from within the nRF Connect Project application?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 + Zephyr: Custom bootloader base</title><link>https://devzone.nordicsemi.com/thread/468586?ContentTypeID=1</link><pubDate>Tue, 13 Feb 2024 12:23:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f91b753-173f-43b3-b8b3-069bdfd41c93</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Why do you wantt to make a custom bootloader instead of using one of the bootloaders we provide in the nRF Connect SDK (MCUboot and the nRF secure immutable bootloader). These can be used separately, or often, as a combination (typically the secure immutable bootloader is used to provide secure boot and valdiate and activate MCUboot in case you want an upgradable second stage bootloader, which is more often than not the case). See &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.2/nrf/config_and_build/bootloaders_and_dfu/index.html"&gt;Bootloaders and Device Firmware Updates&lt;/a&gt;&amp;nbsp;for more on these.&lt;/p&gt;
&lt;p&gt;That said, if you want to make a simple custom bootloader, I would suggest basing it on the immutable bootloader, as that is a very small and simple bootloader.&lt;/p&gt;
[quote user=""]What should be used as base? Is there an example? Should this Bootloader also be a Zephyr application?[/quote]
&lt;p&gt;These two booltoaders when used in the nRF Connect SDK will also be Zephyr applications.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>