<?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>Easy way to merge bootloader and application RTT output</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30310/easy-way-to-merge-bootloader-and-application-rtt-output</link><description>In general, it&amp;#39;s not a question, but the only suggestion for SDK developers how to improve debugging way. 
 So, while implementing DFU upgrade in my project I faced to the minor problem: RTT logging can work in application, or in bootloader, but not in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Mar 2022 16:27:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30310/easy-way-to-merge-bootloader-and-application-rtt-output" /><item><title>RE: Easy way to merge bootloader and application RTT output</title><link>https://devzone.nordicsemi.com/thread/357261?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 16:27:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95940af0-0dab-47c0-9ab4-11c82e57be72</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;To prevent the linker adding the section to the output, you can just use&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;.rtt (NOLOAD):
{
} &amp;gt; RAM&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in the linker script, then it does not need removing with objcopy.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Easy way to merge bootloader and application RTT output</title><link>https://devzone.nordicsemi.com/thread/244224?ContentTypeID=1</link><pubDate>Fri, 10 Apr 2020 14:24:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d2ef486-b7a7-4980-8e8d-2c4be0cc9019</guid><dc:creator>Fabien Comte</dc:creator><description>&lt;p&gt;Ok I found, in Makefile.common&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;$(NO_ECHO)$(OBJCOPY) -R .rtt -O binary $&amp;lt; $@&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;and&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;span style="background-color:#ffffff;"&gt;$(NO_ECHO)$(OBJCOPY) -R .rtt -O ihex $&amp;lt; $@&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Easy way to merge bootloader and application RTT output</title><link>https://devzone.nordicsemi.com/thread/244222?ContentTypeID=1</link><pubDate>Fri, 10 Apr 2020 14:14:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98946400-9b38-4158-94cb-3a256ce9e6a2</guid><dc:creator>Fabien Comte</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;How can I integrate objcopy cleanly in the flow under Windows please ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Easy way to merge bootloader and application RTT output</title><link>https://devzone.nordicsemi.com/thread/223323?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 12:37:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d5aee48-e7cc-471e-abe4-5b01f2fba7c4</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;2 major SDK versions later, still not implemented &amp;ndash; this would have saved me a fair bit of time!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Easy way to merge bootloader and application RTT output</title><link>https://devzone.nordicsemi.com/thread/223309?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 12:14:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:583d73ed-0063-4b62-84df-c8b35fb6b7a9</guid><dc:creator>nrbrook</dc:creator><description>&lt;p&gt;Additionally, on app start SEGGER_RTT_Init is run again which leads to loss of output from bootloader. To prevent this, you can modify SEGGER_RTT_INIT in SEGGER_RTT.c to check the memory is initialised (just first character here but you could check the string equals &amp;quot;SEGGER&amp;quot;):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void SEGGER_RTT_Init (void) {
    if(_SEGGER_RTT.acID[0] != &amp;#39;S&amp;#39;) {
        _DoInit();
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Easy way to merge bootloader and application RTT output</title><link>https://devzone.nordicsemi.com/thread/156393?ContentTypeID=1</link><pubDate>Thu, 08 Nov 2018 00:14:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f4006e7-b70c-464f-83ba-3da66d517991</guid><dc:creator>abhipray</dc:creator><description>&lt;p&gt;thanks for sharing this! very helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Easy way to merge bootloader and application RTT output</title><link>https://devzone.nordicsemi.com/thread/125225?ContentTypeID=1</link><pubDate>Tue, 20 Mar 2018 18:24:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03cfb57a-97ca-4ae6-b27d-fa7bcbebcd67</guid><dc:creator>ekrashtan</dc:creator><description>&lt;p&gt;I&amp;#39;m not familiar with Segger Studio, but every time when you observe different behaviour in power-on and reset sequences - you should check variables initialization. Ensure all your global variables have &amp;quot;static&amp;quot; type.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Easy way to merge bootloader and application RTT output</title><link>https://devzone.nordicsemi.com/thread/125065?ContentTypeID=1</link><pubDate>Mon, 19 Mar 2018 22:12:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e3df9bb-95c1-4d0c-bca4-4e0ab663c7c1</guid><dc:creator>ShannonPahl</dc:creator><description>&lt;div&gt;I&amp;#39;ve done something similar for Segger Studio and it works.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;However, the power on scenario seems to only show the app&amp;#39;s output. Any other reset and I see the merged output. Any insights into this ?&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Steps for Segger Studio:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;1. Add the .rtt section in RAM in flash_placement.xml for both projects (bootloader and app). Make sure its just after the .vectors_ram section:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; load=&amp;quot;No&amp;quot; name=&amp;quot;.rtt&amp;quot; address_symbol=&amp;quot;__start_rtt&amp;quot; end_symbol=&amp;quot;__stop_rtt&amp;quot; /&amp;gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;2. Make sure both projects have the same RAM_START address in *.emProject&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;3. Refactor out the Segger configuration from both sdk_config.h&amp;#39;s to a new file and add the following #define to the new file. Then include the file into both sdk_config.h&amp;#39;s.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;#define SEGGER_RTT_SECTION &amp;quot;.rtt&amp;quot;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;4. Since the Segger buffers were previously in a zeroed section and now they are not, add two lines to the main.c of both projects:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;NRF_SECTION_DEF(rtt, uint8_t);&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;int main(void)&lt;br /&gt;{&lt;br /&gt;memset(NRF_SECTION_START_ADDR(rtt), 0, NRF_SECTION_LENGTH(rtt));&lt;br /&gt;...&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Easy way to merge bootloader and application RTT output</title><link>https://devzone.nordicsemi.com/thread/121892?ContentTypeID=1</link><pubDate>Sun, 25 Feb 2018 04:15:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04cac947-91dd-4dcf-bb2d-9d1288901922</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/ekrashtan"&gt;ekrashtan&lt;/a&gt; this has been super handy. Thank you for posting this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Easy way to merge bootloader and application RTT output</title><link>https://devzone.nordicsemi.com/thread/120478?ContentTypeID=1</link><pubDate>Sat, 10 Feb 2018 12:13:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1091487b-83df-47b8-a655-d96f722a28ab</guid><dc:creator>ekrashtan</dc:creator><description>&lt;p&gt;&lt;span style="background-color:#ffffff;color:#000000;float:none;font-family:Arial, Helvetica, sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;"&gt;Ok, one important update. Current version of&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;nrfutil&lt;span style="background-color:#ffffff;color:#000000;float:none;font-family:Arial, Helvetica, sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;can&amp;#39;t remove RAM content from HEX file, so if you want to use resulting *.hex for creating DFU ZIP image, create it from elf with&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;objcopy&amp;#39;s&lt;span style="background-color:#ffffff;color:#000000;float:none;font-family:Arial, Helvetica, sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;"&gt;&amp;nbsp;key &amp;#39;-R .rtt&amp;#39;&lt;/span&gt;&lt;br style="background-color:#ffffff;color:#000000;font-family:Arial, Helvetica, sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;" /&gt;&lt;span style="background-color:#ffffff;color:#000000;float:none;font-family:Arial, Helvetica, sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;"&gt;Otherwise, you can see this unfixed issue:&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/issues/100"&gt;github.com/.../100&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Easy way to merge bootloader and application RTT output</title><link>https://devzone.nordicsemi.com/thread/120282?ContentTypeID=1</link><pubDate>Thu, 08 Feb 2018 13:36:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35a29329-9356-42d4-84d0-2d6216b00a15</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for the feedback and suggestions. I have notified the SDK team.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>