<?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>Mcuboot location in-tree/out-of-tree with sysbuild</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118023/mcuboot-location-in-tree-out-of-tree-with-sysbuild</link><description>I&amp;#39;m migrating my app from parent/child to sysbuild. 
 Previously I had both bootloader and firmware as separate out-of-tree projects and that was working fine. 
 Now using sysbuild, my firmware is still located out-of-tree, but mcuboot gets compiled from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Jan 2025 13:48:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118023/mcuboot-location-in-tree-out-of-tree-with-sysbuild" /><item><title>RE: Mcuboot location in-tree/out-of-tree with sysbuild</title><link>https://devzone.nordicsemi.com/thread/519785?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2025 13:48:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4181ba22-94eb-4eb5-a949-bdc2494eb9d3</guid><dc:creator>Vidar Berg</dc:creator><description>[quote userid="114275" url="~/f/nordic-q-a/118023/mcuboot-location-in-tree-out-of-tree-with-sysbuild/519770"]Maintaining my own fork for few lines of additional init code seems problematic.[/quote]
&lt;p&gt;I probably wouldn&amp;#39;t have considered this either if it was just a few lines of code. Maybe just add the changes manually or through a patch file.&amp;nbsp;&lt;/p&gt;
[quote userid="114275" url="~/f/nordic-q-a/118023/mcuboot-location-in-tree-out-of-tree-with-sysbuild/519770"]Your suggestion looks interesting, but how to add custom initialization code at board definition level? I didn&amp;#39;t find any recipe?[/quote]
&lt;p&gt;Have you&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/nrf/app_dev/board_support/defining_custom_board.html"&gt;defined your own custom board&lt;/a&gt;&amp;nbsp;yet?&amp;nbsp;In that case, you can specify additional source files to be included in the build when your board is selected. For example, like how the thingy53 board include the board.c file here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/763e6a8ab82bd1a346a9b14a4b8fc7509c8441b6/boards/nordic/thingy53/CMakeLists.txt#L6"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/763e6a8ab82bd1a346a9b14a4b8fc7509c8441b6/boards/nordic/thingy53/CMakeLists.txt#L6&lt;/a&gt;&amp;nbsp;that will run this setup() function:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/763e6a8ab82bd1a346a9b14a4b8fc7509c8441b6/boards/nordic/thingy53/board.c#L47"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/763e6a8ab82bd1a346a9b14a4b8fc7509c8441b6/boards/nordic/thingy53/board.c#L47&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcuboot location in-tree/out-of-tree with sysbuild</title><link>https://devzone.nordicsemi.com/thread/519770?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2025 13:29:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c763ef50-0250-400f-8059-d275caf290f3</guid><dc:creator>m5k8</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/118023/mcuboot-location-in-tree-out-of-tree-with-sysbuild/518444"]you can define your own board with some custom initialization code for the GPIOs.[/quote]
&lt;p&gt;Maintaining my own fork for few lines of additional init code seems problematic.&lt;/p&gt;
&lt;p&gt;Your suggestion looks interesting, but how to add custom initialization code at board definition level? I didn&amp;#39;t find any recipe?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mcuboot location in-tree/out-of-tree with sysbuild</title><link>https://devzone.nordicsemi.com/thread/518444?ContentTypeID=1</link><pubDate>Wed, 15 Jan 2025 13:22:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:797c64b1-e08f-4170-8526-c7828e10848c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can&amp;nbsp;maintain your own&amp;nbsp;fork of the SDKs bootloader project if you want to modify the code, see &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/dev_model_and_contributions/adding_code.html#workflow_4_workspace_application_repository_recommended"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/dev_model_and_contributions/adding_code.html#workflow_4_workspace_application_repository_recommended&lt;/a&gt; . Alternatively, if you only need to control the GPIOs before the bootloader runs, you can define your own board with some custom initialization code for the GPIOs.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>