<?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>How can I compile my custom hook functions into MCUboot?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122403/how-can-i-compile-my-custom-hook-functions-into-mcuboot</link><description>As shown in the figure, MCUboot has a boot_go_hook function. I&amp;#39;d like to define this function in my own project and compile it into MCUboot. Since I&amp;#39;m using single slot DFU, firmware updates on the FLASH need to be handled within MCUboot. With this custom</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Jun 2025 14:09:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122403/how-can-i-compile-my-custom-hook-functions-into-mcuboot" /><item><title>RE: How can I compile my custom hook functions into MCUboot?</title><link>https://devzone.nordicsemi.com/thread/540737?ContentTypeID=1</link><pubDate>Fri, 27 Jun 2025 14:09:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b87e1b53-a4dc-40b6-a225-9a33417cbcb3</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I can keep this ticket open and provide updates if I hear anything. However, I recommend reaching out to your regional sales manager to get an idea of future releases and the roadmap.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt; Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I compile my custom hook functions into MCUboot?</title><link>https://devzone.nordicsemi.com/thread/540655?ContentTypeID=1</link><pubDate>Fri, 27 Jun 2025 06:17:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aad61ccd-006b-40b5-8b09-8fb29969a638</guid><dc:creator>dragon</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you very much! It seems that MCUboot&amp;rsquo;s firmware loader mode can meet my needs. However, I am still curious whether it is possible to make the NCS compilation system recognize my custom boot_hook_go() function without modifying the NCS code. If the current NCS version cannot achieve this, could you please update this thread once a solution is available in the future? Thank you!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I compile my custom hook functions into MCUboot?</title><link>https://devzone.nordicsemi.com/thread/540603?ContentTypeID=1</link><pubDate>Thu, 26 Jun 2025 14:15:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:769e0b16-3cf0-4034-af83-c9d76dd3793f</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;boot_hook_go()&lt;/code&gt; function is meant to be overridden, so you can use it to run your own firmware update protocol, like your custom serial communication and LED effects. Normally, MCUboot would enter its built-in serial recovery mode right after this point by calling &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/main/boot/zephyr/main.c#L460"&gt;boot_serial_enter()&lt;/a&gt;, but in your case, you can replace that with your own logic.&lt;/p&gt;
&lt;p&gt;Just make sure your protocol downloads the new image correctly to flash, and then reboots the device. After the reboot, MCUboot will take care of verifying the image and booting into it.&lt;/p&gt;
&lt;p&gt;Alternatively, if you want more flexibility, you could look into using MCUboot’s firmware loader mode. That approach uses a separate image to handle the firmware update instead of doing it directly in MCUboot.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I compile my custom hook functions into MCUboot?</title><link>https://devzone.nordicsemi.com/thread/540469?ContentTypeID=1</link><pubDate>Wed, 25 Jun 2025 11:42:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:292cd6ea-4179-47a0-8ec9-1756371e7875</guid><dc:creator>dragon</dc:creator><description>&lt;p&gt;&lt;span&gt;Great, looking forward to your reply.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I compile my custom hook functions into MCUboot?</title><link>https://devzone.nordicsemi.com/thread/540431?ContentTypeID=1</link><pubDate>Wed, 25 Jun 2025 08:20:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acf13716-1e3b-41ee-a294-1ac8d525a184</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the delay in responding. I am not entirely sure if this is possible or how it can be achieved, so I am checking internally. I will update you as soon as I hear from the team.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt; Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>