<?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>nrf52840 - DFU via USB - Bootloader seems to work but app will not start.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49087/nrf52840---dfu-via-usb---bootloader-seems-to-work-but-app-will-not-start</link><description>Hi there, I&amp;#39;m developing on an nRF52840 using the nRF52 SDK in version 15.3.0 (15.3.0_59ac345). My project consists of the main application, the softdevice and a bootloader with usb dfu support from the SDK&amp;#39;s example section (examples/dfu/secure_bootloader</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Jan 2024 05:32:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49087/nrf52840---dfu-via-usb---bootloader-seems-to-work-but-app-will-not-start" /><item><title>RE: nrf52840 - DFU via USB - Bootloader seems to work but app will not start.</title><link>https://devzone.nordicsemi.com/thread/464944?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2024 05:32:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:222fa3fb-0f13-4bfe-b7e1-da007e7652d3</guid><dc:creator>sne_333</dc:creator><description>&lt;p&gt;I am facing the same issue. How do I solve this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 - DFU via USB - Bootloader seems to work but app will not start.</title><link>https://devzone.nordicsemi.com/thread/238177?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2020 07:54:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60a14cfe-b274-4ae5-b6ce-e44f0e80f981</guid><dc:creator>astella</dc:creator><description>&lt;p&gt;Hi Marco,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using nRF52840, default PCA10056 board. SDK15.2, softdevice s132_nrf52_5.1.0_softdevice.hex. A .bat file using instructions like you mentioned worked indeed like a charm. May I ask, did you find what the issue was? Just curious about that. Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 - DFU via USB - Bootloader seems to work but app will not start.</title><link>https://devzone.nordicsemi.com/thread/196241?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 11:24:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45b46196-5059-443b-a355-718c9f83dec3</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Marco, the linker settings looks good.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have not modified the bootloader projects linker script, then it should start at 0xf8000, so no issue there. Please try to attach the debug probe to the running program and see where the nRF52840 is executing code after the DFU.&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: nrf52840 - DFU via USB - Bootloader seems to work but app will not start.</title><link>https://devzone.nordicsemi.com/thread/196052?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 15:20:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32c3424c-1a77-413c-9e43-6ba8b625e11e</guid><dc:creator>marco c.</dc:creator><description>&lt;p&gt;Hi Bj&amp;oslash;rn,&lt;/p&gt;
&lt;p&gt;here is an excerpt from the .map file. U&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;nfortunately I can&amp;#39;t post the whole content of the file without&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;getting an error. Maybe the file has too many lines.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[...]

Memory Configuration

Name             Origin             Length             Attributes
FLASH            0x0000000000026000 0x00000000000ca000 xr
RAM              0x0000000020002220 0x000000000003dde0 xrw
uicr_bootloader_start_address 0x0000000000000ff8 0x0000000000000004 r
*default*        0x0000000000000000 0xffffffffffffffff

Linker script and memory map


.text           0x0000000000026000     0xcaf4
 *(.isr_vector)
 .isr_vector    0x0000000000026000      0x200 _build/nrf52840_xxaa/gcc_startup_nrf52840.S.o
                0x0000000000026000                __isr_vector
 *(.text*)
 .text.__do_global_dtors_aux
                0x0000000000026200       0x24 /usr/lib/gcc/arm-none-eabi/9.1.0/thumb/v7e-m+fp/hard/crtbegin.o
 .text.frame_dummy
                0x0000000000026224       0x1c /usr/lib/gcc/arm-none-eabi/9.1.0/thumb/v7e-m+fp/hard/crtbegin.o
 .text          0x0000000000026240       0x68 /usr/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o
                0x0000000000026240                _mainCRTStartup
                0x0000000000026240                _start
 .text          0x00000000000262a8       0x3c _build/nrf52840_xxaa/gcc_startup_nrf52840.S.o
                0x00000000000262a8                Reset_Handler
                0x00000000000262d0                NMI_Handler
                0x00000000000262d2                HardFault_Handler
                0x00000000000262d4                MemoryManagement_Handler
                0x00000000000262d6                BusFault_Handler
                0x00000000000262d8                UsageFault_Handler
                0x00000000000262da                SVC_Handler
                0x00000000000262dc                DebugMon_Handler
                0x00000000000262de                PendSV_Handler
                0x00000000000262e0                SysTick_Handler
                0x00000000000262e2                TIMER2_IRQHandler
                0x00000000000262e2                RTC0_IRQHandler
                0x00000000000262e2                PWM1_IRQHandler
                0x00000000000262e2                RADIO_IRQHandler
                0x00000000000262e2                PDM_IRQHandler
                0x00000000000262e2                TEMP_IRQHandler
                0x00000000000262e2                QDEC_IRQHandler
                0x00000000000262e2                TIMER3_IRQHandler
                0x00000000000262e2                PWM3_IRQHandler
                0x00000000000262e2                FPU_IRQHandler
                0x00000000000262e2                USBD_IRQHandler
                0x00000000000262e2                SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
                0x00000000000262e2                TIMER4_IRQHandler
                0x00000000000262e2                CRYPTOCELL_IRQHandler
                0x00000000000262e2                I2S_IRQHandler
                0x00000000000262e2                SWI4_EGU4_IRQHandler
                0x00000000000262e2                TIMER0_IRQHandler
                0x00000000000262e2                UARTE1_IRQHandler
                0x00000000000262e2                TIMER1_IRQHandler
                0x00000000000262e2                SPIM3_IRQHandler
                0x00000000000262e2                PWM2_IRQHandler
                0x00000000000262e2                ECB_IRQHandler
                0x00000000000262e2                SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
                0x00000000000262e2                Default_Handler
                0x00000000000262e2                SAADC_IRQHandler
                0x00000000000262e2                CCM_AAR_IRQHandler
                0x00000000000262e2                WDT_IRQHandler
                0x00000000000262e2                SWI5_EGU5_IRQHandler
                0x00000000000262e2                RNG_IRQHandler
                0x00000000000262e2                RTC2_IRQHandler
                0x00000000000262e2                PWM0_IRQHandler
                0x00000000000262e2                SWI3_EGU3_IRQHandler
                0x00000000000262e2                SWI1_EGU1_IRQHandler
                0x00000000000262e2                SPIM2_SPIS2_SPI2_IRQHandler
                0x00000000000262e2                NFCT_IRQHandler
                0x00000000000262e2                MWU_IRQHandler
                0x00000000000262e2                QSPI_IRQHandler
                0x00000000000262e2                COMP_LPCOMP_IRQHandler
[...]&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And here is the content of the linker script.&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 = 0x26000, LENGTH = 0xca000
  RAM (rwx) :  ORIGIN = 0x20002220, LENGTH = 0x3dde0
  uicr_bootloader_start_address (r) : ORIGIN = 0x00000FF8, LENGTH = 0x4
}

SECTIONS
{
  . = ALIGN(4);
  .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
  .log_filter_data :
  {
    PROVIDE(__start_log_filter_data = .);
    KEEP(*(SORT(.log_filter_data*)))
    PROVIDE(__stop_log_filter_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 :
  {
  }
  .sdh_ble_observers :
  {
    PROVIDE(__start_sdh_ble_observers = .);
    KEEP(*(SORT(.sdh_ble_observers*)))
    PROVIDE(__stop_sdh_ble_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
  .pwr_mgmt_data :
  {
    PROVIDE(__start_pwr_mgmt_data = .);
    KEEP(*(SORT(.pwr_mgmt_data*)))
    PROVIDE(__stop_pwr_mgmt_data = .);
  } &amp;gt; FLASH
  .log_const_data :
  {
    PROVIDE(__start_log_const_data = .);
    KEEP(*(SORT(.log_const_data*)))
    PROVIDE(__stop_log_const_data = .);
  } &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_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
  .log_backends :
  {
    PROVIDE(__start_log_backends = .);
    KEEP(*(SORT(.log_backends*)))
    PROVIDE(__stop_log_backends = .);
  } &amp;gt; FLASH
    .nrf_balloc :
  {
    PROVIDE(__start_nrf_balloc = .);
    KEEP(*(.nrf_balloc))
    PROVIDE(__stop_nrf_balloc = .);
  } &amp;gt; FLASH

} INSERT AFTER .text


INCLUDE &amp;quot;nrf_common.ld&amp;quot;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The idea with the debug probe sounds good. I&amp;#39;ll try this tomorrow.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Marco&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 - DFU via USB - Bootloader seems to work but app will not start.</title><link>https://devzone.nordicsemi.com/thread/195713?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 14:39:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf2851bc-3b79-4477-ad03-8542118fea13</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi marco,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;are you able to attach to the nRF52840 with a debug probe and see if you reach the application code or if you end up in the HardFault handler? You can use Segger Ozone or Segger embedded studio to attach to a running target without reflashing the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you also post the linker settings and .map file of the compiled application example? I would like to check that the application vector table is located where it is supposed to be.&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>