<?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 to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1032/how-to-switch-between-over-the-air-and-uart-bootloader-mode</link><description>Hi,
How to integrate both over-the-air and uart bootloader application for an device? We have a custom board with nrf51822 chipset, and we need to implement the firmware update process, which can support both over-the-air and usb to uart type firmware</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Jul 2017 14:42:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1032/how-to-switch-between-over-the-air-and-uart-bootloader-mode" /><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4890?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2017 14:42:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f093f13-220a-4e63-b990-76864ff75d7e</guid><dc:creator>pol delgado</dc:creator><description>&lt;p&gt;I&amp;#39;m developing a spi+ble bootloader on a custom board with a nrf51802_xAA on SDK11. As a starting point i want to have a functional uart+ble bootloader so i merged both examples. I have found myself in the same issues described above. However after the compilation is complete succesfully and i try to load the program the the flasher ends spitting the following error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Program Size: Code=16304 RO-data=468 RW-data=312 ZI-data=5140  
FromELF: creating hex file...
&amp;quot;.\_build\nrf51422_xxac.axf&amp;quot; - 0 Error(s), 3 Warning(s).
*** Completed Cross-Module-Optimization after 3 iteration(s).
Build Time Elapsed:  00:00:35
nrfjprog.exe --family NRF51 --program &amp;quot;C:\Toolchain\00_Oval\05_toolchain\nRF5_SDK_11.0.0_89a8197 (limpio)\examples\dfu\ovalblebootloader\pca10028\dual_bank_ble_s130\arm5_no_packs\_build\nrf51422_xxac.HEX&amp;quot;
ERROR: There is no debugger connected to the PC.
nrfjprog.exe --family NRF51 --program &amp;quot;C:\Toolchain\00_Oval\05_toolchain\nRF5_SDK_11.0.0_89a8197 (limpio)\examples\dfu\ovalblebootloader\pca10028\dual_bank_ble_s130\arm5_no_packs\_build\nrf51422_xxac.HEX&amp;quot;
Parsing hex file.
ERROR: The file specified is not a valid hex file, has data outside valid areas
ERROR: or does not have data in valid areas.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Any hints ?&lt;/p&gt;
&lt;p&gt;Regards,
Pol&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4889?ContentTypeID=1</link><pubDate>Wed, 18 Jun 2014 03:05:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad571893-d485-45df-b6f8-9833b358abc5</guid><dc:creator>alex_pim</dc:creator><description>&lt;p&gt;Link is working now. Thank you so much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4888?ContentTypeID=1</link><pubDate>Sat, 14 Jun 2014 09:00:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01a90585-8726-4647-b13f-419a5479ed09</guid><dc:creator>alex_pim</dc:creator><description>&lt;p&gt;Could you please reupload boot loader example. Download link is broken.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4887?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2013 17:39:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3f4ea36-a7af-4e2c-aa24-f32bc653da9d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Balaji,&lt;/p&gt;
&lt;p&gt;I am afraid that we don&amp;#39;t have SPI firmware update soon. It&amp;#39;s in the plan but I don&amp;#39;t know when we will actually implement it.
My suggestion that you can base on the HCI transport layer and port it to SPI. They maybe a little bit different but I don&amp;#39;t see any big obstacle here to implement one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4886?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2013 15:35:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cf67089-7f4b-4002-8260-921838f861a3</guid><dc:creator>balaji</dc:creator><description>&lt;p&gt;As i said before we have a custom board with the peripherals like accelerometer, Nor flash, etc.. Our ultimate aim is to collect the data from the accelerometer and store it in Nor flash, when the device is connected to the master (PC or Smart Phone) device need to transfer those data&amp;#39;s as per the request received from the master. And also our device should support the usb connectivity with the masters, for uploading the accelerometer data&amp;#39;s, and also for updating the device firmware.&lt;br /&gt;
For some other reason&amp;#39;s now we cannot able to use the USB (master) to UART(slave) communication. So that we planned to go with USB to SPI communication for both firmware update(master to slave), and data upload (slave to master).
So if we get any sample application regarding spi firmware update it will be more helpful for us to solve the above problems.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4885?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2013 14:27:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8962bcb-9fd3-4411-b48a-8284fd2ae9dc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Balaji:
On the Ev kit you would need to use internal pull up. Please set BUTTON_PULL as NRF_GPIO_PIN_PULLUP instead of NO_PULL&lt;/p&gt;
&lt;p&gt;Could you be more specific on &amp;quot;USB-SPI firmware update&amp;quot; ? Currently only UART firmware update is supported.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4884?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2013 14:00:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4ab6cc4-fe6e-4e61-904b-4790178ecba6</guid><dc:creator>balaji</dc:creator><description>&lt;p&gt;Thanks for the sample code Hung Bui,&lt;/p&gt;
&lt;p&gt;I only tested the ble-bootloader, it is working fine. Before testing the uart-bootloader, i need to confirm, how the bootloader select button works. Since i only have the evaluation board with me(which has two buttons conneccted through gpio 16 &amp;amp; 17) i configured the button0(16) as bootloader select button.&lt;/p&gt;
&lt;p&gt;After flashing your application it is entering into the uart-bootloader mode(default), even if i press the bootloader select button it is not entering into the ble-bootloader mode. But if i press after sometime (i didnt calculate the time) it enters into the ble-bootloader mode. I totally confused on it, so i need to confirm it with you that, am i doing anything wrong.&lt;/p&gt;
&lt;p&gt;I need one more help regarding USB - SPI firmware update, can i get sample application for this?&lt;/p&gt;
&lt;p&gt;Regards,
Balaji.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4883?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2013 18:09:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d10de3c-0a56-4eac-b2f5-3057078c987e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Balaji,&lt;/p&gt;
&lt;p&gt;I have made an example of having both HCI and BLE. If button 6 is pressed bootloader will enter BLE mode, if it is released HCI will be used.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s based on SDK v5.0.0, S110 v6.0.0, the application hex file should be compiled from SDK v5.0.0 as well.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/bootloader-_2D00_-BothHCI_5F00_BLE.zip"&gt;bootloader - BothHCI_BLE.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4882?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2013 14:06:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d39dbc07-36ed-4a0a-a849-d2dcbed8c007</guid><dc:creator>balaji</dc:creator><description>&lt;p&gt;After updating the firmware i didn&amp;#39;t have bootloader advertising, i have checked it fully in debug mode, bootloader is executing fine, but when i check for the application, which is updated in debug mode, it hangs sin for loop with the error code 0x0000000B (in ble_debug_assert_handler();)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4881?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2013 12:39:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3381a7e-2e7d-450c-abc4-daf3fc6c54e9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Balaji,&lt;/p&gt;
&lt;p&gt;After you update firmware, did you have the bootloader advertising or the chip just didn&amp;#39;t response ?&lt;/p&gt;
&lt;p&gt;I suspect that the DFU_REGION_TOTAL_SIZE wasn&amp;#39;t updated accordingly to the change of the size of bootloader.
Could you try to run the bootloader in debug mode (after updated app firmware) to find what goes wrong ?&lt;/p&gt;
&lt;p&gt;If possible, please attach your bootloader project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4880?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2013 15:49:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0915e014-c3c5-4f4d-a051-f3cd80a14872</guid><dc:creator>balaji</dc:creator><description>&lt;p&gt;Thanks for the reply Hung Bui,
I modified the code memory size and start address to 0x5400 and 0x3C000 respectively, and also modified the code to avoid &amp;quot;multiply defined&amp;quot; error. Now the error facing is
._build\bootloader.axf: Error: L6985E: Unable to automatically place AT section bootloader_util_arm.o(.ARM.__AT_0x0003FC00) with required base address 0x0003fc00. Please manually place in the scatter file using the --no_autoat option.
What does it mean, and to overcome this? Looking forward for your example code.&lt;/p&gt;
&lt;p&gt;After setting the Start address = 0x3C400, memory size = 0x5000, and the bootloader setting address = 0x3C000, i can able to build and flash the hexfile with both the bootloaders.
When i enable the ble-bootloader manually, i can able to do the over the air firmware update (followed readme file procedure), but  the application i have flashed is not at all working (not giving advertisement), but without the bootloader application it is working fine.
I have attached the command window log file please refer it and give me your suggestion.&lt;/p&gt;
&lt;p&gt;Regards,
Balaji&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/FirmwareUpdateWindow.png" alt="FirmwareUpdateWindow.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4879?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2013 10:45:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc92f15e-6eec-4061-a6a6-44f007967291</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Balaji,&lt;/p&gt;
&lt;p&gt;You will need to compile both transport layer in one project (include in Target build).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Since BLE and HCI transport layer share some same function, there will be &amp;quot;multiply defined&amp;quot; for those functions. You would need to modify the function name, and branch out two options when calling them depend on which protocol is running.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The size of the bootloader will be bigger than 13KB as it is now, you would need to modify the code memory size and start address (IROM1). BOOTLOADER_REGION_START also need to modified accordingly.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I afraid that I don&amp;#39;t have the example ready for now. I will try to make one in the next few days, if there is some spare time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4878?ContentTypeID=1</link><pubDate>Sat, 30 Nov 2013 08:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0d137f4-b1fb-4fa9-9dbb-664df82a137e</guid><dc:creator>balaji</dc:creator><description>&lt;p&gt;Thanks for the reply Hung BUi,&lt;/p&gt;
&lt;p&gt;How to modify the transport layer in the exiting bootloader example? Do i need to enable &lt;strong&gt;Include in Target Build&lt;/strong&gt; option for both the transport layer source codes?&lt;/p&gt;
&lt;p&gt;When i try to compile both the transport layers in the same project it is giving error as below,&lt;/p&gt;
&lt;p&gt;._build\bootloader.axf: Error: L6407E: Sections of aggregate size 0x540 bytes could not fit into .ANY selector(s).&lt;/p&gt;
&lt;p&gt;Sounds like memory issue.&lt;/p&gt;
&lt;p&gt;Am i doing it in a wrong way, which is not recommended by you?&lt;/p&gt;
&lt;p&gt;Simple example of your own will help me a lot.&lt;/p&gt;
&lt;p&gt;Regards,
Balaji.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to Switch between over-the-air and uart bootloader mode?</title><link>https://devzone.nordicsemi.com/thread/4877?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2013 13:36:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18cd8c86-c357-4899-b949-a2b3eeee1d16</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Balaji: The current bootloader example wasn&amp;#39;t made for both BLE and UART be exist at the same time.
You can, however, modify the bootloader example to do so. The transport layers need to be modified so that they can compiled in a same project and will be selected in run time.&lt;/p&gt;
&lt;p&gt;To chose which type of bootloader will be selected, you can use a switch on a GPIO pin that automatically switch on when the device is plugged into USB port. Other solution is to start with one bootloader type (BLE or UART) for a period of time before switching to the other one.&lt;/p&gt;
&lt;p&gt;We currently don&amp;#39;t have an example of doing so, but I don&amp;#39;t see any reason this shouldn&amp;#39;t work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>