<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FreeRTOS TAD Runtime stat not working if optimization is used in MCUXpresso IDE</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/FreeRTOS-TAD-Runtime-stat-not-working-if-optimization-is-used/m-p/876105#M3718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;thanks for finding that ulTotalRuntime!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already had to add several updates to the original FreeRTOS kernel sources to deal with compiler and linker optimizations.&lt;/P&gt;&lt;P&gt;There is the desire to have the kernel as compiler independent as possible, but sometimes this is really not feasible.&lt;/P&gt;&lt;P&gt;As for this current issue, removing the 'static' solves the problem for me. Another (and I think better) solution is to use the used attribute:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="property macro token"&gt;#if 1 &lt;/SPAN&gt;
  PRIVILEGED_DATA &lt;SPAN class="keyword token"&gt;static&lt;/SPAN&gt;
  &lt;SPAN class="property macro token"&gt;#ifdef __GNUC__&lt;/SPAN&gt;
  &lt;SPAN class="token function"&gt;__attribute__&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;used&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
  &lt;SPAN class="property macro token"&gt;#endif&lt;/SPAN&gt;
  uint32_t ulTotalRunTime &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0UL&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;   &lt;SPAN class="comment token"&gt;/*&amp;lt; Holds the total amount of execution time as defined by the run time counter clock. */&lt;/SPAN&gt;
&lt;SPAN class="property macro token"&gt;#else&lt;/SPAN&gt;
  PRIVILEGED_DATA &lt;SPAN class="keyword token"&gt;static&lt;/SPAN&gt; uint32_t ulTotalRunTime &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0UL&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;   &lt;SPAN class="comment token"&gt;/*&amp;lt; Holds the total amount of execution time as defined by the run time counter clock. */&lt;/SPAN&gt;
&lt;SPAN class="property macro token"&gt;#endif&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have now added this to our university FreeRTOS port (available on &lt;A class="link-titled" href="https://github.com/ErichStyger/McuOnEclipseLibrary/tree/master/lib" rel="nofollow noopener noreferrer" title="https://github.com/ErichStyger/McuOnEclipseLibrary/tree/master/lib" target="_blank"&gt;McuOnEclipseLibrary/lib at master · ErichStyger/McuOnEclipseLibrary · GitHub&lt;/A&gt; ). If you are interested: that port deals as well with the -lto (Link time optimization) of the GNU tool chain, search for configLTO_HELPER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2019 18:36:24 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2019-04-11T18:36:24Z</dc:date>
    <item>
      <title>FreeRTOS TAD Runtime stat not working if optimization is used</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/FreeRTOS-TAD-Runtime-stat-not-working-if-optimization-is-used/m-p/876101#M3714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following configuration:&lt;/P&gt;&lt;P&gt;MCPXpresso V10.3.1&lt;/P&gt;&lt;P&gt;LPC1519 CPU&lt;/P&gt;&lt;P&gt;FreeRTOS is configured to generate Runtime statistics&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Task List (FreeRTOS) is working ok when the Project is compiled with -O0.&lt;/P&gt;&lt;P&gt;But when i change to any other Optimization level the TAD plugin is not capabel to show the Runtime statistics&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TAD log for working case is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;"FreeRTOS Task Aware Debugger for GDB" version 1.0.8 (201810241449)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;(c) 2016-2018 NXP Semiconductors, Inc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;==================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:32:35.762 INFO: [TadModel] DSF session ID 12 has started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:32:49.91 INFO: [TadState] TAD state changed: DEBUG_STARTED -&amp;gt; DEBUG_INIT_0 (RESUMED, USER_REQUEST)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:32:49.321 INFO: [TadState] TAD state changed: DEBUG_INIT_0 -&amp;gt; DEBUG_INIT_1 (SUSPENDED, SIGNAL)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:32:51.320 INFO: [TadState] TAD state changed: DEBUG_INIT_1 -&amp;gt; DEBUG_SUSPENDED (RESUMED, USER_REQUEST)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:32:51.444 INFO: [TadState] TAD state changed: DEBUG_SUSPENDED -&amp;gt; DEBUG_SUSPENDED (SUSPENDED, BREAKPOINT)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:32:59.513 INFO: [TadState] TAD state changed: DEBUG_SUSPENDED -&amp;gt; DEBUG_RESUMED (RESUMED, USER_REQUEST)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:02.826 INFO: [TadState] TAD state changed: DEBUG_RESUMED -&amp;gt; READY (SUSPENDED, SIGNAL)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:04.960 INFO: [Benchmark] Loading data for "Determine FreeRTOS version" has started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:04.967 ERROR: [VariableReader] Could not read variable expression: "&amp;amp;(FreeRTOSDebugConfig)".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:04.973 ERROR: [VariableReader] Could not read variable expression: "sizeof(struct TaskControlBlock_t)".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:04.984 ERROR: [VariableReader] Could not read variable expression: "&amp;amp;(((struct QueueDefinition *) 0)-&amp;gt;pcTail)".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:04.984 INFO: [TadModel] FreeRTOS version has been identified from available FreeRTOS symbols as 10,11.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:04.984 INFO: [Benchmark] Loading data for "Determine FreeRTOS version" took 24 ms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:04.984 INFO: [Benchmark] Loading data for "Task List" has started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:04.991 ERROR: [VariableReader] Could not read variable expression: "sizeof(xQueueRegistry)".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:04.991 ERROR: [QueueFactory] Queue registry size is zero! Each queue must be registered with vQueueAddToRegistry() and configQUEUE_REGISTRY_SIZE macro &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;must be greater than zero (found in FreeRTOSConfig.h)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:06.888 INFO: [Benchmark] Loading data for "Task List" took 1903 ms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:16.511 INFO: [TadModel] DSF session ID 12 has ended.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while the error case is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;"FreeRTOS Task Aware Debugger for GDB" version 1.0.8 (201810241449)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;(c) 2016-2018 NXP Semiconductors, Inc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;==================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:40.26 INFO: [TadModel] DSF session ID 13 has started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:53.624 INFO: [TadState] TAD state changed: DEBUG_STARTED -&amp;gt; DEBUG_INIT_0 (RESUMED, USER_REQUEST)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:53.848 INFO: [TadState] TAD state changed: DEBUG_INIT_0 -&amp;gt; DEBUG_INIT_1 (SUSPENDED, SIGNAL)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:55.424 INFO: [TadState] TAD state changed: DEBUG_INIT_1 -&amp;gt; DEBUG_SUSPENDED (RESUMED, USER_REQUEST)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:55.531 INFO: [TadState] TAD state changed: DEBUG_SUSPENDED -&amp;gt; DEBUG_SUSPENDED (SUSPENDED, BREAKPOINT)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:57.940 INFO: [TadState] TAD state changed: DEBUG_SUSPENDED -&amp;gt; DEBUG_RESUMED (RESUMED, USER_REQUEST)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:33:59.588 INFO: [TadState] TAD state changed: DEBUG_RESUMED -&amp;gt; READY (SUSPENDED, SIGNAL)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:34:00.894 INFO: [Benchmark] Loading data for "Determine FreeRTOS version" has started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:34:00.901 ERROR: [VariableReader] Could not read variable expression: "&amp;amp;(FreeRTOSDebugConfig)".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:34:00.908 ERROR: [VariableReader] Could not read variable expression: "sizeof(struct TaskControlBlock_t)".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:34:00.918 ERROR: [VariableReader] Could not read variable expression: "&amp;amp;(((struct QueueDefinition *) 0)-&amp;gt;pcTail)".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:34:00.919 INFO: [TadModel] FreeRTOS version has been identified from available FreeRTOS symbols as 10,11.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:34:00.919 INFO: [Benchmark] Loading data for "Determine FreeRTOS version" took 25 ms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:34:00.919 INFO: [Benchmark] Loading data for "Task List" has started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:34:00.927 ERROR: [VariableReader] Could not read variable expression: "sizeof(xQueueRegistry)".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:34:00.927 ERROR: [QueueFactory] Queue registry size is zero! Each queue must be registered with vQueueAddToRegistry() and configQUEUE_REGISTRY_SIZE macro &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;must be greater than zero (found in FreeRTOSConfig.h)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;&lt;STRONG&gt;09:34:00.942 INFO: [FreeRTOS] FreeRTOS macro "configGENERATE_RUN_TIME_STATS" is disabled.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:34:02.684 INFO: [Benchmark] Loading data for "Task List" took 1765 ms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;09:34:11.345 INFO: [TadModel] DSF session ID 13 has ended.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some how the Plugin is thinking that&amp;nbsp;configGENERATE_RUN_TIME_STATS is not define if the optimization is used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2019 08:14:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/FreeRTOS-TAD-Runtime-stat-not-working-if-optimization-is-used/m-p/876101#M3714</guid>
      <dc:creator>MartinHo</dc:creator>
      <dc:date>2019-04-03T08:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS TAD Runtime stat not working if optimization is used</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/FreeRTOS-TAD-Runtime-stat-not-working-if-optimization-is-used/m-p/876102#M3715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FreeRTOS TAD depends on some debug information about the kernel to properly show the information.&lt;/P&gt;&lt;P&gt;If this information is missing,&amp;nbsp; it will not work properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 08:48:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/FreeRTOS-TAD-Runtime-stat-not-working-if-optimization-is-used/m-p/876102#M3715</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2019-04-10T08:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS TAD Runtime stat not working if optimization is used</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/FreeRTOS-TAD-Runtime-stat-not-working-if-optimization-is-used/m-p/876103#M3716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for Your answer is there any documentation what debug information is needed by the FreeRTOS TAD?&lt;/P&gt;&lt;P&gt;Because in some application of mine I cannot compile with -O0 (the code gets to big to fit into the flash).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 14:39:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/FreeRTOS-TAD-Runtime-stat-not-working-if-optimization-is-used/m-p/876103#M3716</guid>
      <dc:creator>MartinHo</dc:creator>
      <dc:date>2019-04-10T14:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS TAD Runtime stat not working if optimization is used</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/FreeRTOS-TAD-Runtime-stat-not-working-if-optimization-is-used/m-p/876104#M3717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK I did some research by my self.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TAD check for&amp;nbsp;&lt;STRONG&gt;ulTotalRunTime&lt;/STRONG&gt;,&amp;nbsp;but this variable is optimized out by the compiler when the optimization level is different from -O0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main problem is that this variable is define static inside tasks.c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know any&amp;nbsp;"trick" to prevent the compiler from optimize out a static variable define in a source file that i don't what to modify (because&amp;nbsp;its part of the RTOS).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest to find a other mode to determent the presents of the Real-time statistic data for a future version of the TAD (for example by trying to access&amp;nbsp;&lt;STRONG&gt;-&amp;gt;ulRunTimeCounter&lt;/STRONG&gt; of the Idle Task TCB).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2019 09:54:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/FreeRTOS-TAD-Runtime-stat-not-working-if-optimization-is-used/m-p/876104#M3717</guid>
      <dc:creator>MartinHo</dc:creator>
      <dc:date>2019-04-11T09:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS TAD Runtime stat not working if optimization is used</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/FreeRTOS-TAD-Runtime-stat-not-working-if-optimization-is-used/m-p/876105#M3718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;thanks for finding that ulTotalRuntime!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already had to add several updates to the original FreeRTOS kernel sources to deal with compiler and linker optimizations.&lt;/P&gt;&lt;P&gt;There is the desire to have the kernel as compiler independent as possible, but sometimes this is really not feasible.&lt;/P&gt;&lt;P&gt;As for this current issue, removing the 'static' solves the problem for me. Another (and I think better) solution is to use the used attribute:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="property macro token"&gt;#if 1 &lt;/SPAN&gt;
  PRIVILEGED_DATA &lt;SPAN class="keyword token"&gt;static&lt;/SPAN&gt;
  &lt;SPAN class="property macro token"&gt;#ifdef __GNUC__&lt;/SPAN&gt;
  &lt;SPAN class="token function"&gt;__attribute__&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;used&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
  &lt;SPAN class="property macro token"&gt;#endif&lt;/SPAN&gt;
  uint32_t ulTotalRunTime &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0UL&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;   &lt;SPAN class="comment token"&gt;/*&amp;lt; Holds the total amount of execution time as defined by the run time counter clock. */&lt;/SPAN&gt;
&lt;SPAN class="property macro token"&gt;#else&lt;/SPAN&gt;
  PRIVILEGED_DATA &lt;SPAN class="keyword token"&gt;static&lt;/SPAN&gt; uint32_t ulTotalRunTime &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0UL&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;   &lt;SPAN class="comment token"&gt;/*&amp;lt; Holds the total amount of execution time as defined by the run time counter clock. */&lt;/SPAN&gt;
&lt;SPAN class="property macro token"&gt;#endif&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have now added this to our university FreeRTOS port (available on &lt;A class="link-titled" href="https://github.com/ErichStyger/McuOnEclipseLibrary/tree/master/lib" rel="nofollow noopener noreferrer" title="https://github.com/ErichStyger/McuOnEclipseLibrary/tree/master/lib" target="_blank"&gt;McuOnEclipseLibrary/lib at master · ErichStyger/McuOnEclipseLibrary · GitHub&lt;/A&gt; ). If you are interested: that port deals as well with the -lto (Link time optimization) of the GNU tool chain, search for configLTO_HELPER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2019 18:36:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/FreeRTOS-TAD-Runtime-stat-not-working-if-optimization-is-used/m-p/876105#M3718</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2019-04-11T18:36:24Z</dc:date>
    </item>
  </channel>
</rss>

