<?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>Bootloader start application at 0x1000 fails</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66228/bootloader-start-application-at-0x1000-fails</link><description>I&amp;#39;m using an example project of the secure serial bootloader (pca10056_uart_debug) and changed some configuration for my custom board. I added RTT debugging and changed uart pins as well as hwfc. As application I&amp;#39;m using a already existing project, that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Sep 2020 13:04:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66228/bootloader-start-application-at-0x1000-fails" /><item><title>RE: Bootloader start application at 0x1000 fails</title><link>https://devzone.nordicsemi.com/thread/271102?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 13:04:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82e55d78-388f-42ed-9dc3-d20e42d333d7</guid><dc:creator>MassimoF</dc:creator><description>&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;That was the problem.&lt;/p&gt;
&lt;p&gt;Setting the nrf_bootloader_app_start.c to opt. level 2 worked!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader start application at 0x1000 fails</title><link>https://devzone.nordicsemi.com/thread/271099?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 12:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:269d7be6-ea20-475d-bec8-4d9ded4839e3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I think we are getting close to a solution here. Are you compiling the bootloader without code optimization by any chance? In that case it&amp;#39;s probably related to the bug I mentioned here: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/62777/need-help-with-custom-dfu-bootloader-transferring-back-to-main-app"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/62777/need-help-with-custom-dfu-bootloader-transferring-back-to-main-app&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader start application at 0x1000 fails</title><link>https://devzone.nordicsemi.com/thread/271096?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 12:47:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22ee620c-812c-46b2-a6d8-720cc2e60b39</guid><dc:creator>MassimoF</dc:creator><description>&lt;p&gt;I added the bl.hex and settings.hex as load files and got the hardfault:&lt;/p&gt;
&lt;p&gt;This is the entry point when debugging. From there it jumps directly in the hardfault:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1600865183234v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader start application at 0x1000 fails</title><link>https://devzone.nordicsemi.com/thread/271095?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 12:40:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fea1168d-68fe-4b4b-abc1-8122f0cb4379</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;This appears to be without the bootloader present. Are you able to debug the app with the bootloader present?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader start application at 0x1000 fails</title><link>https://devzone.nordicsemi.com/thread/271094?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 12:39:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f364b036-2211-4125-9500-06fd8d0de12b</guid><dc:creator>MassimoF</dc:creator><description>&lt;p&gt;When I start a debug sesstion with the blinky_mbr example I don&amp;#39;t get any hardfault.&lt;/p&gt;
&lt;p&gt;This is what the flash looks like after debugging.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1600864642444v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The Project setup&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/blinky_5F00_pca10056_5F00_mbr.emProject.zip"&gt;devzone.nordicsemi.com/.../blinky_5F00_pca10056_5F00_mbr.emProject.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader start application at 0x1000 fails</title><link>https://devzone.nordicsemi.com/thread/271092?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 12:28:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fcdc986-6371-4885-ad73-4c9e77f1de56</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="MassimoF"]I suppose that the example with mbr shuld be configured correctly[/quote]
&lt;p&gt;&amp;nbsp;Yes, this should have worked. RAM_PH_* specifies the total RAM available on the chip, while RAM_* specifies the RAM address range to be used by the app. I&amp;#39;m suprised the same works if you don&amp;#39;t program the bootloader.&lt;/p&gt;
&lt;p&gt;Have you tried to debug the app to maybe see what triggers the fault?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hardfault in blinky example&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-35d73f0f21f543f195d46b3d82582eac/pastedimage1600864100796v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader start application at 0x1000 fails</title><link>https://devzone.nordicsemi.com/thread/271083?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 12:15:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1920f65a-8565-4e4c-85e6-d56ae1bc59af</guid><dc:creator>MassimoF</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thanks for the quick reply.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the mbr_blinky example and tried it with and without the bootloader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Without bootloader the example runs fine (blinky_mbr.hex + mbr.hex). Adding the bl + settings (settings of blinky_pca10056_mbr.hex) I&amp;#39;m having the same problem.&lt;/p&gt;
&lt;p&gt;I checked the project settings of the blinky_mbr example:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;linker_section_placement_macros=&amp;quot;FLASH_PH_START=0x0;FLASH_PH_SIZE=0x100000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x40000;FLASH_START=0x1000;FLASH_SIZE=0xff000;RAM_START=0x20000008;RAM_SIZE=0x3fff8&amp;quot;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;linker_section_placements_segments=&amp;quot;FLASH RX 0x0 0x100000;RAM RWX 0x20000000 0x40000&amp;quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know the difference of RAM_PH_START and RAM_START but I suppose that the example with mbr shuld be configured correctly?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader start application at 0x1000 fails</title><link>https://devzone.nordicsemi.com/thread/271068?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 11:52:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9aa7cfbd-3c5f-475d-b026-5653b8d171bc</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thanks. So the PC is inside the application&amp;#39;s address range, and last byte of xPSR (0x3) shows that the program is in the hardfault interrupt context. Have you tried to see if the program runs ok if you program just the MBR+app without the bootloader?&lt;/p&gt;
&lt;p&gt;The only problem I can think of is if the app is not configured to start at address 0x1000 in flash or if it uses the the first 8 bytes of RAM which is reserved to the MBR (0x20000000 - 0x20000008)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader start application at 0x1000 fails</title><link>https://devzone.nordicsemi.com/thread/271064?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 11:47:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77627701-febb-4d28-9fca-140168c0aac4</guid><dc:creator>MassimoF</dc:creator><description>&lt;p&gt;Hello Vidar,&lt;/p&gt;
&lt;p&gt;this is the output of --readregs after the call of app start&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1600861550170v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader start application at 0x1000 fails</title><link>https://devzone.nordicsemi.com/thread/271063?ContentTypeID=1</link><pubDate>Wed, 23 Sep 2020 11:42:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a20a904-cb16-49da-ade2-86170a66914c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It looks like you are doing everything correctly. Could you try to run &amp;quot;nrfjprog --readregs&amp;quot; after flashing the device to see where it gets stuck?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>