<?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>Developing a custom bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79934/developing-a-custom-bootloader</link><description>Hello Nordic team, 
 I am faced with the problem of developing a custom bootloader which actively pulls FW from an external mass-storage. AFAIK, the SDK only supports OTA or UART where the nRF device is slave to a host device which pushes the FW. 
 What</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Oct 2021 08:34:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79934/developing-a-custom-bootloader" /><item><title>RE: Developing a custom bootloader</title><link>https://devzone.nordicsemi.com/thread/335009?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 08:34:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6a204e2-18e9-40e4-b3f0-1a4b22f107b1</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Thanks for your update!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Developing a custom bootloader</title><link>https://devzone.nordicsemi.com/thread/334316?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 11:10:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d700a8c3-74e5-476b-a69b-11842d1de17b</guid><dc:creator>Norbert</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Just to give some final feedback and maybe clues to other people intending to do something similar. I got my bootloader apparently working, even though I do not have an application yet which is fit to run.&lt;/p&gt;
&lt;p&gt;The document Bootloader_External_Flash_Modifications.pdf (&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Bootloader_5F00_External_5F00_Flash_5F00_Modifications.pdf"&gt;/cfs-file/__key/communityserver-discussions-components-files/4/Bootloader_5F00_External_5F00_Flash_5F00_Modifications.pdf&lt;/a&gt;) is pure gold. A couple of points to watch out for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Choose a suitable format for the file containing the firmware you want to install. You need to have access to the init record while the bootloader is running. I modified the pc_nrfutil script to be able to write a stream of instructions to a file. This way, the bootloader has everything it needs, even to do the block CRC verification on-the-fly.&lt;/li&gt;
&lt;li&gt;You might want to install SD and APP at the same time if there is ever an incompatibility between the ones already installed and the new FW package. To handle multiple updates, I commented out the call to&amp;nbsp;nrf_dfu_settings_write_and_backup() in nrf_dfu_req_handler.c and let that part execute after all updates have been performed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Developing a custom bootloader</title><link>https://devzone.nordicsemi.com/thread/332819?ContentTypeID=1</link><pubDate>Wed, 06 Oct 2021 11:45:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6368ac19-cd19-4bf0-94b1-43e217123a18</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi Norbert,&lt;/p&gt;
[quote user="ngrunert"]This is not quite what I want to achieve. How the image arrives in the external memory does not concern the nRF. I just need to read the image in the bootloader and write it to the internal Flash.[/quote]
&lt;p&gt;I see, if you only one to read from the external flash and write to the internal then it should be easier and you don&amp;#39;t need to change pstorage. In your bootloader example you will need to add SPI or QSPI drivers to read the image from the external flash. &lt;/p&gt;
&lt;p&gt;Something similar is done in the USB MSC example in nRF5 SDK, where the file system on QSPI memory is manupulated from the application. You can take a look at that: &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/usbd_msc_example.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/usbd_msc_example.html&lt;/a&gt; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Developing a custom bootloader</title><link>https://devzone.nordicsemi.com/thread/332400?ContentTypeID=1</link><pubDate>Mon, 04 Oct 2021 14:38:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7264b43d-c54e-457f-bb1e-6bd4ceb19ef0</guid><dc:creator>Norbert</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="73427" url="~/f/nordic-q-a/79934/developing-a-custom-bootloader/332397#332397"]I am sorry for the late reply.[/quote]
&lt;p&gt;No problem...&lt;/p&gt;
&lt;p&gt;I am still fighting with the latest libraries to get access to the external memory so I have not yet touched the core of the bootloader. The nRF52 SDK is fine as I am using an nRF52840.&lt;/p&gt;
[quote userid="73427" url="~/f/nordic-q-a/79934/developing-a-custom-bootloader/332397#332397"]Another idea is to replace the pstorage calls in the bootloade[/quote]
&lt;p&gt;This is not quite what I want to achieve. How the image arrives in the external memory does not concern the nRF. I just need to read the image in the bootloader and write it to the internal Flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Developing a custom bootloader</title><link>https://devzone.nordicsemi.com/thread/332397?ContentTypeID=1</link><pubDate>Mon, 04 Oct 2021 14:28:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0603d4a-a0b2-4447-80c7-2246147762c3</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for the late reply. This document refers to nRF5 SDK. Have you come far with your custom bootloader? &lt;/p&gt;
&lt;p&gt;Another idea is to replace the pstorage calls in the bootloader, i.e, instead of using pstorage to write it to internal flash you use a function that takes some parametrers but writes to external flash instead. See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/17935/ota-dfu-of-nrf52832-using-external-flash-instead-of-internal-flash/69148#69148"&gt;this thread&lt;/a&gt; for more information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Developing a custom bootloader</title><link>https://devzone.nordicsemi.com/thread/330886?ContentTypeID=1</link><pubDate>Thu, 23 Sep 2021 14:10:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63a6bcad-4cd8-4680-8028-5afcf34d243c</guid><dc:creator>Norbert</dc:creator><description>&lt;p&gt;P.S.: I came across the document Bootloader_External_Flash_Modifications.pdf (&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Bootloader_5F00_External_5F00_Flash_5F00_Modifications.pdf"&gt;/cfs-file/__key/communityserver-discussions-components-files/4/Bootloader_5F00_External_5F00_Flash_5F00_Modifications.pdf&lt;/a&gt;) which was an attachment to a forum post. The document looks quite promising even though it is not clear to which SDK version it refers to.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>