<?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>DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem</link><description>Hello, 
 Currently, I&amp;#39;m trying to flash my custom board that has nRF52832 with an uart application that I integrated buttonless DFU. I&amp;#39;m running into a problem where when I try to flash my hex file that has the following combination : 
 
 Softdevice </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Jul 2020 12:00:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem" /><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/258786?ContentTypeID=1</link><pubDate>Tue, 07 Jul 2020 12:00:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fdecc54-667e-4a98-9918-65ff381a8bf3</guid><dc:creator>Fikri Saman</dc:creator><description>&lt;p&gt;Alright. Thanks either way for your help. I appreciate it alot &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f601.svg" title="Grin"&gt;&amp;#x1f601;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/258784?ContentTypeID=1</link><pubDate>Tue, 07 Jul 2020 11:55:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4583e9d0-e435-4a27-88b2-f0bbf91d69cf</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Then there is not enough space to run on the small chip. I am sorry. You need to use the big version, or use a smaller application and an older SDK that has a smaller bootloader. There is nothing more we can do about this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/258738?ContentTypeID=1</link><pubDate>Tue, 07 Jul 2020 08:10:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eda66711-1d1f-46a5-94a7-b8ecaf6c0768</guid><dc:creator>Fikri Saman</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem/258633"]try running this on a DK with full flash and RAM[/quote]
&lt;p&gt;I ran the original bootloader (PCA10040E S112 debug) on my nRF52832 DK and it was working well. Though I am not sure what you mean by full flash and RAM but here is what the memory layout looks like :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pca10040e_5F00_DK.png" /&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem/258633"]&amp;nbsp;What trouble are you actually having?[/quote]
&lt;p&gt;I flashed the PCA10040E debug version that I modified to use S132 on my DK and this is the memory layout :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pca10040e_5F00_256k_5F00_debug.png" /&gt;&lt;/p&gt;
&lt;p&gt;It seems to me that there is not enough space for my main application.&amp;nbsp;Here is what I got when I tried to DFU my main application&amp;nbsp;:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: Inside main
&amp;lt;debug&amp;gt; app: In nrf_bootloader_init
&amp;lt;debug&amp;gt; nrf_dfu_settings: Calling nrf_dfu_settings_init()...
&amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
&amp;lt;warning&amp;gt; nrf_dfu_settings: Resetting bootloader settings since neither the settings page nor the backup are valid (CRC error).
&amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...
&amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x0003F000
&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x0003F000, lending 0
ding 0
&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0x3E000.
&amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...
&amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x0003E000
&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x0003E000, len=1 pages), queue usage: 1
&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x0003E000, pending 0
&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x0003E000, src=0x20007ACC, len=896 bytes), queue usage: 1
ding 0
&amp;lt;info&amp;gt; app: Entering DFU mode.
&amp;lt;debug&amp;gt; app: Initializing transports (found: 1)
&amp;lt;debug&amp;gt; nrf_dfu_ble: Initializing BLE DFU transport
&amp;lt;debug&amp;gt; nrf_dfu_ble: Setting up vector table: 0x00031000
&amp;lt;debug&amp;gt; nrf_dfu_ble: Enabling SoftDevice.
&amp;lt;debug&amp;gt; nrf_dfu_ble: Configuring BLE stack.
&amp;lt;debug&amp;gt; nrf_dfu_ble: Enabling the BLE stack.
&amp;lt;debug&amp;gt; nrf_dfu_ble: No advertising name found
&amp;lt;debug&amp;gt; nrf_dfu_ble: Using default advertising name
&amp;lt;debug&amp;gt; nrf_dfu_ble: Advertising...
&amp;lt;debug&amp;gt; app: Enter main loop
&amp;lt;debug&amp;gt; nrf_dfu_ble: Connected
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
&amp;lt;debug&amp;gt; nrf_dfu_ble: max_conn_interval: 12
&amp;lt;debug&amp;gt; nrf_dfu_ble: min_conn_interval: 12
&amp;lt;debug&amp;gt; nrf_dfu_ble: slave_latency: 0
&amp;lt;debug&amp;gt; nrf_dfu_ble: conn_sup_timeout: 600
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
&amp;lt;debug&amp;gt; nrf_dfu_ble: max_conn_interval: 6
&amp;lt;debug&amp;gt; nrf_dfu_ble: min_conn_interval: 6
&amp;lt;debug&amp;gt; nrf_dfu_ble: slave_latency: 0
&amp;lt;debug&amp;gt; nrf_dfu_ble: conn_sup_timeout: 500
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
&amp;lt;debug&amp;gt; nrf_dfu_ble: max_conn_interval: 12
&amp;lt;debug&amp;gt; nrf_dfu_ble: min_conn_interval: 12
&amp;lt;debug&amp;gt; nrf_dfu_ble: slave_latency: 0
&amp;lt;debug&amp;gt; nrf_dfu_ble: conn_sup_timeout: 600
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST (request: 517, reply: 247).
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST.
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_DATA_LENGTH_UPDATE (251, max_rx_time 2120).
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_SELECT (command)
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
&amp;lt;debug&amp;gt; nrf_dfu_ble: Set receipt notif
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_RECEIPT_NOTIF_SET
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
&amp;lt;debug&amp;gt; app: Shutting down transports (found: 1)
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (command)
&amp;lt;debug&amp;gt; app: timer_stop (0x20005984)
&amp;lt;debug&amp;gt; app: timer_activate (0x20005984)
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
&amp;lt;debug&amp;gt; nrf_dfu_ble: Buffer 0x200066B0 acquired, len 141 (244)
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
&amp;lt;debug&amp;gt; nrf_dfu_ble: Freeing buffer 0x200066B0
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (command)
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (command)
&amp;lt;debug&amp;gt; nrf_dfu_validation: PB: Init packet data len: 64
&amp;lt;info&amp;gt; nrf_dfu_validation: Signature required. Checking signature.
&amp;lt;info&amp;gt; nrf_dfu_validation: Calculating hash (len: 64)
&amp;lt;info&amp;gt; nrf_dfu_validation: Verify signature
&amp;lt;info&amp;gt; nrf_dfu_validation: Image verified
&amp;lt;debug&amp;gt; app: Enter nrf_dfu_cache_prepare()
&amp;lt;debug&amp;gt; app: required_size: 0x9268.
&amp;lt;debug&amp;gt; app: single_bank: false.
&amp;lt;debug&amp;gt; app: keep_app: false.
&amp;lt;debug&amp;gt; app: pass: 0.
&amp;lt;debug&amp;gt; app: cache_address: 0x26000.
&amp;lt;debug&amp;gt; app: cache_too_small: true.
&amp;lt;debug&amp;gt; app: keep_firmware: false.
&amp;lt;debug&amp;gt; app: delete_more: true.
&amp;lt;debug&amp;gt; app: pass: 1.
&amp;lt;debug&amp;gt; app: cache_address: 0x26000.
&amp;lt;debug&amp;gt; app: cache_too_small: true.
&amp;lt;debug&amp;gt; app: keep_firmware: true.
0x4
&amp;lt;warning&amp;gt; nrf_dfu_ble: DFU request 4 failed with error: 0x4
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
&amp;lt;debug&amp;gt; nrf_dfu_ble: max_conn_interval: 6
&amp;lt;debug&amp;gt; nrf_dfu_ble: min_conn_interval: 6
&amp;lt;debug&amp;gt; nrf_dfu_ble: slave_latency: 0
&amp;lt;debug&amp;gt; nrf_dfu_ble: conn_sup_timeout: 500
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
&amp;lt;debug&amp;gt; nrf_dfu_ble: max_conn_interval: 12
&amp;lt;debug&amp;gt; nrf_dfu_ble: min_conn_interval: 12
&amp;lt;debug&amp;gt; nrf_dfu_ble: slave_latency: 0
&amp;lt;debug&amp;gt; nrf_dfu_ble: conn_sup_timeout: 600&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/258633?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 14:18:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:154a0b5f-fbbd-4171-9cb8-b51b3af160c1</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;We are really short staffed in support due to summer holidays. Can you please&amp;nbsp; try running this on a DK with full flash and RAM to make sure that everything else is working before you take on the smaller variant?&lt;/p&gt;
&lt;p&gt;Some of it is probably because of the increased RAM by the softdevice yes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Fikri Saman"]I was able to compile and build the project. I also managed to flash it on my custom board. But the placement of the bootloader will cause some trouble.[/quote]
&lt;p&gt;&amp;nbsp;What trouble are you actually having?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/258626?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 13:58:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9edad03-f715-4fb0-9450-b17af08f8cf9</guid><dc:creator>Fikri Saman</dc:creator><description>&lt;p&gt;With the following configurations, the bootloader used up about 35.4kB of RAM, which does not leave me&amp;nbsp;enough space for my application :&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;FLASH_PH_START=0x0 
FLASH_PH_SIZE=0x40000
RAM_PH_START=0x20000000
RAM_PH_SIZE=0x10000
FLASH_START=0x31000
FLASH_SIZE=0x6000
RAM_START=0x20005968
RAM_SIZE=0xa698&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Flash placement :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3326.flash_5F00_placement.xml"&gt;devzone.nordicsemi.com/.../3326.flash_5F00_placement.xml&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Before any changes were made, it only uses, as you said,&amp;nbsp;&lt;span&gt;20kB&amp;nbsp;of RAM. Is it because due to the changing of softdevice that causes it to increase?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/258613?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 13:25:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:883dbeec-d50d-4c64-8f82-adad031f51bf</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Oh, I didn&amp;#39;t catch that it was a separate issue. So where did you want to place the bootloader? Did you try to move it to where you want it? Looks like you can move it something like 0x9000 up. Did you try to do so?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/258583?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 11:43:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1436123c-bbd3-4200-b60f-9a59c519bec6</guid><dc:creator>Fikri Saman</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem/258580"]Do you use the S132 as a requirement?[/quote]
&lt;p&gt;Yes, since my application uses s132&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem/258580"]I assume it is the S132, but what version?[/quote]
&lt;p&gt;Version 7.0.1.&lt;/p&gt;
&lt;p&gt;I already solved the problem with the softdevice version check. My current problem is having to change my bootloader starting address to later accommodate my application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/258580?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 11:37:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdd30977-99bd-40a0-98a5-b0b07eb3e6fb</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;[quote user="Edvin Holmseth"][/quote]&lt;/p&gt;
&lt;p&gt;Looks like the softdevice version check failed. Do you use the S132 as a requirement? What --sd-req did you use when you generated the packet, and what softdevice did you flash on your device? I assume it is the S132, but what version?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you tried to debug to see where in sd_req_check() it fails?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/258569?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 10:22:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc69945a-3b92-4430-9cb6-8afaaef878cc</guid><dc:creator>Fikri Saman</dc:creator><description>&lt;p&gt;I&amp;#39;m using s132 v7.0.1. I did some modifications to the PCA10040e bootloader&amp;#39;s configuration :&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I changed the Memory Segments :&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;FLASH RX 0x0 0x40000;RAM RWX 0x20000000 0x8000;uicr_bootloader_start_address RX 0x10001014 0x4;bootloader_settings_page RX 0x0003F000 0x1000;uicr_mbr_params_page RX 0x10001018 0x4;mbr_params_page RX 0x0003E000 0x1000&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I changed the Section Placement Macros :&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;FLASH_PH_START=0x0 
FLASH_PH_SIZE=0x40000
RAM_PH_START=0x20000000
RAM_PH_SIZE=0x6000
FLASH_START=0x28000
FLASH_SIZE=0x6000
RAM_START=0x20002ad8
RAM_SIZE=0xa698&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I changed the softdevice in the loader to s132 v7.0.1&lt;/li&gt;
&lt;li&gt;I changed the Target Device to nRF52832_xxAA&lt;/li&gt;
&lt;li&gt;Register Definition File to&amp;nbsp;../../../../../modules/nrfx/mdk/nrf52832.svd&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I was able to compile and build the project. I also managed to flash it on my custom board. But the placement of the bootloader will cause some trouble. Here what the memory layout looks like :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pca10040e.png" /&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know I tried to change the FLASH_START to 0x3DF90 but end up getting some errors.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/258557?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 09:50:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5e34644-47e1-47c0-ab5b-f12d41f5b920</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Looks like the softdevice version check failed. Do you use the S132 as a requirement? What --sd-req did you use when you generated the packet, and what softdevice did you flash on your device? I assume it is the S132, but what version?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you tried to debug to see where in sd_req_check() it fails?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/258128?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 13:42:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:824f1bae-1c10-4058-a675-4039755c2907</guid><dc:creator>Fikri Saman</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem/258096"]However, I suspect that you will run into some issues. Looking at the placement of the files, it looks like there is not enough RAM to run your application:[/quote]
&lt;p&gt;Yes, you are correct. I got these errors :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;..
&amp;lt;warning&amp;gt; app: Aborting. Cannot fit new firmware on device
&amp;lt;error&amp;gt; nrf_dfu_validation: Can&amp;#39;t find room for update
..&lt;/pre&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem/258096"]Alternatively, see if you can port the pca10040e bootloader project. It only uses 20kB of RAM, but you need to change it to using the S132 if that is what you are using.[/quote]
&lt;p&gt;I&amp;#39;m not sure if my porting was correct, but here is what I did. I changed s112 to s132 in Code-&amp;gt;Preprocessor-&amp;gt;Preprocessor Definitions. Then I changed the header files in User Include Directories :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;../../../../../components/softdevice/s132/headers&lt;/li&gt;
&lt;li&gt;../../../../../components/softdevice/s132/headers/nrf52&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I flashed and did a debug&amp;nbsp;session on the bootloader, tried to update it with the main application got the following problem :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: Inside main
&amp;lt;debug&amp;gt; app: In nrf_bootloader_init
&amp;lt;debug&amp;gt; nrf_dfu_settings: Calling nrf_dfu_settings_init()...
&amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
&amp;lt;warning&amp;gt; nrf_dfu_settings: Resetting bootloader settings since neither the settings page nor the backup are valid (CRC error).
&amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...
&amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x0002F000
&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x0002F000, len=1 pages), queue usage: 0
&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x0002F000, pending 0
&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x0002F000, src=0x200040AC, len=896 bytes), queue usage: 1
&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x0002F000, pending 0
&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0x2E000.
&amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...
&amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x0002E000
&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x0002E000, len=1 pages), queue usage: 1
&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x0002E000, pending 0
&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x0002E000, src=0x2000442C, len=896 bytes), queue usage: 1
&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x0002E000, pending 0
&amp;lt;debug&amp;gt; app: Enter nrf_bootloader_fw_activate
&amp;lt;info&amp;gt; app: No firmware to activate.
&amp;lt;info&amp;gt; app: Boot validation failed. No valid app to boot.
&amp;lt;debug&amp;gt; app: DFU mode because app is not valid.
&amp;lt;info&amp;gt; nrf_bootloader_wdt: WDT is not enabled
&amp;lt;debug&amp;gt; app: in weak nrf_dfu_init_user
&amp;lt;debug&amp;gt; app: timer_stop (0x200022E4)
&amp;lt;debug&amp;gt; app: timer_activate (0x200022E4)
&amp;lt;info&amp;gt; app: Entering DFU mode.
&amp;lt;debug&amp;gt; app: Initializing transports (found: 1)
&amp;lt;debug&amp;gt; nrf_dfu_ble: Initializing BLE DFU transport
&amp;lt;debug&amp;gt; nrf_dfu_ble: Setting up vector table: 0x00022000
&amp;lt;debug&amp;gt; nrf_dfu_ble: Enabling SoftDevice.
&amp;lt;debug&amp;gt; nrf_dfu_ble: Configuring BLE stack.
&amp;lt;debug&amp;gt; nrf_dfu_ble: Enabling the BLE stack.
&amp;lt;debug&amp;gt; nrf_dfu_ble: No advertising name found
&amp;lt;debug&amp;gt; nrf_dfu_ble: Using default advertising name
&amp;lt;debug&amp;gt; nrf_dfu_ble: Advertising...
&amp;lt;debug&amp;gt; nrf_dfu_ble: BLE DFU transport initialized.
&amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_sd backend.
&amp;lt;debug&amp;gt; app: Enter main loop
&amp;lt;debug&amp;gt; nrf_dfu_ble: Connected
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
&amp;lt;debug&amp;gt; nrf_dfu_ble: max_conn_interval: 12
&amp;lt;debug&amp;gt; nrf_dfu_ble: min_conn_interval: 12
&amp;lt;debug&amp;gt; nrf_dfu_ble: slave_latency: 0
&amp;lt;debug&amp;gt; nrf_dfu_ble: conn_sup_timeout: 600
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
&amp;lt;debug&amp;gt; nrf_dfu_ble: max_conn_interval: 6
&amp;lt;debug&amp;gt; nrf_dfu_ble: min_conn_interval: 6
&amp;lt;debug&amp;gt; nrf_dfu_ble: slave_latency: 0
&amp;lt;debug&amp;gt; nrf_dfu_ble: conn_sup_timeout: 500
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
&amp;lt;debug&amp;gt; nrf_dfu_ble: max_conn_interval: 12
&amp;lt;debug&amp;gt; nrf_dfu_ble: min_conn_interval: 12
&amp;lt;debug&amp;gt; nrf_dfu_ble: slave_latency: 0
&amp;lt;debug&amp;gt; nrf_dfu_ble: conn_sup_timeout: 600
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST (request: 517, reply: 247).
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_SELECT (command)
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
&amp;lt;debug&amp;gt; nrf_dfu_ble: Set receipt notif
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_RECEIPT_NOTIF_SET
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
&amp;lt;debug&amp;gt; app: Shutting down transports (found: 1)
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (command)
&amp;lt;debug&amp;gt; app: timer_stop (0x200022E4)
&amp;lt;debug&amp;gt; app: timer_activate (0x200022E4)
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
&amp;lt;debug&amp;gt; nrf_dfu_ble: Buffer 0x20003010 acquired, len 141 (244)
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
&amp;lt;debug&amp;gt; nrf_dfu_ble: Freeing buffer 0x20003010
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (command)
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (command)
&amp;lt;debug&amp;gt; nrf_dfu_validation: PB: Init packet data len: 64
&amp;lt;info&amp;gt; nrf_dfu_validation: Signature required. Checking signature.
&amp;lt;info&amp;gt; nrf_dfu_validation: Calculating hash (len: 64)
&amp;lt;info&amp;gt; nrf_dfu_validation: Verify signature
&amp;lt;info&amp;gt; nrf_dfu_validation: Image verified
&amp;lt;warning&amp;gt; nrf_dfu_ver_validation: SD req not met.
&amp;lt;warning&amp;gt; nrf_dfu_validation: Prevalidation failed.
&amp;lt;debug&amp;gt; nrf_dfu_validation: Init command:
&amp;lt;debug&amp;gt; nrf_dfu_validation:  08 00 10 34 1A 02 CB 01|...4....
&amp;lt;debug&amp;gt; nrf_dfu_validation:  20 00 28 00 30 00 38 E8| .(.0.8.
&amp;lt;debug&amp;gt; nrf_dfu_validation:  A4 02 42 24 08 03 12 20|..B$... 
&amp;lt;debug&amp;gt; nrf_dfu_validation:  A1 A0 1E 6C 6E 4B 18 64|...lnK.d
&amp;lt;debug&amp;gt; nrf_dfu_validation:  19 B2 A3 53 3F C0 4C 84|...S?.L.
&amp;lt;debug&amp;gt; nrf_dfu_validation:  0F 04 F1 15 A0 DD 21 2B|......!+
&amp;lt;debug&amp;gt; nrf_dfu_validation:  15 92 BB 11 6B AB DF DB|....k...
&amp;lt;debug&amp;gt; nrf_dfu_validation:  48 00 52 04 08 01 12 00|H.R.....
&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0xB
&amp;lt;warning&amp;gt; nrf_dfu_ble: DFU request 4 failed with error: 0xB
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
&amp;lt;debug&amp;gt; nrf_dfu_ble: max_conn_interval: 6
&amp;lt;debug&amp;gt; nrf_dfu_ble: min_conn_interval: 6
&amp;lt;debug&amp;gt; nrf_dfu_ble: slave_latency: 0
&amp;lt;debug&amp;gt; nrf_dfu_ble: conn_sup_timeout: 500
&amp;lt;debug&amp;gt; nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
&amp;lt;debug&amp;gt; nrf_dfu_ble: max_conn_interval: 12
&amp;lt;debug&amp;gt; nrf_dfu_ble: min_conn_interval: 12
&amp;lt;debug&amp;gt; nrf_dfu_ble: slave_latency: 0
&amp;lt;debug&amp;gt; nrf_dfu_ble: conn_sup_timeout: 600&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/258096?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 12:26:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:853e2817-d7f2-403f-ad6a-38077f3fd1d8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-fa6534800c3c43b396812073fb7dee03/pca10040_5F00_s132_5F00_ble_5F00_debug_5F00_256k.zip"&gt;devzone.nordicsemi.com/.../pca10040_5F00_s132_5F00_ble_5F00_debug_5F00_256k.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Try this one. I did not change anything but the three things I mentioned in the previous reply. flash_placement.xml, build-&amp;gt;memory segments, and linker-&amp;gt;Section placement macros.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In SES it is possible to attach the debugger if the .hex file is already flashed. Try to do this. To do so, try to use (toolbar-&amp;gt;) Target -&amp;gt; Attach Debugger. If you do this, SES will not program anything.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, I suspect that you will run into some issues. Looking at the placement of the files, it looks like there is not enough RAM to run your application:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-fa6534800c3c43b396812073fb7dee03/pastedimage1593692496532v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The application uses 42.4kB RAM, and your nRF52 only has 32kB. This is the case for the previous (non _debug) project I sent as well. It uses 33.8kB (close, but still more than 32kB.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It looks like the bootloader from SDK16 is too large for the 256/32 variant of the nRF52832.&lt;/p&gt;
&lt;p&gt;Perhaps you should consider moving to the 512/64 version?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Alternatively, see if you can port the pca10040e bootloader project. It only uses 20kB of RAM, but you need to change it to using the S132 if that is what you are using.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/257990?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 07:40:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d18cce55-5337-4db7-abb3-6f761b0a716c</guid><dc:creator>Fikri Saman</dc:creator><description>&lt;p&gt;Here are my&amp;nbsp;&lt;span&gt;Section Placement Macros :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8623.section_5F00_placement_5F00_macros.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My flash_placement.xml :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0272.flash_5F00_placement.xml"&gt;devzone.nordicsemi.com/.../0272.flash_5F00_placement.xml&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My memory segments :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;FLASH RX 0x0 0x40000;RAM RWX 0x20000000 0x8000;uicr_bootloader_start_address RX 0x10001014 0x4;bootloader_settings_page RX 0x0003F000 0x1000;uicr_mbr_params_page RX 0x10001018 0x4;mbr_params_page RX 0x0003E000 0x1000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;They are all the same as the ones you sent me before and yet I still have these errors :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/debug_5F00_error_5F00_v2.png" /&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem/257825"]Does it contain an LFXTAL?[/quote]
&lt;p&gt;Yes, it does contain an LFXTAL.&lt;/p&gt;
&lt;p&gt;Concerning the debug session, if I run a debug session, wouldn&amp;#39;t it erase the current program on my custom board? And which program do I have to run the debug session since there are the bootloader and the main application on my custom board&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/257825?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 12:16:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b32c634b-710d-455b-930a-b1b6e0e7cc13</guid><dc:creator>Edvin</dc:creator><description>[quote user="Fikri Saman"]I modified the bootloader_debug with the settings that you sent me before and got the following errors :[/quote]
&lt;p&gt;&amp;nbsp;What does your flash_placement.xml look like? And what does your project settings-&amp;gt;Code-&amp;gt;build-&amp;gt;memory Segments setting look like? And what does your project settings-&amp;gt;Code-&amp;gt;linker-&amp;gt;Section Placement Macros look like?&lt;/p&gt;
&lt;p&gt;And for the two last ones, remember to select &amp;quot;Common&amp;quot; before checking them:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-fa6534800c3c43b396812073fb7dee03/pastedimage1593605640562v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Fikri Saman"]I don&amp;#39;t think I understand what you&amp;#39;re demanding. Are you asking about my custom board or the equipment I used to program my custom board?[/quote]
&lt;p&gt;&amp;nbsp;I am asking about your custom board. Does it contain an LFXTAL? That would be the X2 in this figure:&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-fa6534800c3c43b396812073fb7dee03/pastedimage1593605741318v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To run a debug session:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-fa6534800c3c43b396812073fb7dee03/pastedimage1593605781908v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you set&amp;nbsp;NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED to 0 in sdk_config, you will get the RTT output in Segger Embedded Studio.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/257767?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 09:37:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e2e8877-5426-4285-98d6-896ec29b1283</guid><dc:creator>Fikri Saman</dc:creator><description>&lt;p&gt;I modified the bootloader_debug with the settings that you sent me before and got the following errors :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/debug_5F00_error.png" /&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem/257593"]Does this mean that you are doing a debug session in SES, or that you only close RTT viewer opened externally?[/quote]
&lt;p&gt;I actually don&amp;#39;t know how to debug the bootloader via SES, that&amp;#39;s why I used RTT viewer. It would be nice if you could point me in the right direction to debug with SES, please.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem/257593"]What is your clock configuration by the way? Do you have an external LFXTAL? I don&amp;#39;t think&amp;nbsp;I asked what kind of HW you are running this on.[/quote]
&lt;p&gt;I don&amp;#39;t think I understand what you&amp;#39;re demanding. Are you asking about my custom board or the equipment I used to program my custom board?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/257593?ContentTypeID=1</link><pubDate>Tue, 30 Jun 2020 13:10:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c20b82f4-c335-48c1-abd4-7c674030fd18</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yes, you would have to modify the project settings. Look at the settings found in the project that I sent.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Fikri Saman"]I also have another weird remark. With the previous application, if I don&amp;#39;t have RTT Viewer on, it will not update successfully. But when I have RTT Viewer to see the log, it succeeds in doing the DFU. Is that normal?[/quote]
&lt;p&gt;&amp;nbsp;Does this mean that you are doing a debug session in SES, or that you only close RTT viewer opened externally?&lt;/p&gt;
&lt;p&gt;The RTT viewer itself shouldn&amp;#39;t matter, but if you run a debug session, that may affect the CLOCK. What is your clock configuration by the way? Do you have an external LFXTAL? I don&amp;#39;t think&amp;nbsp;I asked what kind of HW you are running this on.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/257498?ContentTypeID=1</link><pubDate>Tue, 30 Jun 2020 08:23:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5175f065-e80e-4757-84b5-5ef8a6acafc0</guid><dc:creator>Fikri Saman</dc:creator><description>&lt;p&gt;For the debug bootloader, do I have to modify the section placement macros like in the example that you provided me?&lt;/p&gt;
&lt;p&gt;I also have another weird remark. With the previous application, if I don&amp;#39;t have RTT Viewer on, it will not update successfully. But when I have RTT Viewer to see the log, it succeeds in doing the DFU. Is that normal?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/257099?ContentTypeID=1</link><pubDate>Fri, 26 Jun 2020 10:52:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12b4804b-e9da-4053-b7c9-f7e8947790eb</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Is it possible to flash the debug bootloader(s) instead of the normal bootloader and monitor the logging information? From your log, it just looks like it is in the middle of the process, but the nRF stops responding, and the connection times out.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you test this on a &amp;quot;normal&amp;quot; nRF52832 DK, and see if the problem may be related to the flash size?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Does this only happen after you read out the flash and reflash it? Or does it happen if you flash the bootloader and softdevice separately as well?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/257054?ContentTypeID=1</link><pubDate>Fri, 26 Jun 2020 07:39:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2815fefb-7888-47f8-8f78-bb8386a03657</guid><dc:creator>Fikri Saman</dc:creator><description>&lt;p&gt;Well, nevermind. I was mistaken. It worked as in, I managed to see it advertising after reflashing it but the DFU does not seem to be working. I managed to enter into boot mode but it failed to update it when. This was the log file :&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Log_5F00_2020_2D00_06_2D00_26_5F00_09_5F00_33_5F00_51_5B00_1_5D00_.txt"&gt;devzone.nordicsemi.com/.../Log_5F00_2020_2D00_06_2D00_26_5F00_09_5F00_33_5F00_51_5B00_1_5D00_.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/257048?ContentTypeID=1</link><pubDate>Fri, 26 Jun 2020 06:57:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea14c9a0-8579-4cfd-a93e-9aa00598131b</guid><dc:creator>Fikri Saman</dc:creator><description>&lt;p&gt;Yes! It&amp;#39;s working! Thank you very much, Edvin!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/256957?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2020 13:52:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3067448e-5645-4e66-bee2-580a87dd2c64</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;The colouring in nRF Connect isn&amp;#39;t ideal. It is basically an educated guess on where the bootloader is located, where the softdevice is and so on. Don&amp;#39;t worry about that.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Fikri Saman"]Then I tried to save it as a hex file and try to reflash it via nrfjprog but it didn&amp;#39;t work. Here what it looks like :[/quote]
&lt;p&gt;&amp;nbsp;Did you remember to reset the device after reprogramming it? &amp;quot;nrfjprog --reset&amp;quot;, since the reset button doesn&amp;#39;t work until the first reset after programming it. Alternatively, power cycle the board.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/256917?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2020 12:38:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4796c99e-3c5a-4e11-8d4f-7544e1626fec</guid><dc:creator>Fikri Saman</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem/256872"]Try &amp;quot;build and debug&amp;quot; and see what happens[/quote]
&lt;p&gt;Nothing much to be honest. It seems to be working. I verified it via nRF Connect mobile and I see my board advertising DFUTARG.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/bl_5F00_debug.png" /&gt;&lt;/p&gt;
&lt;p&gt;This was the memory layout :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/bl_5F00_nrfConn.png" /&gt;&lt;/p&gt;
&lt;p&gt;So instinctively, I try to update it with my application and it worked. Here is the memory :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/bl_5F00_app_5F00_working.png" /&gt;&lt;/p&gt;
&lt;p&gt;Then I tried to save it as a hex file and try to reflash it via nrfjprog but it didn&amp;#39;t work. Here what it looks like :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/bl_5F00_app_5F00_not_5F00_working.png" /&gt;&lt;/p&gt;
&lt;p&gt;It seems that the extracted code doesn&amp;#39;t recognize which part represents what.&lt;/p&gt;
&lt;p&gt;Ideally, I would prefer to program my board in one go instead of programming the bootloader first, then generate my application zip file which then needs to be transferred to my phone, and only then I can update my board with the desired app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/256872?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2020 10:56:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89d421d7-dc1b-41db-8656-c1435766d09a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;It looks like there is not enough RAM on the 256 version to run on the nRF52832 with 256KB flash and 32kB ram. Perhaps you should consider going for the nRF52832 with more flash and ram, or use an older SDK with a smaller space requirement.&lt;/p&gt;
&lt;p&gt;You will probably see that you run into some issue if you run a debug session with the bootloader that I attached earlier. Try &amp;quot;build and debug&amp;quot; and see what happens. Remember to hit F5 to run the bootloader. What does it say?&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/256863?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2020 10:19:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98cc285f-eede-4dfb-a8b1-4d32826a5543</guid><dc:creator>Fikri Saman</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/62932/dfu-on-custom-board-memory-problem/256852"]Can you please try to check what the memory looks like on nRF Connect for Desktop -&amp;gt; Programmer when you do this?[/quote]
&lt;p&gt;This is what the memory looks like when I flash only the bootloader with default memory settings on it :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/bl_5F00_only.png" /&gt;&lt;/p&gt;
&lt;p&gt;It would seem that there is only the softdevice but yet I can see DFUTarg on nRF Connect mobile.&lt;/p&gt;
&lt;p&gt;This is when I used your bootloader alongside with my application :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/bl_5F00_set_5F00_sd_5F00_app.png" /&gt;&lt;/p&gt;
&lt;p&gt;But it still seems not to be working. I cannot see my device on nRF Connect mobile. This is only with the bootloader that you provided :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/bl_5F00_dev_5F00_only.png" /&gt;&lt;/p&gt;
&lt;p&gt;I did see DFUTarg, and so I try to update it with my application but it failed to do so. This was the log file during the update :&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Log_5F00_2020_2D00_06_2D00_25_5F00_12_5F00_15_5F00_19_5B00_1_5D00_.txt"&gt;devzone.nordicsemi.com/.../Log_5F00_2020_2D00_06_2D00_25_5F00_12_5F00_15_5F00_19_5B00_1_5D00_.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU on custom board, memory problem</title><link>https://devzone.nordicsemi.com/thread/256852?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2020 09:26:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0ff0901-5054-4391-8afd-ef6954524703</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Fikri Saman"]A weird remark I notice was, I flashed my custom board with the bootloader with the default setting as shown in the following image :[/quote]
&lt;p&gt;&amp;nbsp;Can you please try to check what the memory looks like on nRF Connect for Desktop -&amp;gt; Programmer when you do this?&lt;/p&gt;
&lt;p&gt;I did some modifications, and I got this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-fa6534800c3c43b396812073fb7dee03/pastedimage1593077057994v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;(remember that my DK has 512kB flash, which is why it is gret on the upper half.)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Check out the attached project. NB: I only changed the SES project, not the Keil, IAR or armgcc.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-fa6534800c3c43b396812073fb7dee03/pca10040_5F00_s132_5F00_ble_5F00_256k.zip"&gt;devzone.nordicsemi.com/.../pca10040_5F00_s132_5F00_ble_5F00_256k.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There were some issues. I didn&amp;#39;t manage to set the RAM size to 32kb, because the compiler complained about not enough space. I am not sure whether it will run properly on the 256k - 32k version. Perhaps the softdevice has grown too big to properly support this version in the later SDKs.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>