<?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>dfu+app build process</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43300/dfu-app-build-process</link><description>Hi, 
 I am developing an application on an nrf52840 based custom board that includes a dfu bootloader. Currently this bootloader is the example secure one. This will be tweaked to fit our needs over time. From this post: https://devzone.nordicsemi.com</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Feb 2019 20:38:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43300/dfu-app-build-process" /><item><title>RE: dfu+app build process</title><link>https://devzone.nordicsemi.com/thread/169602?ContentTypeID=1</link><pubDate>Tue, 05 Feb 2019 20:38:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ee61d56-61ff-46e0-8eb6-cd7ac2f2c929</guid><dc:creator>paul</dc:creator><description>&lt;p&gt;Just for completeness, there is also a post linker build step that can also be used and may be better in some situations.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu+app build process</title><link>https://devzone.nordicsemi.com/thread/169435?ContentTypeID=1</link><pubDate>Tue, 05 Feb 2019 08:54:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87498e83-8b44-4312-b1bb-177c60d75a64</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Paul,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the feedback regarding nrfutil&amp;#39;s dependencies. Will report this internally.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu+app build process</title><link>https://devzone.nordicsemi.com/thread/169385?ContentTypeID=1</link><pubDate>Mon, 04 Feb 2019 22:16:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1955bd1a-c221-461c-9b7f-b02665da2676</guid><dc:creator>paul</dc:creator><description>&lt;p&gt;Thanks Bjorn. Some notes on what I have done:&lt;/p&gt;
&lt;p&gt;1) installing nrfutil is non trivial. There is at least one package without a revision dependency: protobuf that required a higher revision than was already installed on my box. The error was:&amp;nbsp;TypeError: __init__() got an unexpected keyword argument &amp;#39;syntax&amp;#39;. I upgraded from protobuf 2.6 to 3.6 and that fixed it. The install correctly identified that the six package needed upgrading.&lt;/p&gt;
&lt;p&gt;2) installing nrfutil has a dependency on the wheel package that isn&amp;#39;t caught. Error:&amp;nbsp;Running setup.py bdist_wheel for nrfutil ... error ...&amp;nbsp;Failed building wheel for nrfutil&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;3) I wrote the following bash script to do the fiddling and called it in the post build command: right click on project in the project items pane | options | User build step in left pane and then post-build command.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#!/bin/bash

BOOTDIR=&amp;quot;/home/paulc/dev/2flex_nrf52/bootloader&amp;quot;
LOADERFILE=&amp;quot;secure_bootloader_ble_s140_pca10056.hex&amp;quot;
LOADERLOC=&amp;quot;../sdk/examples/dfu/secure_bootloader/pca10056_ble/ses/Output/Release/Exe/${LOADERFILE}&amp;quot;
APPLOC=&amp;quot;/home/paulc/dev/2flex_nrf52/Output/Debug/Exe/2flex_nrf52.hex&amp;quot;
SETTINGSFILE=&amp;quot;bootloader_setting.hexca&amp;quot;
FLASHFILE=&amp;quot;payload.hex&amp;quot;
NRFUTIL=&amp;quot;/usr/local/bin/nrfutil&amp;quot;
MERGEHEX=&amp;quot;/home/paulc/dev/2flex_nrf52/mergehex/mergehex&amp;quot;
NRFJPROG=&amp;quot;/home/paulc/dev/2flex_nrf52/nrfjprog/nrfjprog&amp;quot;

pushd ${BOOTDIR}
cp ${LOADERLOC} .
echo &amp;quot;Generating the bootloader settings&amp;quot;
${NRFUTIL} settings generate --family NRF52840 --application ${APPLOC} --application-version 0 --bootloader-version 0 --bl-settings-version 1 ${SETTINGSFILE} --no-backup
echo &amp;quot;merging with the bootloader&amp;quot;
${MERGEHEX} --merge ${LOADERFILE} ${SETTINGSFILE} --output ${FLASHFILE}
echo &amp;quot;programming the bootloader onto the chip&amp;quot;
${NRFJPROG} -f NRF52 --program ${FLASHFILE} --chiperase
popd&lt;/pre&gt;4)&lt;/p&gt;
&lt;p&gt;Again many thanks&lt;/p&gt;
&lt;p&gt;Paul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dfu+app build process</title><link>https://devzone.nordicsemi.com/thread/169342?ContentTypeID=1</link><pubDate>Mon, 04 Feb 2019 15:07:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f7f3c7d-1552-47ef-92ed-15898639004b</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Paul,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;you can generate the settings page as a &amp;#39;&lt;span&gt;User Build Step&amp;#39; -&amp;gt; &amp;#39;Post Build Command&amp;#39; and then automatically load the settings file when debugging, see&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/34212/howto-flash-bootloader-settings-for-dfu-using-ses-at-debug-time"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/34212/howto-flash-bootloader-settings-for-dfu-using-ses-at-debug-time&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>