<?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>How to connect debugger to Thread Secure DFU example with Segger Embedded Studio</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66870/how-to-connect-debugger-to-thread-secure-dfu-example-with-segger-embedded-studio</link><description>Hi, 
 
 Following the example https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/thread_example_dfu.html how can you connect a jlink debugger and step through the application? 
 Should a post-build script generate a settings.hex file to merge with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Oct 2020 09:14:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66870/how-to-connect-debugger-to-thread-secure-dfu-example-with-segger-embedded-studio" /><item><title>RE: How to connect debugger to Thread Secure DFU example with Segger Embedded Studio</title><link>https://devzone.nordicsemi.com/thread/273964?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2020 09:14:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fcb381a-b675-448c-81ba-7f93e2f9f815</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;&amp;nbsp;I just tested here and it worked fine for me. I can stop at the beginning of main().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please make sure you use the client application image that you built from SES, not the one in armgcc as suggested in the documentation.&amp;nbsp;Different compile gives different image even though they are same application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So the app.hex should be from&amp;nbsp;\examples\thread\dfu\client\pca10056\blank\ses\Output\Release\Exe&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please make sure you can debug it by just flashing MBR then app, before you test with merging settings and flashing bootloader.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect debugger to Thread Secure DFU example with Segger Embedded Studio</title><link>https://devzone.nordicsemi.com/thread/273803?ContentTypeID=1</link><pubDate>Thu, 08 Oct 2020 14:17:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efc69627-832b-49e0-b893-2e4a1be26532</guid><dc:creator>pdgendt_bas</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I just want to be able to step through the application code, leaving the MBR/bootloader/settings as is.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So what I do: (as the documentation describes)&lt;/p&gt;
&lt;p&gt;Generate keys (once) with &lt;strong&gt;nrfutils&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Then the following commands&lt;/p&gt;
&lt;pre&gt;&lt;span&gt;&lt;span&gt;# generate settings hex file&lt;br /&gt;nrfutil settings generate&amp;nbsp;&lt;/span&gt;&lt;/span&gt;--app-boot-validation NO_VALIDATION&amp;nbsp;--family NRF52840&amp;nbsp;&lt;span&gt;--application app.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 settings.hex&lt;br /&gt;&lt;br /&gt;# merge app + settings&lt;br /&gt;mergehex -m app.hex settings.hex -o merged.hex&lt;br /&gt;&lt;br /&gt;# erase the chip&lt;br /&gt;nrfjprog -f nrf52 --eraseall&lt;br /&gt;&lt;br /&gt;# flash mbr&lt;br /&gt;nrfjprog -f nrf52 -r --program components/softdevice/mbr/hex/mbr_nrf52_2.4.1_mbr.hex --chiperase&lt;br /&gt;&lt;br /&gt;# flash bootloader&lt;br /&gt;nrfjprog -f nrf52 -r --program bootloader.hex&lt;br /&gt;&lt;br /&gt;# flash settings + app&lt;br /&gt;nrfjprog -f nrf52 -r --program merged.hex --sectorerase &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;After that from SES I do Debug &amp;gt; Go but the output screen show:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Preparing target for user application&lt;br /&gt;Executing Reset script TargetInterface.resetAndStop()&lt;br /&gt;Reset: Halt core after reset via DEMCR.VC_CORERESET.&lt;br /&gt;Reset: Reset device via AIRCR.SYSRESETREQ.&lt;br /&gt;Stopped by vector catch&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect debugger to Thread Secure DFU example with Segger Embedded Studio</title><link>https://devzone.nordicsemi.com/thread/273778?ContentTypeID=1</link><pubDate>Thu, 08 Oct 2020 13:36:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dd5b3ea-8624-4d2f-8a5b-f41e34c1e35b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you elaborate more what exactly you want to achieve ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;If you want to debug the bootloader, you can just use SES and step through the code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to debug the application, after you receive the application image via DFU, you can run the debugger of the application in SES as normally.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that the &lt;span&gt;settings.hex contains the bootloader setting and it&amp;#39;s not located inside the application&amp;#39;s flash area. So when you debug the application using your application compiled binary files the bootloader setting won&amp;#39;t have any effect.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>