<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Kozmotronik Q&amp;A - Recent questions and answers in Computer science</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=qa&amp;qa_1=computer-science</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: How to enable GCOV coverage in ESP-IDF</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=4&amp;qa_1=how-to-enable-gcov-coverage-in-esp-idf&amp;show=7#a7</link>
<description>&lt;p&gt;This problem arises because the ESP-IDF can't find the configuration of the &lt;code&gt;app_trace&lt;/code&gt; component. Although this wasn't mentioned in the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.espressif.com/projects/vscode-esp-idf-extension/en/latest/additionalfeatures/coverage.html#esp-idf-coverage&quot;&gt;relevant docs&lt;/a&gt; or the &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/espressif/esp-idf/tree/v5.4.2/examples/system/gcov&quot;&gt;gcov&lt;/a&gt; example, the component should be declared in the &lt;code&gt;test_app/main/CMakeLists.txt&lt;/code&gt; file as a &lt;code&gt;REQUIRED&lt;/code&gt; component.&lt;/p&gt;
&lt;p&gt;Here is the correct declaration so that you can see the &lt;code&gt;app_trace&lt;/code&gt; configs in the SDK config menu:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;idf_component_register(
    SRCS ${srcs}
    INCLUDE_DIRS &quot;.&quot;
    REQUIRES unity relay_chn app_trace
    WHOLE_ARCHIVE
)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2&gt;GCOV Enablement Checklist&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Make sure the and &lt;code&gt;gcovr&lt;/code&gt; is installed by &lt;code&gt;python -m pip install gcovr&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;app_trace&lt;/code&gt; as &lt;code&gt;REQUIRED&lt;/code&gt; in the relevant CMakeLists.txt file&lt;/li&gt;
&lt;li&gt;Add the &lt;code&gt;--coverage&lt;/code&gt; compiler option for the relevant files to their specific cmake files. See &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/app_trace.html#compiler-option&quot;&gt;Compiler Option for Gcov&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Configure the App Trace component correctly to be able to collect gcov data. See &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/app_trace.html#project-configuration&quot;&gt;Project Configuration for Gcov&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</description>
<category>ESP-IDF</category>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=4&amp;qa_1=how-to-enable-gcov-coverage-in-esp-idf&amp;show=7#a7</guid>
<pubDate>Thu, 24 Jul 2025 12:12:09 +0000</pubDate>
</item>
<item>
<title>Answered: How to exit QEMU automatically when target restarts in ESP-IDF</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=3&amp;qa_1=how-to-exit-qemu-automatically-when-target-restarts-esp-idf&amp;show=5#a5</link>
<description>&lt;p&gt;QEMU has an option called &lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.qemu.org/docs/master/system/invocation.html?q=-no-reboot#:~:text=id%20(XEN%20only).-,%2Dno%2Dreboot,-Exit%20instead%20of&quot;&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;-no-reboot&lt;/span&gt;&lt;/a&gt;&amp;nbsp;(see also &lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://unix.stackexchange.com/questions/443017/can-i-make-qemu-exit-with-failure-on-kernel-panic/461741#461741&quot;&gt;here&lt;/a&gt;), that causes the QEMU exit when the emulated target is rebooted. But since QEMU is called via idf.py, this option should be passed to qemu using the &lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;--qemu-extra-args flag&lt;/span&gt; as stated &lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://docs.espressif.com/projects/vscode-esp-idf-extension/en/latest/additionalfeatures/qemu.html#:~:text=If%20you%20want%20to%20pass%20additional%20arguments%20idf.qemuExtraArgs%20configuration%20setting%20can%20be%20used.&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;So the final command to invoke in terminal would be like the following;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;&lt;span style=&quot;background-color:#dddddd&quot;&gt;idf.py qemu --qemu-extra-args &quot;-no-reboot&quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;all: initial;&quot; class=&quot;notranslate&quot;&gt;&lt;/div&gt;</description>
<category>ESP-IDF</category>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=3&amp;qa_1=how-to-exit-qemu-automatically-when-target-restarts-esp-idf&amp;show=5#a5</guid>
<pubDate>Thu, 24 Jul 2025 10:30:23 +0000</pubDate>
</item>
<item>
<title>Answered: How to add relative file links in Github or Gitea editor</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=1&amp;qa_1=how-to-add-relative-file-links-in-github-or-gitea-editor&amp;show=2#a2</link>
<description>&lt;p&gt;Both Github and Gitea supports relative linking in their markdown editor. The relative link format is just like specifying a path in a directory:&lt;br&gt;
&lt;code&gt;[Some file](path/to/somefile)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Or for referring to a specific snapshot of a file:&lt;br&gt;
&lt;code&gt;[Some file](/blob/ref-id/path/to/somefile)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Where the &lt;code&gt;ref-id&lt;/code&gt; can be a commit id or a branch name.&lt;/p&gt;
&lt;p&gt;Reference:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://stackoverflow.com/questions/7653483/github-relative-link-in-markdown-file&quot;&gt;https://stackoverflow.com/questions/7653483/github-relative-link-in-markdown-file&lt;/a&gt;&lt;/p&gt;
</description>
<category>SCM</category>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=1&amp;qa_1=how-to-add-relative-file-links-in-github-or-gitea-editor&amp;show=2#a2</guid>
<pubDate>Tue, 22 Jul 2025 22:03:36 +0000</pubDate>
</item>
</channel>
</rss>