<?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>Different SDK levels for Application and Bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59543/different-sdk-levels-for-application-and-bootloader</link><description>Does it cause issues if the application was built with a different SDK level than the bootloader? I have a project I&amp;#39;m adding a bootloader to, and it isn&amp;#39;t working. I have done over a dozen of these, yet I&amp;#39;m at a loss why I can&amp;#39;t get this one working</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Mar 2020 13:10:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59543/different-sdk-levels-for-application-and-bootloader" /><item><title>RE: Different SDK levels for Application and Bootloader</title><link>https://devzone.nordicsemi.com/thread/242100?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2020 13:10:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79248208-c84e-46b3-987b-d8f0fad610bc</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thank you! &lt;/p&gt;
[quote userid="18108" url="~/f/nordic-q-a/59543/different-sdk-levels-for-application-and-bootloader/242091"]When that was working, the space was so constrained on the application that the peer manager was failing trying to init fds. This was the curve ball as to why it worked when I tested individually, but failed on a merge.[/quote]
&lt;p&gt;Maybe not what happened in your case, but FDS may fail to re-claim pages during init if they have been completely or partially overwritten during the DFU process. It is important to make sure the NRF_DFU_APP_DATA_AREA_SIZE matches the&amp;nbsp;FDS_VIRTUAL_PAGES setting used by the application to prevent this. &lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different SDK levels for Application and Bootloader</title><link>https://devzone.nordicsemi.com/thread/242091?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2020 12:45:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dd20910-f185-460a-81e5-166c61d334a0</guid><dc:creator>brett_anderson</dc:creator><description>&lt;p&gt;I&amp;#39;ve done a few of these, at quite a few sdk levels. They all have their quirks, but I think you guys have done a good job of improving things over time.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;While I&amp;#39;m not 100% certain what was wrong, I did just start the project over from scratch using 16. I was able to find a few things that were probably wrong in the earlier one. I think the MBR was written wrong, and I was missing the populate call. When that was working, the space was so constrained on the application that the peer manager was failing trying to init fds. This was the curve ball as to why it worked when I tested individually, but failed on a merge. Why it sometimes worked after a power off, I have no idea. going to put this one to rest and move on.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Since the original question was about mixing SDK levels, I&amp;#39;m going to mark as&amp;nbsp; solved with those answers. Thank you for your support! You guys are great.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different SDK levels for Application and Bootloader</title><link>https://devzone.nordicsemi.com/thread/242001?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2020 07:52:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4339c8d6-4b8f-47bd-999b-3f525dd32878</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Very interesting that it behaves differently depending on the reset source(&lt;span&gt;&lt;a title="Reset behavior" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=4_2_0_17_7#unique_832471788"&gt;Reset behavior&lt;/a&gt;&lt;/span&gt;). I cannot think of anything that could explain this behavior. The program should also not get stuck in the crc32_compute() function. So maybe it&amp;#39;s going in a reset loop and the crash is really happening after the checksum calculation.&lt;/p&gt;
&lt;p&gt;I know the bootloader can be a bit tricky to debug as the compiler optimization has to be enabled, but was this more of an Eclipse problem? Do you have an eclipse project for the bootloader, or is it built directly with makefiles? Segger Ozone (quick to setup and use) / GDB can be good alternatives if you just want to debug existing executables (.out/.elf).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different SDK levels for Application and Bootloader</title><link>https://devzone.nordicsemi.com/thread/241892?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 14:36:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d8a86e8-8e38-4eac-9a04-18fe6c67e36e</guid><dc:creator>brett_anderson</dc:creator><description>&lt;p&gt;I can&amp;#39;t debug the bootloader, as it never seems to get there when I try. I&amp;#39;ve had poor luck using Eclipse for bootloader debug.&lt;/p&gt;
&lt;p&gt;The dissassembly shows that to be inside of crc32_compute()&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is interesting. From a power off to on, it works. If I try a nrfjprog --reset or --pinreset, it does not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different SDK levels for Application and Bootloader</title><link>https://devzone.nordicsemi.com/thread/241886?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 14:21:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba58b147-dfcc-467e-a9ec-b3e17e788b41</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Assume the current program counter (PC: 0x0002793C) in your bootloader&amp;#39;s address range? If it is, do you know how to look up the address and see which function you have at this location (disassembly view in IDE, addr2line, etc)? I don&amp;#39;t see anything else that&amp;#39;s wrong. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different SDK levels for Application and Bootloader</title><link>https://devzone.nordicsemi.com/thread/241867?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 13:54:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78a33975-7593-4011-8084-f59f95c3a884</guid><dc:creator>brett_anderson</dc:creator><description>&lt;p&gt;I can&amp;#39;t tell where it crashes, but I can tell that it doesn&amp;#39;t start the application.&lt;/p&gt;
&lt;p&gt;Bootloader DFU Settings:&lt;br /&gt;* File: _settings.hex&lt;br /&gt;* Family: NRF52810&lt;br /&gt;* Start Address: 0x0002F000&lt;br /&gt;* CRC: 0xDBB9F8F6&lt;br /&gt;* Settings Version: 0x00000002 (2)&lt;br /&gt;* App Version: 0x00002906 (10502)&lt;br /&gt;* Bootloader Version: 0x00000001 (1)&lt;br /&gt;* Bank Layout: 0x00000000&lt;br /&gt;* Current Bank: 0x00000000&lt;br /&gt;* Application Size: 0x0000947C (38012 bytes)&lt;br /&gt;* Application CRC: 0x94D9A66C&lt;br /&gt;* Bank0 Bank Code: 0x00000001&lt;br /&gt;* Softdevice Size: 0x00000000 (0 bytes)&lt;br /&gt;* Boot Validation CRC: 0x02D484E4&lt;br /&gt;* SD Boot Validation Type: 0x00000000 (0)&lt;br /&gt;* App Boot Validation Type: 0x00000001 (1)&lt;/p&gt;
&lt;p&gt;readregs:&lt;/p&gt;
&lt;p&gt;R0: 0xEDB88320&lt;br /&gt;R1: 0x00000001&lt;br /&gt;R2: 0xF72195D8&lt;br /&gt;R3: 0xEDB88320&lt;br /&gt;R4: 0x000223B5&lt;br /&gt;R5: 0x0002247B&lt;br /&gt;R6: 0x10001000&lt;br /&gt;R7: 0x00000000&lt;br /&gt;R8: 0x00000000&lt;br /&gt;R9: 0x00000000&lt;br /&gt;R10: 0x1FFF6000&lt;br /&gt;R11: 0x00000000&lt;br /&gt;R12: 0x00000000&lt;br /&gt;SP: 0x20005FD8&lt;br /&gt;LR: 0x0002B913&lt;br /&gt;PC: 0x0002793C&lt;br /&gt;xPSR: 0x21000000&lt;br /&gt;MSP: 0x20005FD8&lt;br /&gt;PSP: 0x00000000&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different SDK levels for Application and Bootloader</title><link>https://devzone.nordicsemi.com/thread/241860?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 13:43:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4495dd13-cafe-46ef-80e2-bed4824add5f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Ok, good. Were you able to see if the program reached the bootloader or if it crashed before that? The latter would indicate that a wrong start address had been stored in MBR/UICR so would want to exclude that possibility first.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A readout of the CPU registers when it has crashed may give some more clues about what is wrong. If you use nrfjprog you can run &amp;#39;nrfjprog --readregs&amp;#39; to get all of the registers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different SDK levels for Application and Bootloader</title><link>https://devzone.nordicsemi.com/thread/241854?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 13:31:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb28862f-d4a3-457a-af98-9692e6f674b9</guid><dc:creator>brett_anderson</dc:creator><description>&lt;p&gt;I don&amp;#39;t mind doing some more testing. I was honeslty thinking I would just update both to 16 since I was updating.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different SDK levels for Application and Bootloader</title><link>https://devzone.nordicsemi.com/thread/241852?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 13:29:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83ad470d-b41f-4dbb-b01e-7ed2ab66fd3f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thank you for the update. I agree that this is strange. The bootloader and app are separate programs and there are no interactions between them during boot that should have lead to any combability problems. Do you want to continue on 15.3.0, or do you want to spend some more time on finding the root cause? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different SDK levels for Application and Bootloader</title><link>https://devzone.nordicsemi.com/thread/241835?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 13:06:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2af0d23-779f-4148-888e-46a6b4456647</guid><dc:creator>brett_anderson</dc:creator><description>&lt;p&gt;Thanks Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I want to update you that I did change the application to use SDK 15.3, and that fixed the problem. I am very surprised by this. I have a couple applications for the nRF52810. This application was created when 15.2 was current, but never had a bootloader. I have another project that was done with 15.3, and did include a bootloader. When I moved over the bootloader build on 15.3, it did not work. The soft device would just jump to a bad location. Recompiling the application with 15.3, and everything seems tow work.&lt;/p&gt;
&lt;p&gt;Strange, but I did nothing else.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Different SDK levels for Application and Bootloader</title><link>https://devzone.nordicsemi.com/thread/241822?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 12:18:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:894a19e7-f83c-4577-ba19-5307da47475b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t foresee any problems with this as long as they are both built for the same Softevice. That said, it may be worth noting that in SDK 15.3.0 we started to store the Bootloader start and MBR parameters pages address inside the MBR (@0xff8 and 0xffc) instead of only using the UICR registers as we have done in the past. This was done to allow flash protection with BPROT/ACL, but it had the side effect that it made it easy to inadvertently erase the MBR during programming and thus &amp;quot;brick&amp;quot; the device. Have you checked if the first flash page may have erased?&lt;/p&gt;
&lt;p&gt;This was fixed in SDK 16.0.0 by not including MBR data in the image, but rather writing it at runtime. From SDK release notes &amp;quot;Bootloader start address is now placed in UICR at compile time, and the MBR page is populated at runtime. This is to mitigate problems with flashing where the MBR was erased.&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>