<?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>Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38733/bootloader-on-custom-board-using-uart</link><description>Hi, 
 We have developed a customized board for use in a gateway. We would like to have a working bootloader on that board but it looks like it is almost impossible to make things work. 
 We are using nRF5 SDK version 15.0.0. I have tested the secure_dfu_test_images</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Nov 2022 20:52:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38733/bootloader-on-custom-board-using-uart" /><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/395879?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 20:52:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56f99c98-5d06-49a3-92c2-09fac63b3cce</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;So that, what is solution ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/150210?ContentTypeID=1</link><pubDate>Tue, 25 Sep 2018 10:19:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c57e9977-ee4d-427a-b06c-c31c1c2cab4f</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;br /&gt;&lt;br /&gt;You can configure the flash addresses in SES by doing the following:&lt;br /&gt;&lt;br /&gt;1. Click on &lt;em&gt;Edit Options&lt;/em&gt; for your project.&lt;br /&gt;2. Select &lt;em&gt;Common&lt;/em&gt; in the configuration scrollbar.&lt;br /&gt;3. Click on &lt;em&gt;Linker&lt;/em&gt;.&lt;br /&gt;4. Double-click on &lt;em&gt;Section Placement Macros&lt;/em&gt;.&lt;br /&gt;5. Configure the addresses and click on Ok --&amp;gt; and Ok.&lt;/p&gt;
&lt;p&gt;&lt;span style="color:transparent;height:240px;width:320px;"&gt;...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;- Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/150154?ContentTypeID=1</link><pubDate>Tue, 25 Sep 2018 06:41:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7285d1f-2b56-425c-935c-adaba5c29f9f</guid><dc:creator>AndersLundqvist</dc:creator><description>&lt;p&gt;We are aware of that. In fact the custom board is designed to work as a add-on card to the FX30 which uses 1.8V signalling. Therefore we have added level translators on both RX and TX. These level translators should be within specifications even for 3.3V FTDI cables used for PC testing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/150106?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 15:49:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef251cb7-02a5-4664-9ac5-f66c54d19a11</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Worth mentioning, should your custom board supply differ from the FTDI voltage or you perform a reset at anytime with the FTDI connected you can get unexpected behaviour due to back-drive from the FTDI to the nRF52840 through the nRF schottky protection. Bootloader operation often relies on a clean reset before or during the transitions from app to bootloader or bootloader to app. The safest way to handle this is to insert a level-translator on the incoming Rx data line, powered from the custom board. It is only required for FTDI use; if there is no such device on the custom board Rx line then it will not be operating as you expect when the FTDI is used, unless you disconnect every time. Not hard to test this to see if it helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/150084?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 13:42:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:683a1415-a910-425d-8d52-806970ea29cb</guid><dc:creator>AndersLundqvist</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Since I have besed my (tweaked) DFU on your example, it contains an MBR (as far as I can tell). Anyway the hex file begins with:&lt;/p&gt;
&lt;p&gt;:02000002F0000C&lt;br /&gt;:108000000000042061820F00B9820F00BB820F00C4&lt;br /&gt;:10801000BD820F00BF820F00C1820F000000000070&lt;/p&gt;
&lt;p&gt;The uart test program hex file begins with:&lt;/p&gt;
&lt;p&gt;:100000000000042061020000B9020000BB020000F1&lt;br /&gt;:10001000BD020000BF020000C1020000000000009D&lt;/p&gt;
&lt;p&gt;I suspect that this means that it is placed in flash starting at address 0x0 which according to the memory map is the MBR.&lt;/p&gt;
&lt;p&gt;So how on earth do I get it to be placed where it should be using the Segger Embedded Studio? The flash_placement_file.xml, the project options or directly in the solution using the editor? It is far from obvious to me how this is done.&lt;/p&gt;
&lt;p&gt;The best solutions would have been if the bootloader would have made the necessary decisions.&lt;/p&gt;
&lt;p&gt;In fact I am a bit confused on how the whole system should work in practice. It is impractical to have to determine memory location at compile time. Who knows the actual size of the soft device apart from the bootloader and what if you upgrade a soft device to a version with a bigger footprint?&lt;/p&gt;
&lt;p&gt;Is there any explanation available in the documentation that explains this in detail?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Anders&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/150075?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 13:25:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b9f653f-9626-4630-ac6c-46cbdd34dd71</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;That depends on what your DFU contains. Take a look at this &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Flib_bootloader.html&amp;amp;cp=4_0_0_3_5_0_7&amp;amp;anchor=lib_bootloader_memory"&gt;memory layout&lt;/a&gt;. If the DFU contains a MBR or a SoftDevice, then you have to adjust the start address of the application, if it doesnt, then you should be fine.&lt;/p&gt;
&lt;p&gt;- Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/150066?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 13:01:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed9b8333-49e4-440f-a2af-57e721485146</guid><dc:creator>AndersLundqvist</dc:creator><description>&lt;p&gt;Hi Again,&lt;/p&gt;
&lt;p&gt;Just one more question. Do I need to adjust the start address for the application that is downloaded? I.e. 0x20000 instead of 0x0?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Anders&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/150038?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 11:59:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f3fa725-f960-4422-8311-148254930663</guid><dc:creator>AndersLundqvist</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Must have sent the wrong picture, sorry for that. It did not work nevertheless.&lt;/p&gt;
&lt;p&gt;However, I have ditched the nrfutil that came using &amp;quot;pip install nrfutil&amp;quot; and downloaded a precompiled version which most likely is exactly the same as the one I used initially.&lt;/p&gt;
&lt;p&gt;This time it actually worked. I have even made som progress on the bootloader for the custom board. I have come to the conclusion that you need to set the &amp;quot;--sd-req&amp;quot; to an unsupported value for the download to work properly. This is as far as I can remember not mentioned anywhere in the documentation, which I for obvious reasons have not read in it&amp;#39;s entirety.&lt;/p&gt;
&lt;p&gt;There are some issues left and I will try to figure out what I need to do to make it work.&lt;/p&gt;
&lt;p&gt;If I need more help, I will start a new ticket for that. This one is getting clogged up and I can not reply to the last post no matter how I try - must be something wrong with the ticketing system...&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Anders&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/150022?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 11:33:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8768310-e440-4d36-9c88-d738ce5fb605</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Did you try to do as i said in my previous reply? That is open the project found in &lt;strong&gt;examples\dfu\secure_bootloader\pca10056_uart_debug, &lt;/strong&gt;edit &lt;strong&gt;sdk_config.h&lt;/strong&gt; inside the project, edit &lt;strong&gt;dfu_public_key.c&lt;/strong&gt; inside the project, create a &lt;strong&gt;.bat file&lt;/strong&gt; and paste the code i posted in my previous reply.&lt;/p&gt;
&lt;p&gt;Because it seems from the screenshot you sent that you did not program using that &lt;strong&gt;.bat file,&amp;nbsp;&lt;/strong&gt;and you are still programming the&amp;nbsp; &lt;strong&gt;nRF5_SDK_15.0.0_a53641a\examples\dfu\secure_dfu_test_images\uart\nrf52840 &lt;/strong&gt;examples.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve attached it in this reply.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-0c9be4ccf3d64e0a91557ac2bc4d439c/RUN_5F00_THIS_5F00_FILE.bat"&gt;devzone.nordicsemi.com/.../RUN_5F00_THIS_5F00_FILE.bat&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please do as i stated above, once you have finished editing the project, compile it.&lt;/p&gt;
&lt;p&gt;Download the &lt;strong&gt;.bat file&lt;/strong&gt; i sent you and place it in the &lt;strong&gt;SDK folder (nRF5_SDK_15.0.0_a53641a)&lt;/strong&gt;, and then &lt;strong&gt;run it&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;- Andreas&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/150003?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 11:06:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a30b2fb-c437-42e5-ab8c-b6edd31c260e</guid><dc:creator>AndersLundqvist</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;For some unknown reason I am not allowed to make a reply to your latest post, so I do it here instead.&lt;/p&gt;
&lt;p&gt;As you can see from the image below it did not quite work as intended...&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1537786973388v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As you pointed out, the new hardware did nothing to improve the situation but at least we have verified that which is good.&lt;/p&gt;
&lt;p&gt;What do we do now?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Anders&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/149970?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 09:24:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13855aca-6b5d-4137-9d53-2b34f7a42b63</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Try this:&lt;/p&gt;
&lt;p&gt;Open the project found in &lt;strong&gt;examples\dfu\secure_bootloader\pca10056_uart_debug&lt;/strong&gt;, in &lt;strong&gt;sdk_config.&lt;/strong&gt;&lt;strong&gt;h &lt;/strong&gt;line 1151, put 0 instead of 1.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;q&amp;gt; NRF_DFU_SERIAL_UART_USES_HWFC  - HWFC configuration
 

#ifndef NRF_DFU_SERIAL_UART_USES_HWFC
#define NRF_DFU_SERIAL_UART_USES_HWFC 0
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Use the following code in &lt;strong&gt;dfu_public_key.c:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* This file was automatically generated by nrfutil on 2018-03-22 (YY-MM-DD) at 12:39:00 */

#include &amp;quot;stdint.h&amp;quot;
#include &amp;quot;compiler_abstraction.h&amp;quot;

/* This file was generated with a throwaway private key, that is only inteded for a debug version of the DFU project.
  Please see https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/README.md to generate a valid public key. */

#ifdef NRF_DFU_DEBUG_VERSION 

/** @brief Public key used to verify DFU images */
__ALIGN(4) const uint8_t pk[64] =
{
    0x65, 0xfc, 0x2b, 0xf8, 0x16, 0xda, 0x01, 0x9a, 0xde, 0x75, 0xd4, 0xa8, 0x47, 0x71, 0x96, 0x21, 0x1c, 0x87, 0x55, 0x69, 0x10, 0x5a, 0xbe, 0x04, 0x57, 0x8f, 0xd2, 0xb0, 0x29, 0x94, 0x56, 0xb8, 
    0xca, 0x03, 0x63, 0xd6, 0x35, 0xc6, 0x4d, 0xa7, 0x81, 0x9f, 0xef, 0xa7, 0xd2, 0xec, 0xb7, 0xf3, 0x07, 0xff, 0x80, 0xaf, 0x7a, 0x3b, 0x4c, 0x19, 0xb8, 0x91, 0xc5, 0x14, 0x3c, 0xe8, 0x76, 0x6d
};

#else
#error &amp;quot;Debug public key not valid for production. Please see https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/README.md to generate it&amp;quot;
#endif
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Create a .bat file in your SDK folder (&lt;strong&gt;nRF5_SDK_15.0.0_a53641a&lt;/strong&gt;)&lt;strong&gt; &lt;/strong&gt;with this code inside, and run it from command prompt:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="bat"&gt;nrfjprog --eraseall
nrfjprog --program examples\dfu\secure_bootloader\pca10056_uart_debug\ses\Output\Release\Exe\secure_bootloader_uart_mbr_pca10056_debug.hex --chiperase
nrfjprog --program examples\dfu\secure_dfu_test_images\uart\nrf52840\mbr.hex
nrfjprog --reset

SLEEP 2
nrfutil dfu serial -pkg examples\dfu\secure_dfu_test_images\uart\nrf52840\blinky_mbr.zip -p COM7 -b 115200 -fc 0

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This should now work, and you should see the following in your command prompt:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-0c9be4ccf3d64e0a91557ac2bc4d439c/pastedimage1537780357598v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve now modified the &lt;strong&gt;examples\dfu\secure_bootloader\pca10056_uart_debug&lt;/strong&gt; example to use no flowcontroll and a baudrate of 115200.&lt;/p&gt;
&lt;p&gt;The Jlink CDC UART Port is the driver for the Segger on-board debugger on the DK.&lt;br /&gt;&lt;br /&gt;The same key should be used for both the bootloader and the application, correct.&amp;nbsp; You should not use a different key for the zip file.&lt;br /&gt;&lt;br /&gt;QIAAAA should not be the problem.&lt;/p&gt;
&lt;p&gt;You should use Python 2.7 for nrfutil. When it comes to nrfutil for Python 3 i refer to this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/28554/nrfutil-python3-support"&gt;question&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Hope this works for you, good luck.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/149851?ContentTypeID=1</link><pubDate>Fri, 21 Sep 2018 13:37:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6dc105f8-b269-4df0-b56e-429e777b1ae7</guid><dc:creator>AndersLundqvist</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;I should be very surprised if it vere the wrong port. COM3 if the FTDI cable, something I have verified more than once using the&amp;nbsp;&lt;span&gt;..\examples\peripheral\uart\pca10056\blank\ses and not forgetting the new bootloader which, for various reasons, can not use digital signalling to enter DFU-mode. We will use a command over the UART, which works perfectly well by now. The bootloader functionality unfortunately does not.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1537536437964v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What is the JLink CDC UART Port? I have never heard of this before. Isn&amp;#39;t it just another COM port that is used by the nrfutil? In the real application we will have a gateway (Sierra Wireless FX30) and an add on card (with nRF52840) connected through the serial port. We have neither room nor economy for additional hardware!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I use the files found in&amp;nbsp;..\examples\dfu\secure_dfu_test_images\uart\nrf52840, the bootloader and the blinky zip file should have a matching key, right? In my own case, I use the same key for both bootloader and application zip file. Right or wrong? Should I use another different key for the zip file?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We have now ordered a new PCA10056 card to see if that one works better. It should arrive on monday, so we will see then. Is the QIAAAA a problem?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It would also be interesting if you could help me with the nrfutil issue. If I understand it correctly, the exe file has it&amp;#39;s python interpreter embedded while the installed (using pip) uses the python version on the computer. I also understand that there is a big issue in the python world moving between version 2 and 3. Do you have any insights on that as well?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Anders&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/149847?ContentTypeID=1</link><pubDate>Fri, 21 Sep 2018 13:21:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abf88bf3-0e38-464f-9ca9-38ebe4a1681c</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Could it be that you are using the wrong COM port? Could you check if &lt;strong&gt;COM3&lt;/strong&gt;, which you use is in fact a &lt;strong&gt;JLink CDC UART Port&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;And when you say you have created a private key which you used to create the zip file, is this the zip file you tried to use as the &lt;strong&gt;DFU&lt;/strong&gt; package? In that case then the keys from the precompiled .hex files and this zip file does not match.&lt;/p&gt;
&lt;p&gt;There is nothing wrong with doing modifications with the examples found in the SDK or creating something from the ble_app_template, just remember that more and more modifications increases the difficulty of making things compatible.&lt;/p&gt;
&lt;p&gt;- Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/149831?ContentTypeID=1</link><pubDate>Fri, 21 Sep 2018 12:27:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f33f2661-2db2-45d5-94d2-29f0474dd7a0</guid><dc:creator>AndersLundqvist</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If I run it from where I have the nrfutil.exe it gives the following response:&lt;/p&gt;
&lt;p&gt;C:\Users\anderslundqvist\Documents\Projekt\IoT card\PC NrfUtil&amp;gt;nrfutil dfu serial -pkg blinky_mbr.zip -p COM3 -b 115200 -fc 0&lt;br /&gt; [------------------------------------] 0%&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt; File &amp;quot;nordicsemi\__main__.py&amp;quot;, line 987, in &amp;lt;module&amp;gt;&lt;br /&gt; File &amp;quot;site-packages\click\core.py&amp;quot;, line 722, in __call__&lt;br /&gt; File &amp;quot;site-packages\click\core.py&amp;quot;, line 697, in main&lt;br /&gt; File &amp;quot;site-packages\click\core.py&amp;quot;, line 1066, in invoke&lt;br /&gt; File &amp;quot;site-packages\click\core.py&amp;quot;, line 1066, in invoke&lt;br /&gt; File &amp;quot;site-packages\click\core.py&amp;quot;, line 895, in invoke&lt;br /&gt; File &amp;quot;site-packages\click\core.py&amp;quot;, line 535, in invoke&lt;br /&gt; File &amp;quot;nordicsemi\__main__.py&amp;quot;, line 745, in serial&lt;br /&gt; File &amp;quot;nordicsemi\__main__.py&amp;quot;, line 680, in do_serial&lt;br /&gt; File &amp;quot;nordicsemi\dfu\dfu.py&amp;quot;, line 129, in dfu_send_images&lt;br /&gt; File &amp;quot;nordicsemi\dfu\dfu.py&amp;quot;, line 90, in _dfu_send_image&lt;br /&gt; File &amp;quot;nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 211, in open&lt;br /&gt;pc_ble_driver_py.exceptions.NordicSemiException: No ping response after opening COM port&lt;br /&gt;Failed to execute script __main__&lt;/p&gt;
&lt;p&gt;If I run it from the position you suggest, I get the following response:&lt;/p&gt;
&lt;p&gt;C:\Users\anderslundqvist\Documents\SEGGER Embedded Studio Projects\nRF5_SDK&amp;gt;nrfutil dfu serial -pkg examples\dfu\secure_dfu_test_images\uart\nrf52840\blinky_mbr.zip -p COM3 -b 115200 -fc 0&lt;br /&gt; [------------------------------------] 0%&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt; File &amp;quot;C:\Users\anderslundqvist\AppData\Local\Programs\Python\Python37\Scripts\nrfutil-script.py&amp;quot;, line 11, in &amp;lt;module&amp;gt;&lt;br /&gt; load_entry_point(&amp;#39;nrfutil==3.5.1&amp;#39;, &amp;#39;console_scripts&amp;#39;, &amp;#39;nrfutil&amp;#39;)()&lt;br /&gt; File &amp;quot;c:\users\anderslundqvist\appdata\local\programs\python\python37\lib\site-packages\click\core.py&amp;quot;, line 722, in __call__&lt;br /&gt; return self.main(*args, **kwargs)&lt;br /&gt; File &amp;quot;c:\users\anderslundqvist\appdata\local\programs\python\python37\lib\site-packages\click\core.py&amp;quot;, line 697, in main&lt;br /&gt; rv = self.invoke(ctx)&lt;br /&gt; File &amp;quot;c:\users\anderslundqvist\appdata\local\programs\python\python37\lib\site-packages\click\core.py&amp;quot;, line 1066, in invoke&lt;br /&gt; return _process_result(sub_ctx.command.invoke(sub_ctx))&lt;br /&gt; File &amp;quot;c:\users\anderslundqvist\appdata\local\programs\python\python37\lib\site-packages\click\core.py&amp;quot;, line 1066, in invoke&lt;br /&gt; return _process_result(sub_ctx.command.invoke(sub_ctx))&lt;br /&gt; File &amp;quot;c:\users\anderslundqvist\appdata\local\programs\python\python37\lib\site-packages\click\core.py&amp;quot;, line 895, in invoke&lt;br /&gt; return ctx.invoke(self.callback, **ctx.params)&lt;br /&gt; File &amp;quot;c:\users\anderslundqvist\appdata\local\programs\python\python37\lib\site-packages\click\core.py&amp;quot;, line 535, in invoke&lt;br /&gt; return callback(*args, **kwargs)&lt;br /&gt; File &amp;quot;c:\users\anderslundqvist\appdata\local\programs\python\python37\lib\site-packages\nordicsemi\__main__.py&amp;quot;, line 745, in serial&lt;br /&gt; do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, True)&lt;br /&gt; File &amp;quot;c:\users\anderslundqvist\appdata\local\programs\python\python37\lib\site-packages\nordicsemi\__main__.py&amp;quot;, line 680, in do_serial&lt;br /&gt; dfu.dfu_send_images()&lt;br /&gt; File &amp;quot;c:\users\anderslundqvist\appdata\local\programs\python\python37\lib\site-packages\nordicsemi\dfu\dfu.py&amp;quot;, line 129, in dfu_send_images&lt;br /&gt; self._dfu_send_image(self.manifest.application)&lt;br /&gt; File &amp;quot;c:\users\anderslundqvist\appdata\local\programs\python\python37\lib\site-packages\nordicsemi\dfu\dfu.py&amp;quot;, line 90, in _dfu_send_image&lt;br /&gt; self.dfu_transport.open()&lt;br /&gt; File &amp;quot;c:\users\anderslundqvist\appdata\local\programs\python\python37\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 211, in open&lt;br /&gt; raise NordicSemiException(&amp;quot;No ping response after opening COM port&amp;quot;)&lt;br /&gt;pc_ble_driver_py.exceptions.NordicSemiException: No ping response after opening COM port&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When working with the PCA10056 I have not created any DFU package at all. It is strange that my PCA10056 does not work with this. My PCA10056 has a n MCU marked QIAAAA which means that it is som sort of preseries sample. Could this be the reason that it doesn&amp;#39;t work?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The Software device error message stems from my attempt in using my tweaked bootloader to accept my DFU package (or whatever you call it).&lt;/p&gt;
&lt;p&gt;I have created a private key - the example I used as a template, did not compile otherwise. That same key is also used to create the zip file.&lt;/p&gt;
&lt;p&gt;In fact this bootloader is overly complicated and since we will program the device from the gateway, it is not necessary to have a secure bootloader. However, your bootloader example that does not have elevated security also requires a private key (and public c-file key). In out case the security will reside in the programming the gateway. However, I see no solution that simplifies this process and all recommendations that I have seen is not to create anything from scratch - i.e. use the examples and do not mess with the SDK... Am I right or have I misunderstood your intentions?&lt;/p&gt;
&lt;p&gt;Addition:&lt;/p&gt;
&lt;p&gt;In case you are wondering why the ticket concerns two separate but very much connected issues, it is because last ticket I created took more than two months before anyone bothered to answer it. So I am thankful for your swift response. In retrospective, I should perhaps have created two different tickets...&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Anders&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/149825?ContentTypeID=1</link><pubDate>Fri, 21 Sep 2018 12:03:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c6f3b1b-4861-4501-868f-a7818832d062</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi again.&lt;/p&gt;
&lt;p&gt;The batch files you try to flash now does not require a SoftDevice.&lt;/p&gt;
&lt;p&gt;Could you try to run this batch script and perform a DFU?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="bat"&gt;nrfjprog --eraseall
nrfjprog --reset --program examples\dfu\secure_dfu_test_images\uart\nrf52840\bootloader_secure_uart_debug_without_bonds_mbr.hex --chiperase
nrfjprog --reset --program examples\dfu\secure_dfu_test_images\uart\nrf52840\mbr.hex
nrfutil dfu serial -pkg examples\dfu\secure_dfu_test_images\uart\nrf52840\blinky_mbr.zip -p COM3 -b 115200 -fc 0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Run it from the &lt;strong&gt;nRF5_SDK_15.0.0_a53641a&lt;/strong&gt; folder. I got the following output, and the LEDs start blinking.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil dfu serial -pkg examples\dfu\secure_dfu_test_images\uart\nrf52840\blinky_mbr.zip -p COM3 -b 115200 -fc 0
  [####################################]  100%
Device programmed.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I agree that the steps in the example are a bit difficult to follow, as you say they are combination of DIY and use the examples provided.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Before, when you tried to do a DFU, did you generate a DFU packet yourself, or did you use the &lt;strong&gt;blinky_mbr.zip&lt;/strong&gt; packet found in &lt;strong&gt;examples\dfu\secure_dfu_test_images\uart\nrf52840\&lt;/strong&gt; ? Since the error you have now suggests that the SoftDevice firmware id (FWID) of the packet you tried to do a DFU with is wrong compared to the FWID already on the chip.&lt;/p&gt;
&lt;p&gt;If you are creating either your own bootloader or application when you are trying to do the DFU you should note that you need a private key, and you also have to configure whether or not to use flow-control or different baudrates in the sdk_config.h file.&lt;/p&gt;
&lt;p&gt;- Andreas&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/149772?ContentTypeID=1</link><pubDate>Fri, 21 Sep 2018 08:30:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88177a5f-764e-4275-b1b5-7710f82b3074</guid><dc:creator>AndersLundqvist</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;I used the files under ..\examples\dfu\secure_dfu_test_images\uart\nrf52840 and I am using nrfutil.exe version 3.5.1 (which I found on my computer because downloading and the master branch using pip install nrfutil produces som very strange failures probably due to python version mismatch) and nrfjprog.&lt;/p&gt;
&lt;p&gt;I am using several batch files containing the following content&lt;/p&gt;
&lt;p&gt;nrfjprog --eraseall&lt;/p&gt;
&lt;p&gt;nrfjprog --reset --program bootloader_secure_uart_debug_without_bonds_mbr.hex --family NRF52 --sectoranduicrerase&lt;/p&gt;
&lt;p&gt;nrfjprog --reset --program mbr.hex --family NRF52 --sectoranduicrerase&lt;/p&gt;
&lt;p&gt;nrfjprog --reset --program softdevice_s140.hex --family NRF52 --sectoranduicrerase&lt;/p&gt;
&lt;p&gt;nrfutil dfu serial -pkg blinky_mbr.zip -p COM3 -b 115200 -fc 0&lt;/p&gt;
&lt;p&gt;Using the instructions found on&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fsdk_app_serial_dfu_bootloader.html&amp;amp;cp=4_0_0_4_3_4"&gt;http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fsdk_app_serial_dfu_bootloader.html&amp;amp;cp=4_0_0_4_3_4&lt;br /&gt;w&lt;/a&gt;hich by the way is difficult to follow since the instructions are intended for other uses. Which of the points needs to be done in order to test the bootloader? 1? 2? 3? 4? 5? 6? 7? 8? 9? 10?&lt;/p&gt;
&lt;p&gt;The uart has been tested with&amp;nbsp;..\examples\peripheral\uart\pca10056\blank\ses both using the original board (PCA10056) and with my custom board, and it works every time.&lt;/p&gt;
&lt;p&gt;We are using an FTDI cable to connect the devices to the PC and we are not using flow control since it is not available on our custom board, so only GND, RX and TX are used.&lt;/p&gt;
&lt;p&gt;I have tried debugging the bootloader while trying to download the application and it appears that the ping is received in the bootloader and it is replying as expected. Altering the copmmand line to add &amp;quot;-fc 0&amp;quot; did actually do someting for the result from nrfutil. It then became:&lt;/p&gt;
&lt;p&gt;pc_ble_driver_py.exceptions.NordicSemiException: Extended Error 0x07: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice.&lt;/p&gt;
&lt;p&gt;Which may be a good thing since it no longer complains about no response from ping. I have not yet been able to make a package that does not contain an &amp;quot;--sd-req&amp;quot;. This is strange because neither the bootloader nor the application depends on having a softdevice (why is it even included in the &amp;quot;secure_dfu_test_images&amp;quot;?). How can I create that zip file without having to tell nrfutil the version of the soft device when I do not want any soft device?&lt;/p&gt;
&lt;p&gt;If I get this bootloader up and running, which I firmly believes that I already have,&amp;nbsp; there is still a problem on how to create a similar functionality (working that is) like that of nrfutil to be able to download new software over the uart using C-code in a gateway. For that I would like to have som specifications on the protocol...&lt;/p&gt;
&lt;p&gt;Addition:&lt;/p&gt;
&lt;p&gt;Just noted one thing in ReadMe.md &amp;quot;&lt;span&gt;**Note**&lt;/span&gt;: The Thread stack doesn&amp;#39;t use a SoftDevice but --sd-req option is required for compatibility reasons. You can provide any value for the option as it is ignored during DFU.&amp;quot;. Am I to understand that I can put any value in &amp;quot;--sd-req&amp;quot; like for instance 0x00, but then why does nrfutil complain about SoftDevice?&lt;/p&gt;
&lt;p&gt;BTW is there a way to get soft device versions like you get when you use&amp;nbsp;s_dfu_settings.app_version? All I see is the s_dfu_settings.sd_size which may or may not be enough information...&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Anders&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader on custom board using uart</title><link>https://devzone.nordicsemi.com/thread/149759?ContentTypeID=1</link><pubDate>Fri, 21 Sep 2018 07:45:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f99aca9d-5c2e-4e8b-bcc7-506b4e79b4ca</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi Anders.&lt;/p&gt;
&lt;p&gt;When you say you have tested &lt;em&gt;the secure_dfu_test_images &lt;/em&gt;for nRF52840, could you be a bit more specific? Which files have you flashed to your board? Did you follow any of the&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/examples_bootloader.html?cp=4_0_1_4_3"&gt; &lt;strong&gt;DFU bootloader examples &lt;/strong&gt;&lt;/a&gt;and if you did, which example?&lt;/p&gt;
&lt;p&gt;You also say you tested the &lt;em&gt;uart example&lt;/em&gt;, which &lt;strong&gt;UART&lt;/strong&gt; example? The one found in &lt;strong&gt;examples\dfu\secure_dfu_test_images\uart&lt;/strong&gt;, or in &lt;strong&gt;examples\ble_peripheral\ble_app_uart&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;Any more information would be much helpful, so I can try to recreate what you&amp;#39;re doing.&lt;/p&gt;
&lt;p&gt;- Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>