<?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>Unable to flash after adding bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50482/unable-to-flash-after-adding-bootloader</link><description>Hi, 
 So I&amp;#39;ve made a post that I was unable to debug my app with the bootloader. But I&amp;#39;ve found out that it is entirely different problem. So my app is runnning whit FreeRTOS and I am using the buttonless bootloader debug example on the SDK15.0.0 with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Aug 2019 14:14:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50482/unable-to-flash-after-adding-bootloader" /><item><title>RE: Unable to flash after adding bootloader</title><link>https://devzone.nordicsemi.com/thread/202464?ContentTypeID=1</link><pubDate>Mon, 05 Aug 2019 14:14:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3495b52-a972-4d9e-b445-5c28d45bb6d9</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;The application should not place any data to that specific UICR register, its only the bootloader that should do this.&amp;nbsp;0x10001014 is the register that the MBR checks to see if there is a bootloader present or not.&lt;/p&gt;
&lt;p&gt;Do not use nRFGo Studio to flash nRF52 ICs. Use the nRF Programmer app in nRF Connect for Desktop or nrfjprog the latest version of the nRF Command Line Tools instead. See&amp;nbsp;&lt;a title="Programming nRF5x SoCs with nrfjprog" href="https://infocenter.nordicsemi.com/topic/ug_nrf5x_cltools/UG/cltools/nrf5x_nrfjprogexe.html?cp=6_1_3"&gt;Programming nRF5x SoCs with nrfjprog&lt;/a&gt;&amp;nbsp;on how to use nrfjprog.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The layout does not look right. There should be a blue section that contains the SoftDevice inbetween the MBR(orange) and the application (green).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to flash after adding bootloader</title><link>https://devzone.nordicsemi.com/thread/202221?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2019 18:21:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fce02da2-1aa4-4429-9780-dd4fec654285</guid><dc:creator>Xavier</dc:creator><description>&lt;p&gt;I can now flash everything normally using nrfgo studio, I just erased all the memory on the device and it now works and an updated version of my app can run. Although, when I use eclipse to debug, I do not know how to use the .hex file instead of the .out and run and debug normally. If I use the .out file generated, it does not update the app. I tried to flash the setting instead of combining with the app using&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog -f nrf52 --program ./setting.hex --sectorerase&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;but sadly the debugging still does not work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to flash after adding bootloader</title><link>https://devzone.nordicsemi.com/thread/202202?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2019 15:04:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50076b2b-a17f-40f6-bb41-01d9ced4abb0</guid><dc:creator>Xavier</dc:creator><description>&lt;p&gt;Actually I have fixed this error, I have removed the line&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;pre class="ui-code" data-mode="text"&gt;uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in my application linker file, but I still cannot flash.&lt;/p&gt;
&lt;p&gt;It says I am flashing in the softdevice section using nrfGo, and for nrf connect programmer I get this layout&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1040x240/__key/communityserver-discussions-components-files/4/5751.Capture2.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;I cannot flash using nrf connect programmer, I do not know why. The buttons are simly disabled and the device memory layout is never working&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to flash after adding bootloader</title><link>https://devzone.nordicsemi.com/thread/202201?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2019 14:59:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b509b061-fcd2-49a7-8ea6-5239367ef035</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Can you upload the .map files for both the application and the bootloader?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to flash after adding bootloader</title><link>https://devzone.nordicsemi.com/thread/202172?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2019 13:39:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bc5e7d1-68ec-455c-babe-521b3a72aa90</guid><dc:creator>Xavier</dc:creator><description>&lt;p&gt;I tried using nrf connect programmer to flash, but I get a similar error&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1040x240/__key/communityserver-discussions-components-files/4/Annotation-2019_2D00_08_2D00_02-093535.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to flash after adding bootloader</title><link>https://devzone.nordicsemi.com/thread/202164?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2019 13:22:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13ff64ab-89de-4051-b1d0-a9feda66825f</guid><dc:creator>Xavier</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;Bj&amp;oslash;rn&lt;/span&gt;, thanks for the input.&lt;br /&gt;&lt;br /&gt;I tried to merge the settings the bootloader and the app hexfiles by using these commands&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;../../../nrfutil/nrfutil.exe settings generate --family NRF52 --application ./_build/nrf52832_xxaa.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 setting.hex
mergehex -m ../../bootloader/_build/nrf52832_xxaa_s132.hex setting.hex -o bootloader_and_setting.hex
mergehex -m ./_build/nrf52832_xxaa.hex bootloader_and_setting.hex -o app_bootloader_and_setting.hex&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But I get the error &amp;quot;The hex files cannot be merged since there are conflicts&amp;quot; on the last command to merge the bootloader with settings and the app. Since you said my linker settings are correct I am a bit confused.&lt;/p&gt;
&lt;p&gt;Here is my linker setting for the Bootloader: (I used the one form the buttonless dfu example so it should work in theory)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* Linker script to configure memory regions. */

SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)

MEMORY
{
  FLASH (rx) : ORIGIN = 0x72000, LENGTH = 0xc000
  RAM (rwx) :  ORIGIN = 0x200057b8, LENGTH = 0xa848
  uicr_mbr_params_page (r) : ORIGIN = 0x10001018, LENGTH = 0x4
  mbr_params_page (r) : ORIGIN = 0x0007E000, LENGTH = 0x1000
  bootloader_settings_page (r) : ORIGIN = 0x0007F000, LENGTH = 0x1000
  uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4
}

SECTIONS
{
  .uicr_mbr_params_page :
  {
    PROVIDE(__start_uicr_mbr_params_page = .);
    KEEP(*(SORT(.uicr_mbr_params_page*)))
    PROVIDE(__stop_uicr_mbr_params_page = .);
  } &amp;gt; uicr_mbr_params_page
  .mbr_params_page(NOLOAD) :
  {
    PROVIDE(__start_mbr_params_page = .);
    KEEP(*(SORT(.mbr_params_page*)))
    PROVIDE(__stop_mbr_params_page = .);
  } &amp;gt; mbr_params_page
  .bootloader_settings_page(NOLOAD) :
  {
    PROVIDE(__start_bootloader_settings_page = .);
    KEEP(*(SORT(.bootloader_settings_page*)))
    PROVIDE(__stop_bootloader_settings_page = .);
  } &amp;gt; bootloader_settings_page
  .uicr_bootloader_start_address :
  {
    PROVIDE(__start_uicr_bootloader_start_address = .);
    KEEP(*(SORT(.uicr_bootloader_start_address*)))
    PROVIDE(__stop_uicr_bootloader_start_address = .);
  } &amp;gt; uicr_bootloader_start_address
}

SECTIONS
{
  . = ALIGN(4);
  .mem_section_dummy_ram :
  {
  }
  .log_dynamic_data :
  {
    PROVIDE(__start_log_dynamic_data = .);
    KEEP(*(SORT(.log_dynamic_data*)))
    PROVIDE(__stop_log_dynamic_data = .);
  } &amp;gt; RAM
  .fs_data :
  {
    PROVIDE(__start_fs_data = .);
    KEEP(*(.fs_data))
    PROVIDE(__stop_fs_data = .);
  } &amp;gt; RAM

} INSERT AFTER .data;

SECTIONS
{
  .mem_section_dummy_rom :
  {
  }
  .crypto_data :
  {
    PROVIDE(__start_crypto_data = .);
    KEEP(*(SORT(.crypto_data*)))
    PROVIDE(__stop_crypto_data = .);
  } &amp;gt; FLASH
    .nrf_queue :
  {
    PROVIDE(__start_nrf_queue = .);
    KEEP(*(.nrf_queue))
    PROVIDE(__stop_nrf_queue = .);
  } &amp;gt; FLASH
  .dfu_trans :
  {
    PROVIDE(__start_dfu_trans = .);
    KEEP(*(SORT(.dfu_trans*)))
    PROVIDE(__stop_dfu_trans = .);
  } &amp;gt; FLASH
  .log_const_data :
  {
    PROVIDE(__start_log_const_data = .);
    KEEP(*(SORT(.log_const_data*)))
    PROVIDE(__stop_log_const_data = .);
  } &amp;gt; FLASH
    .nrf_balloc :
  {
    PROVIDE(__start_nrf_balloc = .);
    KEEP(*(.nrf_balloc))
    PROVIDE(__stop_nrf_balloc = .);
  } &amp;gt; FLASH
    .svc_data :
  {
    PROVIDE(__start_svc_data = .);
    KEEP(*(.svc_data))
    PROVIDE(__stop_svc_data = .);
  } &amp;gt; FLASH
  .sdh_ble_observers :
  {
    PROVIDE(__start_sdh_ble_observers = .);
    KEEP(*(SORT(.sdh_ble_observers*)))
    PROVIDE(__stop_sdh_ble_observers = .);
  } &amp;gt; FLASH
  .sdh_state_observers :
  {
    PROVIDE(__start_sdh_state_observers = .);
    KEEP(*(SORT(.sdh_state_observers*)))
    PROVIDE(__stop_sdh_state_observers = .);
  } &amp;gt; FLASH
  .sdh_stack_observers :
  {
    PROVIDE(__start_sdh_stack_observers = .);
    KEEP(*(SORT(.sdh_stack_observers*)))
    PROVIDE(__stop_sdh_stack_observers = .);
  } &amp;gt; FLASH
  .sdh_req_observers :
  {
    PROVIDE(__start_sdh_req_observers = .);
    KEEP(*(SORT(.sdh_req_observers*)))
    PROVIDE(__stop_sdh_req_observers = .);
  } &amp;gt; FLASH
  .sdh_soc_observers :
  {
    PROVIDE(__start_sdh_soc_observers = .);
    KEEP(*(SORT(.sdh_soc_observers*)))
    PROVIDE(__stop_sdh_soc_observers = .);
  } &amp;gt; FLASH

} INSERT AFTER .text

INCLUDE &amp;quot;nrf_common.ld&amp;quot;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And as you can see the bootloader does start at 0x72000.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to flash after adding bootloader</title><link>https://devzone.nordicsemi.com/thread/202045?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2019 07:59:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64a6eb72-68da-46ae-acde-759687ae91b7</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Xavier,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the bootloader starts at 0x72000, then the linker settings are correct.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We do not recommend using nRFGO Studio as it is deprecated for the nRF52 Series, use the nRF Programmer app in nRF Connect for Desktop or the latest version of the nRF Command Line Tools instead.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When debugging an application with the bootloader present you need to generate the bootloader settings page that contains the CRC of the application. This is done with pc-nrfutil, see&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil#settings"&gt;https://github.com/NordicSemiconductor/pc-nrfutil#settings&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So my advice would be to add a build step in your IDE calls nrfutil and generates the settings.hex file and then flashes this using nrfjprog.&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></channel></rss>