<?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>Download and debug application using SES in the presence of bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58579/download-and-debug-application-using-ses-in-the-presence-of-bootloader</link><description>Hello, guys! 
 We are using SDK 15.0.0 and nRF52840 SoC device. 
 Our goal is to debug the application with SES in the presence of bootloader. This thread explains that we need to: 
 
 merge bootloader and bootloader settings .hex files into a single</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 May 2020 15:25:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58579/download-and-debug-application-using-ses-in-the-presence-of-bootloader" /><item><title>RE: Download and debug application using SES in the presence of bootloader</title><link>https://devzone.nordicsemi.com/thread/250242?ContentTypeID=1</link><pubDate>Fri, 15 May 2020 15:25:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a50c6101-289f-42bc-9717-6fddaf8afee3</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hey, Einar. &lt;/p&gt;
&lt;p&gt;Indeed, it seems it is not a problem. I respected the steps suggested by SK and now everything is OK. I will close this topic not.&lt;/p&gt;
&lt;p&gt;Thanks for your readiness to help though!&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Download and debug application using SES in the presence of bootloader</title><link>https://devzone.nordicsemi.com/thread/250239?ContentTypeID=1</link><pubDate>Fri, 15 May 2020 15:20:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85d3f0b2-24bf-4294-8471-caff9702cc73</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Bojan,&lt;/p&gt;
&lt;p&gt;The fact that nRF Connect Programmer shows the bootloader as &amp;quot;Application&amp;quot; in this case, is just an issue in how it presents it. This is not a problem and there is nothing you can do about it.&lt;/p&gt;
&lt;p&gt;What is the real problem, and what is it you want to achieve?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Download and debug application using SES in the presence of bootloader</title><link>https://devzone.nordicsemi.com/thread/249926?ContentTypeID=1</link><pubDate>Thu, 14 May 2020 11:26:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91d2f696-855f-4d26-8a1e-a0f1d6c09aba</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hello SK. &lt;/p&gt;
&lt;p&gt;Thanks for the useful link. It is now clear about Flash and RAM. However, I still don&amp;#39;t know how can I adjust the bootloader, MBR, bootloader settings parameters in &lt;em&gt;secure_bootloader_gcc_nrf52.ld&lt;/em&gt; file that comes with dfu example.&lt;/p&gt;
&lt;p&gt;For example, when I compile &lt;em&gt;secure_bootloader_ble_s140_pca10056&lt;/em&gt; example and load the .hex file nto nRF Programmer tool here is what I get:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/3566.Untitled.png" /&gt;&lt;/p&gt;
&lt;p&gt;Bootloader is not seen as a bootloader but as application. This is the appropriate content of &lt;em&gt;secure_bootloader_gcc_nrf52.ld&lt;/em&gt; file&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;MEMORY
{
  FLASH (rx) : ORIGIN = 0xf8000, LENGTH = 0x6000
  RAM (rwx) :  ORIGIN = 0x20002a98, LENGTH = 0x3d568
  uicr_bootloader_start_address (r) : ORIGIN = 0x00000FF8, LENGTH = 0x4
  bootloader_settings_page (r) : ORIGIN = 0x000FF000, LENGTH = 0x1000
  uicr_mbr_params_page (r) : ORIGIN = 0x00000FFC, LENGTH = 0x4
  mbr_params_page (r) : ORIGIN = 0x000FE000, LENGTH = 0x1000
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Should I adjust some more parameter in order to properly load bootloader?&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Download and debug application using SES in the presence of bootloader</title><link>https://devzone.nordicsemi.com/thread/238157?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2020 01:24:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83dbf4d1-1274-4416-b2e1-44dbf62c3ecf</guid><dc:creator>SK</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you confirm when you click Debug -&amp;gt; Go in SES, it does not hit main()? If that&amp;#39;s the case, memory mapping is not done correctly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In such case, there is a good article on adjustment in RAM and Flash that you can follow:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Download and debug application using SES in the presence of bootloader</title><link>https://devzone.nordicsemi.com/thread/238144?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2020 20:28:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b85ed08d-c6b3-49b0-b76a-93d8bfe98d89</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hello SK. &lt;/p&gt;
&lt;p&gt;Just tried to merge the .hex files the way you described. I was unable to debug, unfortunately.&lt;/p&gt;
&lt;p&gt;Here is how the final sd_bl_app.hex looks like when implemented in nRF52840:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6685.Untitled.png" /&gt;&lt;/p&gt;
&lt;p&gt;Am I missing something ?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Download and debug application using SES in the presence of bootloader</title><link>https://devzone.nordicsemi.com/thread/237622?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 08:20:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:704cf630-0132-4bfb-8d22-958f16aee2a1</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;OK, SK.&lt;/p&gt;
&lt;p&gt;Let me give it a try! &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f609.svg" title="Wink"&gt;&amp;#x1f609;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Download and debug application using SES in the presence of bootloader</title><link>https://devzone.nordicsemi.com/thread/237621?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 08:18:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35fc1bee-4d39-4dcb-838a-0853b3ad3182</guid><dc:creator>SK</dc:creator><description>&lt;p&gt;It will. Make sure your addressing and memory mapping are correct.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Download and debug application using SES in the presence of bootloader</title><link>https://devzone.nordicsemi.com/thread/237614?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 08:01:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3218a0c-3803-4adb-bf65-e6748678c12d</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hello SK.&lt;/p&gt;
&lt;p&gt;Thanks for your feedback. IMHO, the process you described will not allow me to debug from Segger Embedded Studio (SES) with &lt;span style="background-color:#ccffff;"&gt;Debug-&amp;gt;Go&lt;/span&gt;. Am I correct?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Download and debug application using SES in the presence of bootloader</title><link>https://devzone.nordicsemi.com/thread/237582?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 02:38:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73a90a64-0080-4c83-94d9-bb20f3af9f0f</guid><dc:creator>SK</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/bojan"&gt;bojan&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Steps as follows:&lt;/p&gt;
&lt;p&gt;1. Generate bootloader settings hex&lt;/p&gt;
&lt;p&gt;2. Merge with bootloader hex to generate bootloader_with_settings.hex&lt;/p&gt;
&lt;p&gt;3. Merge bootloader_with_settings.hex&amp;nbsp;with application hex --&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;mergehex --merge bootloader_with_settings.hex application.hex --output bl_app.hex&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;4. Merge bl_app.hex with Softdevice&lt;/p&gt;
&lt;p&gt;&lt;b&gt;mergehex --merge bl_app.hex SD.hex --output sd_bl_app.hex&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;5. Erase memory&lt;/p&gt;
&lt;p&gt;&lt;b&gt;nrfjprog &amp;ndash;eraseall&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;6. Program memory&lt;/p&gt;
&lt;p&gt;&lt;b&gt;nrfjprog --program sd_bl_app.hex&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me know if this helps.&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;SK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>