<?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 + S140 6.1.1 + DFU example IAR + nRFGO</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45736/nrf52840-s140-6-1-1-dfu-example-iar-nrfgo</link><description>Good evening, 
 We are trying to flash the bootloader DFU debug example using 10056 ble debug example code to our nRF52840 based board. 
 Everytime we try to flash, we get an error message about writing in the SoftDevice area. 
 
 End of Softdevice address</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Apr 2019 07:57:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45736/nrf52840-s140-6-1-1-dfu-example-iar-nrfgo" /><item><title>RE: nrf52840 + S140 6.1.1 + DFU example IAR + nRFGO</title><link>https://devzone.nordicsemi.com/thread/180428?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 07:57:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52540d56-162e-48ec-9dcf-d7e551ff5ac3</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve looked into that, and it appears that there is a fault in IAR, I receive the same error as well when I try to download and debug with IAR.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t get the error if I program with command line or nRF Connect Programmer, and start the debugging session without downloading.&lt;/p&gt;
&lt;p&gt;Here, I&amp;#39;ve programmed with nRF Connect:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-ad598dc665a64deba949337559c5d06f/pastedimage1554450767753v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And clicked on &amp;quot;Debug without Downloading&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-ad598dc665a64deba949337559c5d06f/pastedimage1554450974614v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And I did not get the error.&lt;/p&gt;
&lt;p&gt;I have reported this internally.&lt;/p&gt;
&lt;p&gt;Are you able to do it this way?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 + S140 6.1.1 + DFU example IAR + nRFGO</title><link>https://devzone.nordicsemi.com/thread/180254?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 10:14:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f68c9e18-16cd-40d4-b17d-14197c8d2045</guid><dc:creator>Mohammed Z</dc:creator><description>&lt;p&gt;Another point, when we try to download and debug the bootloader code using IAR on our chip, we get this error:&lt;br /&gt;&amp;quot;Warning: Stack pointer is set to incorrect alignment Stack addr = 0xFFFFFFFF&amp;quot;&lt;br /&gt;This problem does not allow us to debug the code and see where it is stacked&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 + S140 6.1.1 + DFU example IAR + nRFGO</title><link>https://devzone.nordicsemi.com/thread/180249?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 10:05:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c81b1e64-8c44-41a7-92b4-6f375697583e</guid><dc:creator>Mohammed Z</dc:creator><description>&lt;p&gt;Thanks Andreas for your answer,&lt;br /&gt;we tried to use the nRF Connect programmer to flash the bootloader and see the memory structure; it is correctly configured (like the schema in the documentation).&lt;br /&gt;However, we can not start the DFU mode and see the BLE device.&lt;br /&gt;is there a change to be made in the bootloader code to enable the DFU mode (we do not use b&lt;span&gt;utton&amp;nbsp;&lt;/span&gt;in our chip to start this mode )?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 + S140 6.1.1 + DFU example IAR + nRFGO</title><link>https://devzone.nordicsemi.com/thread/180221?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 09:12:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f482829-3715-4b50-9655-8887fee16af7</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi Francois.&lt;/p&gt;
&lt;p&gt;First of all, I recommend that you don&amp;#39;t use nRFgoStudio any more, as it is outdated and will not be updated, you should use &lt;a href="https://www.nordicsemi.com/DocLib/Content/User_Guides/nc_programmer/latest/UG/nrf_connect_programmer/ncp_introduction"&gt;nRF Connect Programmer&lt;/a&gt; instead.&lt;/p&gt;
&lt;p&gt;It should not matter which part of the FLASH memory you program first, as long as it does not overlap.&lt;/p&gt;
&lt;p&gt;The structure of the FLASH memory is like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-ad598dc665a64deba949337559c5d06f/pastedimage1554367601172v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is an example of how memory region looks for the bootloader example found in folder &lt;strong&gt;examples\dfu\secure_bootloader\pca10056_ble_debug&lt;/strong&gt; and the S140 V6.1.1 SoftDevice:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-ad598dc665a64deba949337559c5d06f/pastedimage1554368965935v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, the SoftDevice is at the bottom, and the bootloader is at the top of the memory region.&lt;/p&gt;
&lt;p&gt;When you say that you can flash the Application and the SoftDevice, but struggle to flash the bootloader, do you still have the Application flashed as well? Maybe it is the Application you flashed previous that occupy some memory?&lt;/p&gt;
&lt;p&gt;The examples from the SDK should come preconfigured, so you should not have to do any configurations.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 + S140 6.1.1 + DFU example IAR + nRFGO</title><link>https://devzone.nordicsemi.com/thread/180175?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 07:45:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02c54fb3-d260-463e-8cd1-9c4732f27b7d</guid><dc:creator>Mohammed Z</dc:creator><description>&lt;p&gt;I work with Francois.&lt;/p&gt;
&lt;p&gt;More details:&lt;/p&gt;
&lt;p&gt;When compiling&amp;nbsp;secure_bootloader_ble_s140_pca10056_debug, we get no error message.&lt;/p&gt;
&lt;p&gt;However, when trying to flash the hex on the nRF52840 using nRFGo Studio, after flashing SoftDevide S140 6.1.1, we get this error message:&lt;/p&gt;
&lt;p&gt;&amp;quot;This hex file has data in softdevice region. Try programming using &amp;quot;Program SoftDevice&amp;quot;, or erase all before programming.&lt;/p&gt;
&lt;p&gt;Is this related to RAM/ROM configurations?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;FYI, IAR linker conf.&lt;/p&gt;
&lt;p&gt;.intvec start 0xf1000&lt;/p&gt;
&lt;p&gt;Memory regions&lt;/p&gt;
&lt;p&gt;ROM 0xf1000&amp;nbsp; 0xfdfff&lt;/p&gt;
&lt;p&gt;RAM&amp;nbsp;0x200057b8&amp;nbsp; &amp;nbsp;0x2003ffff&lt;/p&gt;
&lt;p&gt;CSTACK 2048 HEAP 0&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;in sdk_config.h&lt;/p&gt;
&lt;p&gt;#ifndef NRF_DFU_APP_DATA_AREA_SIZE&lt;br /&gt;#define NRF_DFU_APP_DATA_AREA_SIZE 12288&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;in nrf_mbr.h&lt;/p&gt;
&lt;p&gt;/** @addtogroup NRF_MBR_DEFINES Defines&lt;br /&gt; * @{ */&lt;/p&gt;
&lt;p&gt;/**@brief MBR SVC Base number. */&lt;br /&gt;#define MBR_SVC_BASE (0x18)&lt;/p&gt;
&lt;p&gt;/**@brief Page size in words. */&lt;br /&gt;#define MBR_PAGE_SIZE_IN_WORDS (1024)&lt;/p&gt;
&lt;p&gt;/** @brief The size that must be reserved for the MBR when a SoftDevice is written to flash.&lt;br /&gt;This is the offset where the first byte of the SoftDevice hex file is written. */&lt;br /&gt;#define MBR_SIZE (0x1000)&lt;/p&gt;
&lt;p&gt;/** @brief Location (in the flash memory) of the bootloader address. */&lt;br /&gt;#define MBR_BOOTLOADER_ADDR (0xFF8)&lt;/p&gt;
&lt;p&gt;/** @brief Location (in UICR) of the bootloader address. */&lt;br /&gt;#define MBR_UICR_BOOTLOADER_ADDR (&amp;amp;(NRF_UICR-&amp;gt;NRFFW[0]))&lt;/p&gt;
&lt;p&gt;/** @brief Location (in the flash memory) of the address of the MBR parameter page. */&lt;br /&gt;#define MBR_PARAM_PAGE_ADDR (0xFFC)&lt;/p&gt;
&lt;p&gt;/** @brief Location (in UICR) of the address of the MBR parameter page. */&lt;br /&gt;#define MBR_UICR_PARAM_PAGE_ADDR (&amp;amp;(NRF_UICR-&amp;gt;NRFFW[1]))&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Where 0XFF8 and 0XFFC comes from?&lt;/p&gt;
&lt;p&gt;Would changing any of these values would make it work?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 + S140 6.1.1 + DFU example IAR + nRFGO</title><link>https://devzone.nordicsemi.com/thread/180099?ContentTypeID=1</link><pubDate>Wed, 03 Apr 2019 17:57:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba3e51dc-2251-46a2-b2dd-cc144c95dd3c</guid><dc:creator>Francois</dc:creator><description>&lt;p&gt;Just to make things clear, we are talking about the Bootloader DFU example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>