<?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>Debugging MCUboot in SES</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70916/debugging-mcuboot-in-ses</link><description>Hi 
 My requirement is to upgrade the application firmware on the nRF52840-DK from another processor using SPI interface, and I am trying to understand the code to plug-in SPI interface. For that, I need to debug the code and perform step by step operation</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Jan 2021 19:58:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70916/debugging-mcuboot-in-ses" /><item><title>RE: Debugging MCUboot in SES</title><link>https://devzone.nordicsemi.com/thread/291376?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 19:58:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:617b3af6-6c98-4dd5-8f6a-b7db4207b045</guid><dc:creator>RAS_ID</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging MCUboot in SES</title><link>https://devzone.nordicsemi.com/thread/291375?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 19:38:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72181efd-c42f-4a57-a7f2-75f9f3d4ae7c</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Debugging/inspecting code can be done through a debugger tool, or through logging. For this case I think to the easiest and most convenient approach is to just add some logging inside the mentioned functions.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Logging&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add&amp;nbsp;&lt;code&gt;&lt;span&gt;#include&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;lt;sys/printk.h&amp;gt; &lt;/span&gt;&lt;/code&gt;&lt;span&gt;at the top of the file (e.g. &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/853e11283805ec66f157bc27a5286edb36046725/boot/boot_serial/src/boot_serial.c"&gt;boot_serial.c&lt;/a&gt;) and use printk(&amp;quot;This will get logged in a Terminal&amp;quot;);. E.g. add printk(&amp;quot;Inside boot_serial_start()\n&amp;quot;) in &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/853e11283805ec66f157bc27a5286edb36046725/boot/boot_serial/src/boot_serial.c#L621"&gt;boot_serial_start()&lt;/a&gt;&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;You could also use BOOT_LOG_INF(&amp;quot;This will get logged&amp;quot;);&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Then you should open a serial terminal (open several terminals, since the nRF9160 DK exposes several COM ports) to display the messages, e.g. use &lt;a href="https://www.compuphase.com/software_termite.htm"&gt;Termite&lt;/a&gt; with these settings&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5305.pastedimage1597835179755v12.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Debuging options:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ozone:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/tools/nordic_segger.html#segger-ozone"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/tools/nordic_segger.html#segger-ozone&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;SES:&amp;nbsp;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-3-ncs-v1-4-0#h131sk0f71xdy1hliuda1vq9p8n11weqgr"&gt;3.2 Debugging&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;GDB&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>