<?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>first DFU test failed to pre-validate</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26187/first-dfu-test-failed-to-pre-validate</link><description>SDK 12.3, pca10040 and armgcc 
 Built bootloader_secure (debug version) and flashed it. 
 Loading appears to take place but nothing showing on RTT console afterwards. 
 Then flashed it again. Appeared to flash OK this time. 
 Now the RTT viewer shows</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Oct 2017 13:45:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26187/first-dfu-test-failed-to-pre-validate" /><item><title>RE: first DFU test failed to pre-validate</title><link>https://devzone.nordicsemi.com/thread/103143?ContentTypeID=1</link><pubDate>Tue, 24 Oct 2017 13:45:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cee0f9ff-4b29-43ff-902c-d2f3472496eb</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;can you post the nrfutil command you used to generate the zip?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: first DFU test failed to pre-validate</title><link>https://devzone.nordicsemi.com/thread/103142?ContentTypeID=1</link><pubDate>Tue, 24 Oct 2017 12:01:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3100d2c1-f166-447e-b2fe-030dd0e021a5</guid><dc:creator>paul_tanner</dc:creator><description>&lt;p&gt;Thx @Bjørn
I have now generated a new key pair and image but after loading it did not start.
(I looked for a sample image in the 12.3 SDK but did not find it.)&lt;/p&gt;
&lt;p&gt;Restarted DFU and selected my new image .zip. The final lines of debug were:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;...
:INFO:Enter nrf_dfu_app_is_valid
:INFO:Return true. App was valid
:INFO:Enter nrf_dfu_app_is_valid
:INFO:Return true. App was valid
:INFO:Jumping to: 0x0001f000
:INFO:Running nrf_bootloader_app_start with address: 0x0001f000
:INFO:Disabling interrupts
:INFO:Setting SD vector table base: 0x0001f000
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After this it hung, presumably waiting for another DFU.
The reset button did not start the downloaded app.
I was able to start it with J-Link so the loading worked.
However, I had been expecting the downloaded app to start automatically.&lt;/p&gt;
&lt;p&gt;Is there something missing from the zipped image?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: first DFU test failed to pre-validate</title><link>https://devzone.nordicsemi.com/thread/103141?ContentTypeID=1</link><pubDate>Tue, 24 Oct 2017 11:02:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b39e356e-7e8f-4f4a-8796-f6f8173f4dd1</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;each SDK version will use different public-private key pairs, so you will not be able to perform a DFU with the bootloader from SDK v12.3.0 using a test image from SDK v12.2.0.&lt;/p&gt;
&lt;p&gt;You have to use the test images from the same SDK version or generate your firmware image with your own public-private key pair, see this guide.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: first DFU test failed to pre-validate</title><link>https://devzone.nordicsemi.com/thread/103140?ContentTypeID=1</link><pubDate>Mon, 23 Oct 2017 17:30:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74f884fb-4685-4eff-b268-4cd8013368fb</guid><dc:creator>paul_tanner</dc:creator><description>&lt;p&gt;Tried again after generating a new package.zip&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfutil pkg generate --debug-mode --application _build/nrf52832_xxaa.hex --key-file ../../../keys/priv.pem myapp_dfu_package.zip
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;different results but the DFU failed:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:INFO:Inside main of bootloader_secure
:INFO:In nrf_bootloader_init
:INFO:In real nrf_dfu_init
:INFO:running nrf_dfu_settings_init
:INFO:!!!!!!!!!!!!!!! Resetting bootloader settings !!!!!!!!!!!
:INFO:Erasing old settings at: 0x0007f000
:INFO:Erasing: 0x0007f000, num: 1
:INFO:Writing 0x00000057 words
:INFO:Writing settings...
:INFO:Enter nrf_dfu_continue
:INFO:Single: Invalid bank
:INFO:Enter nrf_dfu_app_is_valid
:INFO:Return false in valid app check
:INFO:In nrf_dfu_transports_init
:INFO:Inside main of bootloader_secure
:INFO:In nrf_bootloader_init
:INFO:In real nrf_dfu_init
:INFO:running nrf_dfu_settings_init
:INFO:Enter nrf_dfu_continue
:INFO:Single: Invalid bank
:INFO:Enter nrf_dfu_app_is_valid
:INFO:Return false in valid app check
:INFO:In nrf_dfu_transports_init
:INFO:num transports: 1
:INFO:vector table: 0x00075000
SDH:WARNING:sd_ble_enable: RAM start should be adjusted to 0x20002798
SDH:WARNING:RAM size should be adjusted to 0xd868 
:INFO:After nrf_dfu_transports_init
:INFO:------- nrf_dfu_flash_init-------
:INFO:Waiting for events
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So I still have warnings that I don&amp;#39;t know how to fix. Then I try the DFU:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:INFO:Received select object
:INFO:Valid Command: NRF_DFU_OBJECT_OP_SELECT
:INFO:Sending Object Info: [0x60, 0x06, 0x01 max: 0:x00000100 0:x00000000, CRC:0x00000000]
:INFO:Set receipt notif
:INFO:Sending Response: [0x2, 0x1]
:INFO:Received create object
:INFO:Before OP create command
:INFO:Valid Command Create
:INFO:Sending Response: [0x1, 0x1]
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Received calculate CRC
:INFO:Valid Command CRC
:INFO:Sending CRC: [0x60, 0x03, 0x01, 0:x00000090, CRC:0x0841078f]
:INFO:Received execute object
:INFO:Before OP execute command
:INFO:Valid command execute
:INFO:
12 8D 01 0A 47 08 01 12 43 08 FF FF FF FF 0F 10  ....G...C.......
FF FF FF FF 0F 1A 03 FE FF 03 20 00 28 00 30 00  .......... .(.0.
38 D0 BD 01 42 24 08 03 12 20 C2 8A 2A C6 60 8E  8...B$... ..*.`.
87 8F 49 3D 26 E0 8F B9 E6 AB 61 B7 17 99 22 C7  ..I=&amp;amp;.....a...&amp;quot;.
97 39 73 4D D0 24 7A 5D 32 1A 48 01 10 00 1A 40  .9sM.$z]2.H....@
D4 E1 40 93 2F A1 90 93 27 D3 40 E4 AE 8E 82 69  ..@./...&amp;#39;.@....i
:INFO:
:INFO:Prevalidate FAILED!
:INFO:Sending Response: [0x4, 0x5]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So the end result is the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>