<?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>nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87391/nrf53-custom-b0n-build</link><description>I am trying to compile a custom bootloader for nRF5340 net core (b0n) that is part of a multi-image build. 
 I have created two separate applications, one based on b0n (nrf/samples/nrf5340/netboot) and one based on nrf/samples/bluetooth/peripheral_lbs</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Jul 2023 07:06:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87391/nrf53-custom-b0n-build" /><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/434094?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 07:06:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97d63639-c587-4cb6-aa1d-e56d7d45e897</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Joe Kane"]&amp;nbsp; But you meant&amp;nbsp; build separate proprietary bootloader app. separately, and build NRF application with offset from CONFIG_FLASH_LOAD_OFFSET (separately) .[/quote]
&lt;p&gt;Correct&lt;/p&gt;
&lt;p&gt;Let me know if you got any further questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/434013?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2023 18:25:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a66ef70-6641-4e64-9129-7293eaf6bb80</guid><dc:creator>Joe Kane</dc:creator><description>&lt;p&gt;Sigurd,&lt;/p&gt;
&lt;p&gt;Thank you for quick answer (again!) Please enjoy your weekend.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I see now. I was still thinking in terms of&amp;nbsp; the sdk tool kit building (and it only supporting either SIBS or Mcuboot)&amp;nbsp; But you meant&amp;nbsp; build separate proprietary bootloader app. separately, and build NRF application with offset from CONFIG_FLASH_LOAD_OFFSET (separately) .&lt;/p&gt;
&lt;p&gt;This would be very similar to our previous process (with offsets tied to linker script and makefile targets (to know which offset to use) .&lt;/p&gt;
&lt;p&gt;And finally maybe we can build either standalone or composite images using sysbuild with sysbuild kconfig options.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/433978?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2023 14:53:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:994e56d3-cfac-4fd5-a7df-fd0cb30037da</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Quick answer before I am taking the weekend now:&lt;/p&gt;
[quote user="Joe Kane"]Thank you for the fast response. Yes, I understand that it is possible to add another stage of custom bootloader that runs after&amp;nbsp; after SIBS or mcuboot runs&amp;nbsp; as long as the signing chain is honored.[/quote]
&lt;p&gt;This is not what I mean. I refer to only Custom Bootloader + Applicaton.&lt;/p&gt;
&lt;p&gt;For the case of the nRF5 Bootloader and the nRF52840Dongle, neither NSIB or MCUboot runs on the dongle with the NCS applications here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/433972?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2023 14:43:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f6dfedb-c348-4778-9727-d788137a47bc</guid><dc:creator>Joe Kane</dc:creator><description>&lt;p&gt;Sigurd, &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for the fast response. Yes, I understand that it is possible to add another stage of custom bootloader that runs after&amp;nbsp; after SIBS or mcuboot runs&amp;nbsp; as long as the signing chain is honored.&lt;/p&gt;
&lt;p&gt;But this does add complexity and code size, and in some designs it is really required to do some custom development in the first stage boot (and there can be only one bootloader) and be as small as possible due to limited memory.&lt;/p&gt;
&lt;p&gt;I have been running&amp;nbsp; up to nrfconnect 2.3 and haven&amp;#39;t toured 2.4 yet, and I missed sysbuild. Taking a quick look at the architecture, it can probably do the kind of things I requested.&lt;/p&gt;
&lt;p&gt;We have&amp;nbsp; accomplished this in the past&amp;nbsp; with customized linker scripts and custom makefile targets for &amp;#39;standalone&amp;#39; or &amp;#39;composite&amp;#39; images, but sysbuild can probably handle the job.&lt;/p&gt;
&lt;p&gt;I will take a further look.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/433952?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2023 13:04:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1f9cb59-6d85-410c-8837-90327c92e55f</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Thank you for the complements!&lt;/p&gt;
[quote user="Joe Kane"]Can you comment if there has been any progress on this or any plans by Nordic to support custom(ized) bootloader builds in nrf connect (without needed to modify the sdk)?[/quote]
&lt;p&gt;There have not been any changes to the multi-image builds yet.&lt;/p&gt;
&lt;p&gt;However, there are work being done on sysbuild. From &lt;a href="https://nrfconnect.github.io/vscode-nrf-connect/release_notes/connect/2023.6.345.html#sysbuild-support"&gt;these release notes&lt;/a&gt;: &lt;br /&gt;&amp;quot;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/zephyr/build/sysbuild/index.html"&gt;Sysbuild&lt;/a&gt; was introduced in Zephyr&amp;#39;s v3.2.0 release, and has been adopted in the nRF Connect SDK v2.4.0. Sysbuild will gradually become the new workflow for handling multi-image build configurations and it will replace the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/nrf/app_dev/multi_image/index.html#defining-and-enabling-a-child-image"&gt;child image mechanism&lt;/a&gt;, specific to the nRF Connect SDK&lt;br /&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;I have still&amp;nbsp; not tried sysbuild myself, but from what I have heard I suspect it could make it easier to add customized bootloaders to projects.&lt;/p&gt;
[quote user="Joe Kane"]&lt;p&gt;On this same topic and related, Nordic should consider the case of being able to build the bootloaders as standalone projects directly in the toolchain (the documentation states that this is somewhat doable via command line).&lt;/p&gt;
&lt;p&gt;There are&amp;nbsp; numerous real world (especially in production and repair environments) where a standalone bootloader project/build (not as a child project) is required for the various workflows.&lt;/p&gt;
&lt;p&gt;Building as child application embedded in main effort can also create design isolation challenges: some extreme security projects have separate bootloader/security development environments and don&amp;#39;t want to share source/build with the application teams.&lt;/p&gt;
&lt;p&gt;Having the bootloader projects&amp;nbsp; as&amp;nbsp; separate standalone examples would allow that customization and should be accommodated by your toolchain, in addition to composite projects that have bootloader and app.&lt;/p&gt;
&lt;p&gt;There are some cases where products never even see an application until some post fielding OTA/download/low level upgrade that is done by bootloader.&lt;/p&gt;[/quote]
&lt;p&gt;In the end, a bootloader does not really care about how which binary it boots to (as long as said binary is signed).&lt;/p&gt;
&lt;p&gt;Therefore, you can in theory add your own bootloader and boot any nRF Connect SDK application after.&lt;br /&gt;As long as the bootloader is good enough at resetting states of peripherals and such, the application should not be affected by this either.&lt;/p&gt;
&lt;p&gt;In fact, our nRF52840 Dongles run the (old) nRF5 Bootloader, which does not know anything about the nRF Connect SDK.&lt;br /&gt;And this works.&lt;br /&gt;You can use the Kconfig option &lt;span&gt;CONFIG_FLASH_LOAD_OFFSET&lt;/span&gt; to make the application start at the correct offset for your bootloader.&lt;br /&gt;And then if you want to do DFU, you either must have an update mechanism in the bootloader (ex. serial recovery) or one in your application which supports the custom bootloader.&lt;/p&gt;
&lt;p&gt;Here you can see a case where I discuss using the nRF Bootloader &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/95859/one-bootloader-to-rule-them-all"&gt;One bootloader to rule them all&lt;/a&gt; .&lt;/p&gt;
&lt;p&gt;Did this make sense to you?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/433936?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2023 12:17:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:786b6d09-ce16-4d20-b22d-8100bf01afa6</guid><dc:creator>Joe Kane</dc:creator><description>&lt;p&gt;Sigurd,&lt;/p&gt;
&lt;p&gt;I found this discussion&amp;nbsp; due to a similar need. I also appreciate the honesty and candor in your response.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you comment if there has been any progress on this or any plans by Nordic to support custom(ized) bootloader builds in nrf connect (without needed to modify the sdk)?&lt;/p&gt;
&lt;p&gt;Anton&amp;#39;s use case is very common in the real world :&lt;/p&gt;
&lt;p&gt;&amp;quot;This project is for a product that needs to be able to recover even under extreme circumstances so custom bootloaders are absolutely necessary.&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The use of well structured, well designed, well tested, and open (in case of mcuboot) bootloaders is a good thing, but there will always be real world low level (and often proprietary/legacy methods) recovery needed&amp;nbsp; directly from the lowest levels of code. It is most often the more complex and higher levels of boot which fail (later stage bootloaders, application etc). And there may also be some other low level/sensitive/proprietary customization required in the first and/or second stages of boot.&lt;/p&gt;
&lt;p&gt;On this same topic and related, Nordic should consider the case of being able to build the bootloaders as standalone projects directly in the toolchain (the documentation states that this is somewhat doable via command line).&lt;/p&gt;
&lt;p&gt;There are&amp;nbsp; numerous real world (especially in production and repair environments) where a standalone bootloader project/build (not as a child project) is required for the various workflows.&lt;/p&gt;
&lt;p&gt;Building as child application embedded in main effort can also create design isolation challenges: some extreme security projects have separate bootloader/security development environments and don&amp;#39;t want to share source/build with the application teams.&lt;/p&gt;
&lt;p&gt;Having the bootloader projects&amp;nbsp; as&amp;nbsp; separate standalone examples would allow that customization and should be accommodated by your toolchain, in addition to composite projects that have bootloader and app.&lt;/p&gt;
&lt;p&gt;There are some cases where products never even see an application until some post fielding OTA/download/low level upgrade that is done by bootloader.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for considering these inputs.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/367751?ContentTypeID=1</link><pubDate>Fri, 13 May 2022 05:57:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b13da4af-bae9-4414-8394-f31696c619a2</guid><dc:creator>AntonD</dc:creator><description>&lt;p&gt;Thanks for your honesty.&lt;/p&gt;
&lt;p&gt;This project is for a product that needs to be able to recover even under extreme circumstances so custom bootloaders are absolutely necessary. I have worked around the worst of the issues modifying the SDK by adding the following lines to the top of the application root CMakeLists.txt :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;set(CONFIG_B0_CUSTOM_FOLDER &amp;quot;${CMAKE_SOURCE_DIR}/cpuboot&amp;quot;)
set(CONFIG_B0N_CUSTOM_FOLDER &amp;quot;${CMAKE_SOURCE_DIR}/netboot&amp;quot;)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have then added the custom bootloaders at those subdirectories. I then copied the SDK into a new directory next to the application (so as not to polute the common SDK) and made the following changes to the samples CMakeLists.txt :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (CONFIG_SECURE_BOOT)
  if (CONFIG_SOC_NRF5340_CPUNET)
    # Share some information which is used when generating the zip file
    # with the update binaries.
    set_shared(IMAGE net_core PROPERTY SOC ${CONFIG_SOC})
    set_shared(IMAGE net_core PROPERTY VERSION ${CONFIG_FW_INFO_FIRMWARE_VERSION})
    if (DEFINED CONFIG_B0N_CUSTOM_FOLDER)
      add_child_image(
        NAME b0n
        SOURCE_DIR ${CONFIG_B0N_CUSTOM_FOLDER}
        )
    else()
      add_child_image(
        NAME b0n
        SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/nrf5340/netboot
        )
    endif()
  else()
    if (DEFINED CONFIG_B0_CUSTOM_FOLDER)
      add_child_image(
        NAME b0
        SOURCE_DIR ${CONFIG_B0_CUSTOM_FOLDER}
        )
    else()
      add_child_image(
        NAME b0
        SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/bootloader
        )
    endif()
  endif()&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This does get the job done but is still a bit of a hack; so, I am not marking this as an answer until custom bootloaders can be built using the unmodified SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/366953?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 13:05:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57a467e6-0120-40c0-a72c-283aa62a53bd</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have tried to do custom NSIB and b0n in the samples I suggested you, and I have talked with my colleagues about it.&lt;/p&gt;
&lt;p&gt;And I have finally found what I suspect you have tried to tell me all this time: It does not work.&lt;/p&gt;
&lt;p&gt;As far as I can find, CONFIG_SECURE_BOOT is needed for both NSIB and b0n, and if this is set the child images are imported directly from our samples folder.&lt;br /&gt;And CONFIG_SECURE_BOOT is too interconnected with the nRF Connect SDK for us to disable it without consequences.&lt;/p&gt;
&lt;p&gt;In conclusion, the only way to have custom NSIB/b0n is to fork the nRF Connect SDK, and make changes to our SDK. &lt;br /&gt;See my earlier comment for an example, and also &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/dm_adding_code.html"&gt;Adding your own code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thank you for being thorough in getting your point across. &lt;br /&gt;While this is not the solution you want right now, I hope it will suffice.&lt;br /&gt;I will ask our developers about this feature, and maybe we can get it in a future version of the nRF Connect SDK.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/366631?ContentTypeID=1</link><pubDate>Fri, 06 May 2022 08:40:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0da4a325-2340-4229-b223-9edc1e886a14</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Some of the concepts in the previous linked example are explained in &lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/main/samples/nrf5340/multicore"&gt;https://github.com/nrfconnect/sdk-nrf/tree/main/samples/nrf5340/multicore&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/366600?ContentTypeID=1</link><pubDate>Fri, 06 May 2022 07:16:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36f1e4f5-ac3d-498d-8a13-72efe92311da</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Yea, I agree that it is far from ideal to make changes to the SDK. &lt;br /&gt;I asked our developers about this, and here is my question and what they had to say:&lt;/p&gt;
&lt;p&gt;&amp;quot;I want to make changes to the b0n child image for my application. So I copy nrf/samples/nrf5340/netboot to somewhere else(ex ~/custom_netboot). &lt;br /&gt;How to I tell my application(ex. hello_world) to include custom_netboot instead of netboot? How to do this without making changes to the SDK?&amp;quot;&lt;br /&gt;&lt;br /&gt;&amp;quot; You need to add new kconfig for selecting custom_netboot and then add some cmake code (typically in a ZEPHYR_EXTRA_MODULE which performs the conditional add_child_image. See the example: &lt;a href="https://github.com/oivoii/rpmsg-simple-nrf5340/pull/2/files"&gt;https://github.com/oivoii/rpmsg-simple-nrf5340/pull/2/files&lt;/a&gt; &amp;quot;&lt;/p&gt;
&lt;p&gt;I will try this myself as well. Then I will have a look at your network core app problem after.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/366587?ContentTypeID=1</link><pubDate>Fri, 06 May 2022 06:17:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6502c345-cce7-46f8-a77c-4c3fe43f24da</guid><dc:creator>AntonD</dc:creator><description>&lt;p&gt;No. This is not what I am looking for. Modifying the SDK in this way is a bad idea for several reasons but most notably:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This will break any other project I am working on using the SDK supplanting the standard bootloader with a custom one.&lt;/li&gt;
&lt;li&gt;If I need to change SDK version it will revert any changes and if this file changes significantly may mean that I cannot replicate this behaviour.&lt;/li&gt;
&lt;li&gt;The source code for the bootloaders ends up in the SDK instead of a logical place for development/version control etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, this doesn&amp;#39;t really answer the network core app problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/366435?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 11:34:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e857b6a6-aa7d-45fe-b2f1-74a92430cd90</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;nRF Connect SDK v1.9.1. nRF5340DK.&lt;/p&gt;
&lt;p&gt;Here is a sample showcasing how to use custom NSIB and b0n with a hello world sample. The files I have added or changed will be listed below:&lt;/p&gt;
&lt;p&gt;ncs/nrf/samples/CmakeLists.txt:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8547.CMakeLists.txt"&gt;devzone.nordicsemi.com/.../8547.CMakeLists.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Any location: hello_world:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2275.hello_5F00_world.zip"&gt;devzone.nordicsemi.com/.../2275.hello_5F00_world.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ncs/nrf/samples/custom_nsib:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/custom_5F00_nsib.zip"&gt;devzone.nordicsemi.com/.../custom_5F00_nsib.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ncs/nrf/samples/custom_b0n:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/custom_5F00_b0n.zip"&gt;devzone.nordicsemi.com/.../custom_5F00_b0n.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;custom_nsib is a slightly changed copy of nrf/samples/bootloader and custom_b0n is a slightly changed sample of nrf/samples/nrf5340/netboot.&lt;br /&gt;They both have a print function added to the top of main to verify the change.&lt;/p&gt;
&lt;p&gt;Build this hello_world as such:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf5340dk_nrf5340_cpuapp&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Is this what you needed?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/366354?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 06:23:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92ceabd2-bb4d-4077-b622-0227e8788dd6</guid><dc:creator>AntonD</dc:creator><description>&lt;p&gt;I have no problem creating the minimal example you talk about based on hello_world with unmodified b0 and b0n. The real problem is that I need to have custom bootloaders on both cores. I am not fussed about which of the two above architectures make more sense. However, they will need to be custom bootloaders, and that is where the problems come in.&lt;/p&gt;
&lt;p&gt;The issues I have in the original email occur whether it is b0n on the cpunet or b0 on the cpuapp. I have tracked the problem to the block starting at &amp;quot;v1.9.1/nrf/samples/CMakeLists.txt:57&amp;quot; that is included in both the net core app and the app core app. If you enable &amp;quot;CONFIG_SECURE_BOOT&amp;quot; then this file will automatically include b0 or b0n into the application. If I add a custom b0 or b0n using the instructions here&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_multi_image.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_multi_image.html&lt;/a&gt;&amp;nbsp;then it includes b0/b0n&amp;nbsp;&lt;em&gt;twice&lt;/em&gt;. This is why I get the error message above (the CMakeCache.txt is created once by the nrf samples b0/b0n code and once by my b0/b0n code ... and it gets quite confused). I have attempted to fix this by (temporarily) modifying the above CMakeLists.txt in the samples folder to not include b0 or b0n when&amp;nbsp;CONFIG_B0_BUILD_STRATEGY_FROM_SOURCE is enabled. This returns me to the infamous &amp;quot;pm_config.h&amp;quot; not found error.&lt;/p&gt;
&lt;p&gt;Following the above link, I have tried to add a custom netcore app too. I have created one using the hello_world example and as advised I have added the following line to the CMakeLists.txt of the appcore app:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;add_child_image(&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; NAME netapp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/netapp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; DOMAIN CPUNET&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; )&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;where &amp;quot;netapp&amp;quot; was the name and subdirectory of the hello_world application code for the cpunet core.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt; No board specified for domain &amp;#39;CPUNET&amp;#39;. This configuration is typically&amp;nbsp;defined in&amp;nbsp;C:/Users/anton/ncs/v1.9.1/zephyr/boards/arm/nrf5340dk_nrf5340/Kconfig&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So, to get back to the original question, &lt;strong&gt;how do I set up a build that has a custom b0 and a custom b0n&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;I will need both. Minimal examples are fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/366123?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 08:33:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f5cc32d-1b36-40de-878b-a05f6f891e5a</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Anton&lt;/p&gt;
&lt;p&gt;Since b0n and b0 is easily mixed, I will from now on refer to them as follows:&lt;/p&gt;
&lt;p&gt;Network core bootloader: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/samples/nrf5340/netboot/README.html#nc-bootloader"&gt;b0n&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Application core nRF Secure Immutable Bootloader: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/samples/bootloader/README.html?highlight=nsib"&gt;NSIB&lt;/a&gt;&lt;/p&gt;
[quote user="AntonD"]I assume when you say that you are building a custom b0n for the cpuapp you mean that you are building a custom b0 for the cpuapp.[/quote]
&lt;p&gt;Your assumption is wrong. I am talking about custom b0n.&lt;/p&gt;
[quote user="AntonD"]So for some reason the partition manager script must not be running and must not be generating the &amp;quot;pm_config.h&amp;quot; header, or it is not in the correct include path. How do I rectify that?[/quote]
&lt;p&gt;I think that the reason it does not work for you is that the &amp;quot;application design&amp;quot;&amp;nbsp; we intent to be used for child images is different from the one you use.&lt;/p&gt;
&lt;p&gt;I suggest that you take a step back and look at the overall design.&lt;br /&gt;Am you making two different projects: One for the APP core and one for the NET core?&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1651652366085v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Or are you making one project for the whole nRF5340, like this?&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1651653025572v5.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The second solution is the one I described in my previous post, and the one recommended for nRF5340.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/366107?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 07:03:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2139030f-ae4f-4b53-b76b-1921ac921d9d</guid><dc:creator>AntonD</dc:creator><description>&lt;p&gt;I have tracked it down to the file &amp;quot;partition_manager.cmake&amp;quot;, which should make the &amp;quot;pm_config.h&amp;quot; file. This section of code is where it exits before actually creating the header file.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;# This file is executed once per domain.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;#&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;# It will be executed if one of the following criteria is true for the&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;# current image:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;# - It&amp;#39;s a child image, and is the dynamic partition in the domain&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;# - It&amp;#39;s the root image, and a static configuration has been provided&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;# - It&amp;#39;s the root image, and PM_IMAGES is populated.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;# - It&amp;#39;s the root image, and other domains exist.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;# - A subsys has defined a partition and CONFIG_PM_SINGLE_IMAGE is set.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;# Otherwise, return here&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;if (NOT (&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; (IMAGE_NAME AND is_dynamic_partition_in_domain) OR&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; (NOT IMAGE_NAME AND static_configuration) OR&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; (NOT IMAGE_NAME AND PM_IMAGES) OR&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; (NOT IMAGE_NAME AND PM_DOMAINS) OR&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; (PM_SUBSYS_PREPROCESSED AND CONFIG_PM_SINGLE_IMAGE)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; ))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; return()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#333399;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;endif()&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;None of the above are true and so it doesn&amp;#39;t create the header file.&amp;nbsp;By adding CMake messages, I can see that:&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;For b0n the IMAGE_NAME is set to b0n and the other parameters are empty. I assume this means that b0n&amp;nbsp;&lt;em&gt;shouldn&amp;#39;t&lt;/em&gt; build the pm_config.h (which is what I would expect.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;None of the other parameters are set for the application, which seems wrong.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;This seems like PM_IMAGES or PM_DOMAINS should not be blank ...&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;What should these parameters be? Where should they be set?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/366097?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 05:42:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d1daae8-d276-4be4-9710-c0344990e574</guid><dc:creator>AntonD</dc:creator><description>&lt;p&gt;I assume when you say that you are building a custom b0n for the cpuapp you mean that you are building a custom b0 for the cpuapp.&lt;/p&gt;
&lt;p&gt;So, I can get it to build the b0n image now. I just had to remove the &amp;quot;&lt;span&gt;if (CONFIG_SECURE_BOOT)&amp;quot; and set that config to &amp;quot;n&amp;quot; in the prj.conf for the net application. It then tells me that it cannot add the child image unless &amp;quot;CONFIG_PARTITION_MANAGER_ENABLED&amp;quot; is set to &amp;quot;y&amp;quot;. Fine. I do that. Then I get a build error where it cannot find &amp;quot;pm_config.h&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now I have chased that down to the following link:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now that link says that:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1651642867243v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So for some reason the partition manager script must not be running and must not be generating the &amp;quot;pm_config.h&amp;quot; header, or it is not in the correct include path. How do I rectify that?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/365573?ContentTypeID=1</link><pubDate>Fri, 29 Apr 2022 11:43:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49409639-c1c0-4635-a78a-f9f23f8e7618</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I explain a bunch of context. However, it might not be super-relevant for you until the&lt;span style="color:rgba(255, 0, 0, 1);"&gt; red text&lt;/span&gt; further down.&lt;/p&gt;
&lt;p&gt;I agree with you here, I were unspecific in my previous answer.&lt;br /&gt;b0n is the bootloader for the network core.&lt;br /&gt;For the application core, you can use b0 and/or MCUBoot as a bootloader.&lt;/p&gt;
&lt;p&gt;For a typical example for use of b0n, with context:&lt;br /&gt;Our &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/applications/machine_learning/README.html"&gt;Machine Learning sample&lt;/a&gt; has configurations for bootloader support on the nRF5340.&lt;br /&gt;In this sample, MCUBoot is running on the Application Core, while b0n is running at the Network Core.&lt;br /&gt;To update the firmware, the nRF5340 has to enter Serial Recovery mode or using the Simple Management Protocol over Bluetooth. &lt;br /&gt;This will use the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/guides/device_mgmt/mcumgr.html"&gt;mcumgr&lt;/a&gt; tool to upload an image to the application core, which is then swapped to the network core using &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/libraries/dfu/pcd.html"&gt;Peripheral CPU DFU (PCD)&lt;/a&gt;.&lt;br /&gt;When you now reboot, b0n will boot into the new image.&lt;/p&gt;
&lt;p&gt;So when i sat &amp;quot;alongside&amp;quot;, I really mean that it is generally not the only bootloader running on the nRF5340.&lt;/p&gt;
&lt;p&gt;I should point out that use of the b0n is a bit weird in the sense of &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/ug_multi_image.html#image-specific-variables"&gt;multi-images&lt;/a&gt;.&lt;br /&gt;Normally, you can use overlays in your project to change the configurations of your child images. &lt;br /&gt;Or you could add a custom child image to your project, to avoid making changes to the nRF Connect SDK directly.&lt;br /&gt;When using the nRF5340, the code running on the network core will be built as a child image of the application.&lt;br /&gt;For example, if CONFIG_BT=y when you build for your nrf5340dk_nrf5340, the child image &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/samples/bluetooth/hci_rpmsg/README.html"&gt;hci_rpmsg&lt;/a&gt; is added to your project.&lt;/p&gt;
&lt;p&gt;However, if you want to use the b0n, it is added as a child image of the child image running on the network core. (for example a child_image of hci_rpmsg).&lt;br /&gt;There is one&amp;nbsp; way to add a configuration overlay to a &amp;quot;recursive&amp;quot; child image, by nesting their names in CMake variables for child image configurations:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf5340dk_nrf5340_cpuapp -- -Dhci_rpmsg_b0n_CONFIG_DEBUG=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:rgba(255, 0, 0, 1);"&gt;So I think your approach is the best way to add a custom b0n&lt;/span&gt;: By first making an custom application for the network core. Then you can add this as a child image when you later make firmware for the network core. &lt;br /&gt;To try to answer your question:&lt;/p&gt;
[quote user=""]If I then build the net app, the application builds, but b0n is neither built nor linked.[/quote]
&lt;p&gt;I have not been able to find where in the nRF Connect SDK this is set, &lt;br /&gt;but I am able to build with a custom b0n if I build hello_world for nrf52840dk_nrf52840_cpuapp with the following configurations:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT=y
CONFIG_SECURE_BOOT=y
CONFIG_BOOTLOADER_MCUBOOT=y
&lt;/pre&gt;&lt;br /&gt;(Hello World since it is a minimal sample)&lt;/p&gt;
&lt;p&gt;I will continue looking into child images next week, to try to find more for you. If you are able to figure out something in the meantime, let me know.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/365504?ContentTypeID=1</link><pubDate>Fri, 29 Apr 2022 05:11:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88be86a3-9e02-4cc4-901d-99e9c8289066</guid><dc:creator>AntonD</dc:creator><description>&lt;p&gt;The CMakeLists.txt that I am referring to is the root level CMakeLists.txt for the application on the net core (based on&amp;nbsp;&lt;span&gt;nrf/samples/bluetooth/peripheral_lbs on the net core).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I think you are mistaken: b0 is the app core bootloader, b0n is the net core bootloader (&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf5340/netboot/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf5340/netboot/README.html&lt;/a&gt;). Also, as I have said, I can compile and run b0n on the net core without issue. Also, b0n isn&amp;#39;t used &lt;em&gt;alongside&lt;/em&gt; the bootloader, it&amp;nbsp;&lt;em&gt;is&lt;/em&gt; a bootloader. Did you mean it is often run alongside mcuboot as a set of first and second stage bootloaders?&lt;/p&gt;
&lt;p&gt;Edited: I attempted to build the b0n/app using app core but that failed as it was unable to find &amp;quot;pm_config.h&amp;quot; ... but I don&amp;#39;t think that is the correct path to follow anyway.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 Custom b0n Build</title><link>https://devzone.nordicsemi.com/thread/365387?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 11:17:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27ad6abf-0a9f-4ccf-a385-a8182d417b96</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Anton&lt;/p&gt;
[quote user=""]I have tried adding the b0n as a child image of the application by adding the following code to CMakeLists.txt[/quote]
&lt;p&gt;Can you specify which CmakeLists.txt you are referring to here?&lt;/p&gt;
[quote user=""]If I then build the net app[/quote]
&lt;p&gt;The b0n is usually used alongside the bootloader in the application core. What happens if you build for nrf5340dk_nrf5340_cpuapp instead?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>