<?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>MCUboot - disabling uart console print log</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66879/mcuboot---disabling-uart-console-print-log</link><description>Hi, At power on lots of MUCBoot prints pop out of the UART: 
 *** Booting Zephyr OS build v2.3.0-rc1-ncs1 *** &amp;lt;inf&amp;gt; mcuboot: Starting bootloader &amp;lt;inf&amp;gt; mcuboot: Primary image: magic=good, swap_type=0x3, copy_done=0x1, image_ok=0x1 &amp;lt;inf&amp;gt; mcuboot: Boot source</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Oct 2020 14:38:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66879/mcuboot---disabling-uart-console-print-log" /><item><title>RE: MCUboot - disabling uart console print log</title><link>https://devzone.nordicsemi.com/thread/274384?ContentTypeID=1</link><pubDate>Mon, 12 Oct 2020 14:38:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd3e154a-525e-4699-ac5a-e41bca83f097</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Okay, I see. I was assuming that you built the application as one, by enabling &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/CONFIG_BOOTLOADER_MCUBOOT.html"&gt;CONFIG_BOOTLOADER_MCUBOOT&lt;/a&gt;&amp;nbsp;in your application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you are building and flashing the bootloader separately, you can add the config I mentioned in this file:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/master/boot/zephyr/prj.conf"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/master/boot/zephyr/prj.conf&lt;/a&gt;, which is the configuration file for MCUBoot.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="gabrielef@cosmed.it"]Exactly when the &lt;em&gt;&amp;lt;your_mcuboot_config_file&amp;gt;.conf&lt;/em&gt; is used in the command series above ?[/quote]
&lt;p&gt;&amp;nbsp;The file I mentioned will not be used in your build sequence, because you build and flash the bootloader first and then the application.&lt;/p&gt;
&lt;p&gt;However, the configurations for MCUBoot including disabling the serial driver are used in step 1 when building the bootloader.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="gabrielef@cosmed.it"]Coul you explain the relationship between &lt;em&gt;&amp;quot;CONFIG_SERIAL=y&amp;quot;&lt;/em&gt;&amp;nbsp;in &lt;em&gt;&amp;lt;myapp&amp;gt;/prj.conf&lt;/em&gt;&lt;br /&gt;and &lt;em&gt;&amp;quot;CONFIG_SERIAL=n&amp;quot;&lt;/em&gt; in &lt;em&gt;&amp;lt;myapp&amp;gt;/&amp;lt;your_mcuboot_config_file&amp;gt;.conf&lt;/em&gt;[/quote]
&lt;p&gt;This just enables the serial driver in your application, so that you can get debug information out. And then disables the serial driver specifically in the bootloader, so you won&amp;#39;t see any logging from that module.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And then the addition to the CMakeLists.txt file that I described earlier is how we add the&amp;nbsp;&amp;lt;your_mcuboot_config_file&amp;gt;.conf file to the rest of the MCUboot configurations.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What may be confusing is that the reference to prj.conf in the code below is not a reference to the prj.conf in your application. It&amp;#39;s the MCUboot prj.conf file found here here: /bootloader/mcuboot/boot/zephyr/pjr.conf&lt;/p&gt;
&lt;p&gt;&lt;em&gt;set(mcuboot_CONF_FILE &lt;/em&gt;&lt;br /&gt;&lt;em&gt; prj.conf &lt;/em&gt;&lt;br /&gt;&lt;em&gt; ${CMAKE_CURRENT_LIST_DIR}/&amp;lt;your_mcuboot_config_file&amp;gt;.conf&lt;/em&gt;&lt;br /&gt;&lt;em&gt; )&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Heidi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot - disabling uart console print log</title><link>https://devzone.nordicsemi.com/thread/274316?ContentTypeID=1</link><pubDate>Mon, 12 Oct 2020 12:30:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27dc2ca5-4574-40af-b435-98f50c7eeba4</guid><dc:creator>Gabriele</dc:creator><description>&lt;p&gt;Hello Heidi,&lt;br /&gt;thank you for your reply.&lt;/p&gt;
&lt;p&gt;Suppose we start from a clean memory.&lt;br /&gt;Usually I execute four operations in succession&lt;/p&gt;
&lt;p&gt;1) rebuild mcuboot&lt;br /&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp; $ west build -b &amp;lt;myboard&amp;gt; -d build_mcuboot/ bootloader/mcuboot/boot/zephyr/&lt;/em&gt;&lt;br /&gt;2) flash mcuboot&lt;br /&gt;&lt;em&gt;&amp;nbsp; &amp;nbsp; $ west flash -d build_mcuboot&lt;/em&gt;&lt;br /&gt;3) rebuild app&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;em&gt;$ west build -b &amp;lt;myboard&amp;gt; -d build_app/ &amp;lt;myapp&amp;gt;&lt;/em&gt;&lt;br /&gt;4) flash app&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;em&gt;$ west flash --bin-file build_app/zephyr/app_update.bin&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Exactly when the &lt;em&gt;&amp;lt;your_mcuboot_config_file&amp;gt;.conf&lt;/em&gt; is used in the command series above ?&lt;/p&gt;
&lt;p&gt;Coul you explain the relationship between &lt;em&gt;&amp;quot;CONFIG_SERIAL=y&amp;quot;&lt;/em&gt;&amp;nbsp;in &lt;em&gt;&amp;lt;myapp&amp;gt;/prj.conf&lt;/em&gt;&lt;br /&gt;and &lt;em&gt;&amp;quot;CONFIG_SERIAL=n&amp;quot;&lt;/em&gt; in &lt;em&gt;&amp;lt;myapp&amp;gt;/&amp;lt;your_mcuboot_config_file&amp;gt;.conf&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot - disabling uart console print log</title><link>https://devzone.nordicsemi.com/thread/274231?ContentTypeID=1</link><pubDate>Mon, 12 Oct 2020 09:08:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06e58e8f-2611-497f-847e-4e497f1c2f04</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To disable the logging from &lt;span&gt;MCUboot&lt;/span&gt;, just add &amp;quot;CONFIG_SERIAL=n&amp;quot; to the &lt;span&gt;MCUboot&amp;nbsp;&lt;/span&gt;configuration file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, make a file called &amp;lt;your_mcuboot_config_file&amp;gt;.conf and add the configuration there.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And then in the CMakeLists.txt file of your application, add&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;set(mcuboot_CONF_FILE 
    prj.conf 
    ${CMAKE_CURRENT_LIST_DIR}/&amp;lt;your_mcuboot_config_file&amp;gt;.conf
    )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;at the beginning of the file, right after the &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/applications/serial_lte_modem/CMakeLists.txt#L7"&gt;cmake_minimum_required&lt;/a&gt;&lt;span&gt;(&amp;nbsp;&lt;/span&gt;&lt;span&gt;) line.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This&amp;nbsp;should disable the output from MCUboot only.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Heidi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>