<?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 Overlapping .hex data &amp;amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68967/nrf52840-overlapping-hex-data-soft-device-match-error</link><description>I am new to the Segger Studio and nRF52840 . (However not a Newbie to Microprocessors) 
 Off the Bat :- Blinky example works fine... 
 .....however when I try to get the PWM_driver example I get these errors below in picture. 
 
 The example is for &amp;quot;pca10056</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Dec 2020 13:43:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68967/nrf52840-overlapping-hex-data-soft-device-match-error" /><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/284339?ContentTypeID=1</link><pubDate>Thu, 10 Dec 2020 13:43:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3967a62-ec95-4e77-ba07-78fa3d2917f9</guid><dc:creator>Chiprobot</dc:creator><description>&lt;p&gt;Bingo :-&lt;/p&gt;
&lt;p&gt;To cut a long story short....&lt;/p&gt;
&lt;p&gt;It seems both the Memory Segments and the Section placement macros must be altered to the exact same allocations.&lt;/p&gt;
&lt;p&gt;The Dongle nRF52840 Tutorial does not mention the Memory segments need to be altered in the linker selection, only the section placement macros - they do not seem to be linked automatically.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/nrfmemory.png" /&gt;&lt;/p&gt;
&lt;p&gt;It places everything in the right place now so I can progress further.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/284296?ContentTypeID=1</link><pubDate>Thu, 10 Dec 2020 11:15:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af3474e9-8ef4-4684-88d1-e24a0c682d8c</guid><dc:creator>Chiprobot</dc:creator><description>&lt;p&gt;As already stated in my original Question &amp;quot;Blinky&amp;quot; is working, however I am still struggling to get the PWM example working. (sorry got confused with working with multiple Segger Studios and meant to say that that there were no 10059 examples in the PWM folders...oopps).&lt;/p&gt;
&lt;p&gt;Ok i think i have a clue to what is going on ...however no solution:-&lt;/p&gt;
&lt;p&gt;Please bear in mind Segger Studio is very new to me.... so I know nothing about memory allocations.&lt;/p&gt;
&lt;p&gt;I tried your &amp;quot;Tip&amp;quot; re:- making a Template (I choose the Template with BLE support), when this build it places the application at start address 0x00027000, indeed when I drop the file into the nRF connect programmer software it shoehorns into 0x00027000 . Then when i copy across the Soft Device... it is Happy ...however...&lt;/p&gt;
&lt;p&gt;As a sanity check ....I copied the &amp;quot;Linker&amp;quot; details from the Template example above and pasted it into the &amp;quot;Linker&amp;quot; of the pwm example I want to work with ...&lt;strong&gt; to my surprise it ignores the linker information and builds the project starting at address 0x00000000 ...&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;....I am altering the&amp;nbsp; &amp;quot;Common&amp;quot; linker options.... to be sure both release and debug are &amp;quot;in-tow&amp;quot;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What am I missing here !!... do the non BLE example contain some different formatting or in-code Flash allocations.&lt;/p&gt;
&lt;p&gt;Best regards Chiprobot....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283567?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2020 13:58:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc008e84-9e14-4837-bbb8-02e16c642f7b</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;See the files below and try flashing the example hex.&amp;nbsp;&lt;/p&gt;
[quote user="Chiprobot"]There are no&amp;nbsp; xxx10059.hex file there anyhow, i tried both the 10040 and 10056 to be sure ...nada.[/quote]
&lt;p&gt;&amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6038.pastedimage1607349415357v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6557.pastedimage1607349510720v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283530?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2020 12:11:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee51e81a-4221-409b-b3ba-b7a94868595e</guid><dc:creator>Chiprobot</dc:creator><description>&lt;p&gt;Please note I have change the &lt;code&gt;FLASH_START=0x1000&lt;/code&gt; to &lt;code&gt;FLASH_START=0x0000 in the Linker - section placement-macro to try your suggestion.(the file memory layout you see above are with&amp;nbsp;FLASH_START=0x0000 .. however still same problem.&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283527?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2020 12:05:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a5ee653-5eee-4570-beca-b0989e3c7fcc</guid><dc:creator>Chiprobot</dc:creator><description>&lt;p&gt;Memory settings as per instructions in the dongle programming &amp;quot;Blinky&amp;quot;&amp;nbsp; tutorial :-&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Adjust the linker configuration. Set &lt;code&gt;FLASH_START=0x1000&lt;/code&gt; to place the application right above the MBR. You should also set&amp;nbsp;&lt;code&gt;FLASH_SIZE=0xDF000&lt;/code&gt; to make sure that there is room for the bootloader at the end of the flash. Set &lt;code&gt;RAM_START=0x20000008&lt;/code&gt;, as the first 8 bytes are used by the MBR for interrupt forwarding and adjust the size accordingly by setting &lt;code&gt;RAM_SIZE=0x3FFF8&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/nrf4.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/0207.nrf2.jpg" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/nrf3.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;If I use the premade .hex file from the blinky &amp;quot;hex&amp;quot; folder the nRF Connect programmer&amp;nbsp; &amp;quot;write&amp;quot; is greyed-out ....so unable to send program across. (There are no&amp;nbsp; xxx10059.hex file there anyhow, i tried both the 10040 and 10056 to be sure ...nada.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283478?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2020 09:30:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5df722e6-9ad8-449f-ba71-c42665d772e6</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;So I&amp;#39;ve was able to reproduce your issue, and I think I know what the issue is. The nRF Connect programmer expects you to use a softdevice if the application isn&amp;#39;t placed at the start of the flash. The application should be placed &lt;strong&gt;after&lt;/strong&gt; the softdevice in flash if a softdevice &lt;strong&gt;is&lt;/strong&gt; used. However, the application should be placed at &lt;strong&gt;the start&lt;/strong&gt; of the flash if a softdevice &lt;strong&gt;isn&amp;#39;t&lt;/strong&gt; used. Same goes for the MBR.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, what exactly did you change the memory settings to?&lt;/p&gt;
&lt;p&gt;Also, note that there is already a blinky example for the PCA10059 nRF52840 Dongle that can be flashed without any adjustments. You can find the hex file at examples\peripherals\blinky\hex. Try to flash that example and note the memory settings that is used in that project. You can use that project for later reference.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283421?ContentTypeID=1</link><pubDate>Sun, 06 Dec 2020 14:58:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe24fbdc-1f55-489b-aa30-b8b70f8a6742</guid><dc:creator>Chiprobot</dc:creator><description>&lt;p&gt;Just installed on a new PC&lt;/p&gt;
&lt;p&gt;nRF5_SDK_17.0.2_d674dde -&lt;/p&gt;
&lt;p&gt;nRFCOnnect 3.6.0 -&lt;/p&gt;
&lt;p&gt;Segger&amp;nbsp; Embedded Studio 5.20a&lt;/p&gt;
&lt;p&gt;(same versions as my main pc).&lt;/p&gt;
&lt;p&gt;and the error is the same.... so I know its not my installations.&lt;/p&gt;
&lt;p&gt;Can it be anything to do with the Bootloader or MBR ?&lt;/p&gt;
&lt;p&gt;Its an original nRF52840 {Dongle}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283420?ContentTypeID=1</link><pubDate>Sun, 06 Dec 2020 11:29:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6584390-87f6-406a-9b85-777ab8211e39</guid><dc:creator>Chiprobot</dc:creator><description>&lt;p&gt;On further checks All examples &amp;quot;NOT&amp;quot; using a SoftDevice are bringing up the same &amp;#39;which SoftDevice is required&amp;#39;.&lt;/p&gt;
&lt;p&gt;This is on writing the single .hex from the Build to the nRF52840 via nRF Connect 3.6.0 Programmer, every time it asks from a list for a SoftDevice. (see above in original question).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283386?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2020 17:57:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d113152-cbbc-46c7-862f-49ef813a4bf8</guid><dc:creator>Chiprobot</dc:creator><description>&lt;p&gt;Thanks for your input&amp;#39;s BTW .. it has deepened my understanding of the nRF&amp;#39;s playing field .&lt;/p&gt;
&lt;p&gt;Yes indeed the same goes for the temperature example... although it should not need a SoftDevice... this also ask&amp;#39;s you with a &amp;quot;PopUp&amp;quot; which SoftDevice you are using!!! . i.e. thats using the nRF Connect to port just the program file across.&lt;/p&gt;
&lt;p&gt;I am using the &amp;quot;latest&amp;quot; SEGGER Embedded Studio for ARM&lt;br /&gt;Release 5.20a&amp;nbsp;&amp;nbsp;Build 2020110401.44169 and latest SoftDevices (to date S140 and S132)&lt;/p&gt;
&lt;p&gt;I have had success with the BLE heart rate monitor (talking to my Garmin bike computer) ... as that uses the S140 Soft device, so I am currently checking that against the PWM and the Temparture project... there must be a difference I can ferret out.&lt;/p&gt;
&lt;p&gt;Regards Chip&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283252?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2020 08:15:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffeba44a-d726-4099-acc4-3361ea778c62</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I think I&amp;#39;ve misunderstood your intention. I thought that you wanted to merge the SD and the PWM example together. But you&amp;#39;re saying that the programmer app is asking you to flash a softdevice even when the pwm example doesn&amp;#39;t use one?&lt;/p&gt;
[quote user=""]however when I port across the program .hex file and the Soft Device .hex file ( S140) there is a memory clash. I have also tried S132 (also errors).[/quote]
&lt;p&gt;&amp;nbsp;This sentence got me confused.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283045?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 11:02:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8e54682-34ac-4242-9471-426a30316664</guid><dc:creator>Chiprobot</dc:creator><description>&lt;p&gt;Which means the upload cancels.... (its still asking for Softdevice even though as you say one is not necessary)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283043?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 10:55:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bca7bac-1a1d-433d-8b05-30f75de554ba</guid><dc:creator>Chiprobot</dc:creator><description>&lt;p&gt;Thats what I was led to believe (no Softdevice required), however when I Port over just the program .hex ---- its still asking me for which Softdevice is installed !&amp;nbsp;&amp;nbsp; (need user input popup)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283040?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 10:51:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:add93641-a05b-4780-a115-98a9da1f0cda</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Yes, which means that the example doesn&amp;#39;t include a softdevice. All of the &amp;quot;blank&amp;quot; examples are under the peripheral folder which doesn&amp;#39;t include any softdevice. The softdevice examples are found under the ble_central, ble_peripheral or ble_central_peripheral folder.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The peripheral only examples are meant to showcase how to use the peripherals on the nRF without implementing the Softdevice.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283028?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 10:09:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48e3074c-c011-4602-92c6-72907f33a3b8</guid><dc:creator>Chiprobot</dc:creator><description>&lt;p&gt;The confusing part for me is that other Project Example&amp;#39;s (not all though) are contained with-in a folder &amp;quot;named&amp;quot; with the actual Software device required, the pwm-driver example i want to run just gives a folder marked &amp;quot;blank&amp;quot; ! no indication of SD required.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Overlapping .hex data &amp; Soft Device match error</title><link>https://devzone.nordicsemi.com/thread/283020?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 10:02:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:486f664d-cceb-4a12-918e-5ba4586a3e1d</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]&lt;ul&gt;&lt;li&gt;Is there a specific soft Device for the nRF52840 ... (I could only find the recommended s140_nrf52_7.2.0_softdevice.hex ) ?&lt;/li&gt;
&lt;li&gt;How Can I tell which Soft Device is needed (i.e. from the examples). ?&lt;/li&gt;
&lt;li&gt;Can the Soft Device be Merged into code somehow in the Segger Studio ?&lt;/li&gt;&lt;/ul&gt;[/quote]
&lt;p&gt;&amp;nbsp;Softdevices that are compatible with nRF52840 is described &lt;a href="https://infocenter.nordicsemi.com/topic/comp_matrix_nrf52840/COMP/nrf52840/nRF52840_ic_rev_sdk_sd_comp_matrix.html?cp=4_0_3_2"&gt;here&lt;/a&gt;. S140 is often used in our examples for the nRF52840.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The PWM example in the SDK doesn&amp;#39;t use the softdevice, you would therefore get conflicting issues in the memory layout when you try to flash the softdevice and the pwm example in the same memory space. If you want to use both, then you need to merge a Softdevice example with the PWM example. The easiest would be to merge the PWM example into the ble_app_template example.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Merging checklist:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Merge the application logic such as main.c from the PWM example into the template example.&lt;/li&gt;
&lt;li&gt;Include any source files if necessary.&lt;/li&gt;
&lt;li&gt;Add path to the folders of the source files the PWM example uses.&lt;/li&gt;
&lt;li&gt;Add the files themselves to the project. See &lt;a href="https://www.youtube.com/watch?v=t-kh1EbesvI"&gt;this&lt;/a&gt;&amp;nbsp;if you&amp;#39;re using SEGGER.&lt;/li&gt;
&lt;li&gt;Compare the&lt;span&gt;&amp;nbsp;&lt;/span&gt;sdk&lt;span&gt;&amp;nbsp;&lt;/span&gt;config file of two examples, and enable any peripherals/modules that isn&amp;#39;t enabled in the template example already&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can then proceed to follow the guidelines in the tutorial you shared under&amp;nbsp;&lt;em&gt;Adapt a BLE example (with SoftDevice) and program it using nRF Connect Programmer&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>