<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Kozmotronik Q&amp;A - Recent questions and answers</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=qa</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: Convert date string to unix time in C</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=29&amp;qa_1=convert-date-string-to-unix-time-in-c&amp;show=30#a30</link>
<description>&lt;p&gt;You should use the &lt;a rel=&quot;nofollow&quot; href=&quot;https://man7.org/linux/man-pages/man3/strptime.3.html&quot;&gt;&lt;code&gt;strptime()&lt;/code&gt;&lt;/a&gt; for this purpose. It converts a string representation of time to a time &lt;a rel=&quot;nofollow&quot; href=&quot;https://man7.org/linux/man-pages/man3/tm.3type.html&quot;&gt;&lt;code&gt;tm&lt;/code&gt;&lt;/a&gt; structure. &lt;code&gt;strptime()&lt;/code&gt; works as the oppsite of &lt;a rel=&quot;nofollow&quot; href=&quot;https://man7.org/linux/man-pages/man3/strftime.3.html&quot;&gt;&lt;code&gt;strftime()&lt;/code&gt;&lt;/a&gt; function. Now let's see how the date obtained from the &lt;code&gt;esp_app_desc_t&lt;/code&gt; can be converted to unix time as &lt;code&gt;time_t&lt;/code&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Merge the &lt;code&gt;date&lt;/code&gt; and &lt;code&gt;time&lt;/code&gt; fields of &lt;code&gt;esp_app_desc_t&lt;/code&gt; into a buffer:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; char buf[32];

 const esp_app_desc_t *app_desc = esp_app_get_description();

 // Merge date and time fields
 strncpy(buf, app_desc-&amp;gt;date, sizeof(buf));
 strncat(buf, &quot; &quot;, sizeof(buf) - strlen(buf) - 1);
 strncat(buf, app_desc-&amp;gt;time, sizeof(buf) - strlen(buf) - 1);
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then convert it to time_t&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; time_t prod_time;
 struct tm prod_tm;
 memset(&amp;amp;prod_tm, 0, sizeof(prod_tm));
 strptime(buf, &quot;%b %d %Y %H:%M:%S&quot;, &amp;amp;prod_tm);
 prod_time = mktime(&amp;amp;prod_tm);
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here is the full snippet:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;time.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &quot;esp_log.h&quot;

void production_time_to_ctime(void)
{
    char buf[32];
    time_t prod_time;

    const esp_app_desc_t *app_desc = esp_app_get_description();

    // Merge date and time fields
    strncpy(buf, app_desc-&amp;gt;date, sizeof(buf));
    strncat(buf, &quot; &quot;, sizeof(buf) - strlen(buf) - 1);
    strncat(buf, app_desc-&amp;gt;time, sizeof(buf) - strlen(buf) - 1);

    ESP_LOGI(TAG, &quot;production_time_init: merged time string: %s&quot;, buf);

    struct tm prod_tm;
    memset(&amp;amp;prod_tm, 0, sizeof(prod_tm));
    strptime(buf, &quot;%b %d %Y %H:%M:%S&quot;, &amp;amp;prod_tm);
    prod_time = mktime(&amp;amp;prod_tm);
    ESP_LOGI(TAG, &quot;production_time_init: unix time: %lld&quot;, prod_time);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;References&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://stackoverflow.com/questions/69965179/convert-string-to-time-t-in-c&quot;&gt;https://stackoverflow.com/questions/69965179/convert-string-to-time-t-in-c&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=29&amp;qa_1=convert-date-string-to-unix-time-in-c&amp;show=30#a30</guid>
<pubDate>Mon, 27 Oct 2025 13:43:05 +0000</pubDate>
</item>
<item>
<title>Answered: rst:0x8 (TG1WDT_SYS_RST),boot:0xc (SPI_FAST_FLASH_BOOT)</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=27&amp;qa_1=rst-0x8-tg1wdt_sys_rst-boot-0xc-spi_fast_flash_boot&amp;show=28#a28</link>
<description>&lt;p&gt;This reset occurs when an unimplemented GPIO pin is accessed. The following pins are absent on &lt;code&gt;ESP32-C3-DevKitM-1&lt;/code&gt; board: &lt;code&gt;11, 12, 13, 14, 15&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You need to check the board's or module's datasheet to see what GPIO pins are available and update your code accordingly.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Reference&lt;/em&gt;&lt;br&gt;
&lt;em&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://esp32.com/viewtopic.php?t=32799&quot;&gt;https://esp32.com/viewtopic.php?t=32799&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</description>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=27&amp;qa_1=rst-0x8-tg1wdt_sys_rst-boot-0xc-spi_fast_flash_boot&amp;show=28#a28</guid>
<pubDate>Fri, 29 Aug 2025 14:28:53 +0000</pubDate>
</item>
<item>
<title>Answered: Replace lines that have RELAY_CHN_STATE_* pattern in vscode</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=25&amp;qa_1=replace-lines-that-have-relay_chn_state_-pattern-in-vscode&amp;show=26#a26</link>
<description>&lt;p&gt;Here is how to do what you want:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Copy and paste the text into the vscode's search bar and enable regex search&lt;/li&gt;
&lt;li&gt;Escape the function parantheses: &lt;code&gt;TEST_ASSERT_EQUAL\(RELAY_CHN_STATE_FORWARD, relay_chn_get_state\(ch\)\);&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Capture the enum by enclosing it with paranteses: &lt;code&gt;(RELAY_CHN_STATE_FORWARD)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Modify the enum so that it matches and captures all possible states (e.g. REVERSE, STOPPED etc.): &lt;code&gt;(RELAY_CHN_STATE_[A-Z_]+)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Optionally you can add &lt;code&gt;\s*&lt;/code&gt; between two parameters, after the first parameter's comma. This will match the text whether or not it has a space between two parameters.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The final regex statement should be:&lt;/p&gt;
&lt;p&gt; TEST_ASSERT_EQUAL((RELAY_CHN&lt;em&gt;STATE&lt;/em&gt;[A-Z_]+),\s* relay_chn_get_state(ch));&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally paste this with the captured value into the replace box:&lt;/p&gt;
&lt;p&gt; check_all_channels_for_state($1);&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
</description>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=25&amp;qa_1=replace-lines-that-have-relay_chn_state_-pattern-in-vscode&amp;show=26#a26</guid>
<pubDate>Tue, 26 Aug 2025 12:55:31 +0000</pubDate>
</item>
<item>
<title>Answered: Replace a line with regex until the next non-blank line in VS Code</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=23&amp;qa_1=replace-line-with-regex-until-the-next-non-blank-line-in-code&amp;show=24#a24</link>
<description>&lt;p&gt;In the search box of VS Code turn on the regex by pressing the &lt;strong&gt;.&lt;/strong&gt;* button. Then past the following expression:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint8_t ch = 0;\r?[\n]+\t?[\s]+
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Leave the Replace box blank and either replace one by one or all at once.&lt;/p&gt;
</description>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=23&amp;qa_1=replace-line-with-regex-until-the-next-non-blank-line-in-code&amp;show=24#a24</guid>
<pubDate>Tue, 12 Aug 2025 08:13:53 +0000</pubDate>
</item>
<item>
<title>Answered: Passing a pointer as event_data parameter in ESP-IDF</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=21&amp;qa_1=passing-a-pointer-as-event_data-parameter-in-esp-idf&amp;show=22#a22</link>
<description>&lt;p&gt;Since the &lt;code&gt;event_loop&lt;/code&gt; library makes a copy of the &lt;code&gt;event_data&lt;/code&gt; parameter, the original pointer value should be passed by wrapping it by another pointer, instead of passing the original pointer directly.&lt;/p&gt;
&lt;p&gt;Here is the fixed version of the code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;esp_event_post_to(relay_chn_event_loop,
                      RELAY_CHN_CMD_EVENT,
                      cmd,
                      &amp;amp;chn_ctl,
                      sizeof(chn_ctl),
                      portMAX_DELAY);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And the handler:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void relay_chn_event_handler(void* handler_arg, esp_event_base_t event_base, int32_t event_id, void* event_data)
{
    relay_chn_ctl_t* chn_ctl = *(relay_chn_ctl_t**) event_data;
    ...
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This way, the original pointer value will be preserved by pointing it by another pointer:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;wrapper_pointer-&amp;gt;original_pointer
&lt;/code&gt;&lt;/pre&gt;
</description>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=21&amp;qa_1=passing-a-pointer-as-event_data-parameter-in-esp-idf&amp;show=22#a22</guid>
<pubDate>Mon, 11 Aug 2025 13:10:47 +0000</pubDate>
</item>
<item>
<title>Answered: Bootloader size error when I set log level to DEBUG in ESP-IDF</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=19&amp;qa_1=bootloader-size-error-when-i-set-log-level-to-debug-in-esp-idf&amp;show=20#a20</link>
<description>&lt;p&gt;As the error says, this could be solved by increasing the offset of the partition table. To do this, open the sdkconfig editor either in UI if you use IDE, or by &lt;code&gt;idf.py menuconfig&lt;/code&gt;. Then &lt;strong&gt;&lt;em&gt;Partition Table &amp;gt; Offset of partition table&lt;/em&gt;&lt;/strong&gt; and increase the offset value as needed. I.e. in your case it can be &lt;code&gt;0x9000&lt;/code&gt;.&lt;/p&gt;
</description>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=19&amp;qa_1=bootloader-size-error-when-i-set-log-level-to-debug-in-esp-idf&amp;show=20#a20</guid>
<pubDate>Mon, 11 Aug 2025 10:26:39 +0000</pubDate>
</item>
<item>
<title>Answered: How to remove a line completely using regex in VS Code</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=17&amp;qa_1=how-to-remove-a-line-completely-using-regex-in-vs-code&amp;show=18#a18</link>
<description>&lt;p&gt;What you need to do:&lt;br&gt;
&lt;code&gt;CTRL + SHIFT + F&lt;/code&gt; (search entire project) or &lt;code&gt;CTRL + F&lt;/code&gt; to search within a file.&lt;br&gt;
Press the .* button to enable regex mode.&lt;br&gt;
Paste the following regex into the Find field:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;^[ \t]*\* @param chn_id.*\r?\n
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Explanation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;^[ \t]*&lt;/code&gt; → spaces (space/tab) at the beginning of the line&lt;/li&gt;
&lt;li&gt;&lt;code&gt;\* @param chn_id&lt;/code&gt; → line content&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.*&lt;/code&gt; → capture the rest&lt;/li&gt;
&lt;li&gt;&lt;code&gt;\r?\n&lt;/code&gt; → delete the end of the line&lt;/li&gt;
&lt;li&gt;Leave the Replace field blank (i.e., delete)&lt;/li&gt;
&lt;li&gt;Either replace all or replace one by one&lt;/li&gt;
&lt;/ul&gt;
</description>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=17&amp;qa_1=how-to-remove-a-line-completely-using-regex-in-vs-code&amp;show=18#a18</guid>
<pubDate>Fri, 08 Aug 2025 07:41:11 +0000</pubDate>
</item>
<item>
<title>Answered: Schematic sheet template not updated in KiCad</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=15&amp;qa_1=schematic-sheet-template-not-updated-in-kicad&amp;show=16#a16</link>
<description>&lt;p&gt;In order to apply new changes from the template sheet to the current file, you need to delete the embedded reference. To do that, open the schematic editor and follow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;File &amp;gt; Schematic Settings... &amp;gt; Schematic Data &amp;gt; Embedded Files&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;There you should see an embedded file reference, select and delete it and then close the window.&lt;/li&gt;
&lt;li&gt;Now go to the &lt;strong&gt;File &amp;gt; Page Settings..&lt;/strong&gt; again&lt;/li&gt;
&lt;li&gt;From the &lt;strong&gt;Drawing Sheet&lt;/strong&gt; section select the template file you modified and click &lt;strong&gt;OK&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now the changes should be applied to the page.&lt;/p&gt;
</description>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=15&amp;qa_1=schematic-sheet-template-not-updated-in-kicad&amp;show=16#a16</guid>
<pubDate>Fri, 25 Jul 2025 11:38:30 +0000</pubDate>
</item>
<item>
<title>Answered: Steam folder is not executable error</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=13&amp;qa_1=steam-folder-is-not-executable-error&amp;show=14#a14</link>
<description>&lt;p&gt;The problem is with the &lt;code&gt;users&lt;/code&gt; fuse flag. Remove that flag and you should be able to choose any folder of that disk.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;UUID=DISKUUID   MOUNTPATH    ext4         nofail                           0 0
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Source&lt;/em&gt;&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://askubuntu.com/a/1324802/1599999&quot;&gt;https://askubuntu.com/a/1324802/1599999&lt;/a&gt;&lt;/p&gt;
</description>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=13&amp;qa_1=steam-folder-is-not-executable-error&amp;show=14#a14</guid>
<pubDate>Thu, 24 Jul 2025 21:14:46 +0000</pubDate>
</item>
<item>
<title>Answered: What is the proper way to rename a KiCad project</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=11&amp;qa_1=what-is-the-proper-way-to-rename-a-kicad-project&amp;show=12#a12</link>
<description>&lt;p&gt;In order to change the project name properly and propagate the new name to all project files, we should rename the project from the File menu of KiCad.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the &lt;strong&gt;main project window&lt;/strong&gt; by clicking the *&lt;em&gt;`&lt;/em&gt;.kicad&lt;em&gt;pro`** (&lt;/em&gt;&lt;code&gt;*.pro&lt;/code&gt; for KiCad 5.x and earlier_) file&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;File &amp;gt; Save As...&lt;/strong&gt; and save the project with the new name.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;IMPORTANT&lt;/strong&gt;&lt;br&gt;
This should only be made from the main window so that KiCad update all refences in files.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;References&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.kicad.org/9.0/en/kicad/kicad.html#kicad_files_and_folders&quot;&gt;https://docs.kicad.org/9.0/en/kicad/kicad.html#kicad_files_and_folders&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://forum.kicad.info/t/rename-a-project/38963&quot;&gt;https://forum.kicad.info/t/rename-a-project/38963&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=11&amp;qa_1=what-is-the-proper-way-to-rename-a-kicad-project&amp;show=12#a12</guid>
<pubDate>Thu, 24 Jul 2025 15:41:09 +0000</pubDate>
</item>
<item>
<title>Answered: How to run an app with a different locale in Linux</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=9&amp;qa_1=how-to-run-an-app-with-a-different-locale-in-linux&amp;show=10#a10</link>
<description>&lt;p&gt;It is quite possible and fairly simple. We just have to make sure the locale we want to set is already installed on the system.&lt;/p&gt;
&lt;p&gt;So, in order to set a specific locale for an app, all we have to do is to edit its launcher via either GUI or CLI or its text file.&lt;br&gt;
The editing via GUI depends on the desktop environment. We should be able to find it in the main launcher settings. That's why I will only share editing the relevant &lt;code&gt;*.desktop&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;The general format to set the locale for an app is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;env LANG=&amp;lt;desired-lang-code&amp;gt; app_name
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this case it is &lt;code&gt;env LANG=en_US.UTF-8&lt;/code&gt; for English or &lt;code&gt;env LANG=C&lt;/code&gt; for Linux default. The final look of the *.desktop file would be:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[Desktop Entry]
...
Exec=env LANG=en_US.UTF-8 /usr/bin/code %F
...
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Sources:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://askubuntu.com/questions/1507926/running-an-app-under-specific-locale-formats&quot;&gt;https://askubuntu.com/questions/1507926/running-an-app-under-specific-locale-formats&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://askubuntu.com/questions/1160737/how-to-find-desktop-file-location-for-a-particular-application&quot;&gt;https://askubuntu.com/questions/1160737/how-to-find-desktop-file-location-for-a-particular-application&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=9&amp;qa_1=how-to-run-an-app-with-a-different-locale-in-linux&amp;show=10#a10</guid>
<pubDate>Thu, 24 Jul 2025 15:07:52 +0000</pubDate>
</item>
<item>
<title>Answered: How to exit qemu in an ESP-IDF?</title>
<link>https://ask.kozmotronik.net.tr/index.php?qa=6&amp;qa_1=how-to-exit-qemu-in-an-esp-idf&amp;show=8#a8</link>
<description>&lt;p&gt;In this case, qemu is launched by the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/tools/idf-monitor.html&quot;&gt;IDF Monitor&lt;/a&gt;. Therefore, the keyboard shortcuts of the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/tools/idf-monitor.html&quot;&gt;IDF Monitor&lt;/a&gt; must be used:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First press &lt;strong&gt;CTRL + T&lt;/strong&gt; menu escape key&lt;/li&gt;
&lt;li&gt;Then press &lt;strong&gt;X&lt;/strong&gt; to exit&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;PS: The case of the letter makes no difference.&lt;/em&gt;&lt;/p&gt;
</description>
<guid isPermaLink="true">https://ask.kozmotronik.net.tr/index.php?qa=6&amp;qa_1=how-to-exit-qemu-in-an-esp-idf&amp;show=8#a8</guid>
<pubDate>Thu, 24 Jul 2025 12:27:13 +0000</pubDate>
</item>
<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>