<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tomáš Pilný</title>
    <description>The latest articles on DEV Community by Tomáš Pilný (@pilnytomas).</description>
    <link>https://dev.to/pilnytomas</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1021717%2Facec466e-a0f8-4866-b01e-619782dc7545.jpeg</url>
      <title>DEV Community: Tomáš Pilný</title>
      <link>https://dev.to/pilnytomas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pilnytomas"/>
    <language>en</language>
    <item>
      <title>How to compile Arduino-ESP32 core with ESP_LOGx</title>
      <dc:creator>Tomáš Pilný</dc:creator>
      <pubDate>Mon, 06 Feb 2023 13:42:26 +0000</pubDate>
      <link>https://dev.to/pilnytomas/how-to-compile-arduino-esp32-core-with-esplogx-3n50</link>
      <guid>https://dev.to/pilnytomas/how-to-compile-arduino-esp32-core-with-esplogx-3n50</guid>
      <description>&lt;p&gt;&lt;strong&gt;Why?&lt;/strong&gt;&lt;br&gt;
In Arduino IDE you can set the core debug level, however, this only sets debug level for files in Arduino-esp32 but the core which is distributed as a precompiled library in .sdk files, located in your Arduinio installation folder, is unaffected - the debug level remains the default “error”.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What?&lt;/strong&gt;&lt;br&gt;
If you want to change the core code or debug level, you need to clone the repo: &lt;a href="https://github.com/espressif/esp32-arduino-lib-builder" rel="noopener noreferrer"&gt;https://github.com/espressif/esp32-arduino-lib-builder&lt;/a&gt;, make the modifications there, compile and apply the changes (automatically by the build script).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How?&lt;/strong&gt;&lt;br&gt;
There are 2 basic approaches. Both of them involve editing file &lt;code&gt;esp32-arduino-lib-builder/configs/defconfig.common&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The first option is to edit the file directly and then build.&lt;br&gt;
Later you can &lt;code&gt;git restore configs/defconfig.common&lt;/code&gt; to go back.&lt;/p&gt;

&lt;p&gt;The second option is to copy the file &lt;code&gt;cp configs/defconfig.common configs/defconfig.debug&lt;/code&gt;, edit the debug version and then compile.&lt;/p&gt;

&lt;p&gt;Open the defconfig file&lt;br&gt;
&lt;code&gt;vim configs/defconfig.common&lt;/code&gt; or &lt;code&gt;vim configs/defconfig.debug&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Edit &lt;code&gt;line 45&lt;/code&gt; containing by default &lt;code&gt;CONFIG_LOG_DEFAULT_LEVEL_ERROR=y&lt;/code&gt; to one of the following lines depending on your desired log level:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CONFIG_LOG_DEFAULT_LEVEL_NONE=y # No output
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y # Errors - default
CONFIG_LOG_DEFAULT_LEVEL_WARN=y # Warnings
CONFIG_LOG_DEFAULT_LEVEL_INFO=y # Info
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y # Debug
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=y # Verbose - All of the above
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then simply build the libs for all SoCs or one specific SoC. Note that building for all SoCs takes a lot of time, so if you work only with one specific SoC, build only for that one.&lt;br&gt;
If you have copied the defconfig file and the debug settings are in file &lt;code&gt;configs/defconfig.debug&lt;/code&gt; add flag &lt;code&gt;debug&lt;/code&gt;&lt;br&gt;
example : &lt;code&gt;./build.sh debug&lt;/code&gt;&lt;br&gt;
Build all SoCs: &lt;code&gt;./build.sh&lt;/code&gt;&lt;br&gt;
Build only selected SoC: &lt;code&gt;./build.sh -t &amp;lt;soc&amp;gt;&lt;/code&gt;&lt;br&gt;
The exact text to choose the SoC:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;esp32&lt;/li&gt;
&lt;li&gt;esp32s2&lt;/li&gt;
&lt;li&gt;esp32c3&lt;/li&gt;
&lt;li&gt;esp32s3
Example: &lt;code&gt;./build.sh -t esp32&lt;/code&gt;
A wrong format or non-existing SoC will result in the error &lt;code&gt;sed: can't read sdkconfig: No such file or directory&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gratitude</category>
    </item>
  </channel>
</rss>
