<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://test-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://test-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 Non-Production</generator><lastBuildDate>Fri, 13 May 2022 05:57:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/87391/nrf53-custom-b0n-build" /><item><title>RE: nRF53 Custom b0n Build</title><link>https://test-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>user83813</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://test-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>user106736</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://test-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>user106736</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://test-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>user106736</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://test-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>user83813</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://test-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>user106736</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://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8547.CMakeLists.txt"&gt;test-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://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2275.hello_5F00_world.zip"&gt;test-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://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/custom_5F00_nsib.zip"&gt;test-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://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/custom_5F00_b0n.zip"&gt;test-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://test-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>user83813</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://test-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>user106736</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://test-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://test-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://test-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>user83813</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://test-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>user83813</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://test-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://test-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>user106736</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://test-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>user83813</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://test-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>user106736</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>