<?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>MQX Software SolutionsのトピックRe: Where are they?</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192966#M3901</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fish_yu,&amp;nbsp;&lt;/P&gt;&lt;P&gt;eGuy (Jeff) provided a good explanation. Simply re-read the original code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In qu_init.c, line 40:&lt;/P&gt;&lt;P&gt;#define MQX_FORCE_USE_INLINE_MACROS 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In mqx_cnfg.h&lt;/P&gt;&lt;P&gt;#ifdef MQX_FORCE_USE_INLINE_MACROS&lt;BR /&gt;#undef&amp;nbsp; MQX_USE_INLINE_MACROS&lt;BR /&gt;#define MQX_USE_INLINE_MACROS&amp;nbsp; MQX_FORCE_USE_INLINE_MACROS&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;So regardless of how you set MQX_USE_INLINE_MACROS, qu_init.c will use inline macros (which is the intent).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jun 2009 02:01:49 GMT</pubDate>
    <dc:creator>EAI</dc:creator>
    <dc:date>2009-06-24T02:01:49Z</dc:date>
    <item>
      <title>Where are they?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192963#M3898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;hello,everyone&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;Firstly, I will say that Thank really EAI's help.&lt;BR /&gt;&lt;/STRONG&gt;Sencondly, i want to know where are they. where are the defination of variable. and i am confused with a function or a micro. Although The function are not compiled by cw compiler, The MQX RTOS use it to initialize kernal. I don't know how to work and compile.&lt;BR /&gt;In &lt;FONT color="#ff0000"&gt;mqx_prv.h&lt;/FONT&gt;, &lt;FONT color="#ff0000"&gt;on line 775.&lt;/FONT&gt; there is a macro that is &lt;FONT color="#ff0000"&gt;#if MQX_USE_INLINE_MACROS&lt;/FONT&gt;. According to C language spec, Between &lt;FONT color="#ff0000"&gt;#if MQX_USE_INLINE_MACROS&lt;/FONT&gt; and &lt;FONT color="#ff0000"&gt;#endif&lt;/FONT&gt; that is on line 785, the compiler can't compiled.&lt;BR /&gt;However, the macro &lt;FONT color="#ff0000"&gt;_QUEUE_INIT(queue,max)&amp;nbsp;&lt;/FONT&gt; usually is called by many funtions. For example, in the file named &lt;FONT color="#ff0000"&gt;mqx.c&lt;/FONT&gt;, there is a kernal function named &lt;FONT color="#ff0000"&gt;_mqx_init_kernel_data_internal()&lt;/FONT&gt; on line 158. In the function, You will found a macro named &lt;FONT color="#ff0000"&gt;PSP_MEM_STOREBLOCK_ALIGNMENT&lt;/FONT&gt; , it is not define in all files, But I don't know why designed by MQX RTOS.&amp;nbsp; Is it initialize a zero for &lt;FONT color="#ff0000"&gt;SP_MEM_STOREBLOCK_ALIGNMENT&lt;/FONT&gt; ?&lt;BR /&gt;My second problem is a function or a macro named &lt;FONT color="#ff0000"&gt;_QUEUE_INIT(queue,max)&lt;/FONT&gt; in &lt;FONT color="#ff0000"&gt;mqx_prv.h&lt;BR /&gt;on line 776.&lt;/FONT&gt;&lt;BR /&gt;Because of the defination of the macro between another macro, the macro named &lt;FONT color="#ff0000"&gt;MQX_USE_INLINE_MACROS&lt;/FONT&gt; decide the &lt;FONT color="#ff0000"&gt;_QUEUE_INIT(queue,max)&lt;/FONT&gt;&amp;nbsp; to compile. But In the &lt;FONT color="#ff0000"&gt;mqx_prv.h,&lt;/FONT&gt; &lt;FONT color="#ff0000"&gt;MQX_USE_INLINE_MACROS&lt;/FONT&gt; is &lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;zero&lt;/FONT&gt;&lt;/STRONG&gt; that is defined&amp;nbsp; in file named &lt;FONT color="#ff0000"&gt;small_ram_config.h&lt;/FONT&gt; &lt;FONT color="#ff0000"&gt;on line 84&lt;/FONT&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;According this case, &lt;FONT color="#ff0000"&gt;The compiler can not compiled.&lt;/FONT&gt; But in fact, the psp project and bsp project may compiled successfully.&amp;nbsp; At the same time, The macro named &lt;FONT color="#ff0000"&gt;&lt;STRONG&gt;_QUEUE_INIT(queue,max)&lt;/STRONG&gt;&lt;/FONT&gt; usually called by many functions in many file.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Could you help me to explain the case?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;Finally, Thank you for reading.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;Fish_Yu&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by fish_yu on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-06-22&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;10:01 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 03:57:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192963#M3898</guid>
      <dc:creator>fish_yu</dc:creator>
      <dc:date>2009-06-23T03:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Where are they?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192964#M3899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't see any problems here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PSP_CFG_MEM_STOREBLOCK_ALIGNMENT is the number of reserved fields for PSP pads the STOREBLOCK_STRUCT (MQX V3.1 mqx_prv.h line1286 ). If PSP_MEM_STOREBLOCK_ALIGNMENT is not defined, PSP_CFG_MEM_STOREBLOCK_ALIGNMENT&amp;nbsp; is default to 0, otherwise it is set to whatever value PSP_CFG_MEM_STOREBLOCK_ALIGNMENT&amp;nbsp;is defined. I think it is left there in case in the future other processor need to align cache line (MQX3.1 mcf5225.c line 52).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No matter MQX_USE_INLINE_MACROS=0 or 1, _QUEUE_INIT is always defined and compiled. if MQX_USE_INLINE_MACROS=1 Line 776 is compiled (mqx_prv.h), otherwise Line 784 is compiled.&lt;/P&gt;&lt;P&gt;( Please&amp;nbsp;notice that there is"#else" between the #if MQX_USE_INLINE_MACROS&amp;nbsp; and #endif )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 20:03:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192964#M3899</guid>
      <dc:creator>eGuy</dc:creator>
      <dc:date>2009-06-23T20:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Where are they?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192965#M3900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear eguy&lt;/P&gt;&lt;P&gt;In your message, you wirted No matter MQX_USE_INLINE_MACROS=0 or 1, _QUEUE_INIT is always defined and compiled. if MQX_USE_INLINE_MACROS=1 Line 776 is compiled (mqx_prv.h), otherwise Line 784 is compiled.According your writed, The macro between &lt;SPAN&gt;#if&lt;/SPAN&gt; &lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;MQX_USE_INLINE_MACROS and #endif, the code compile only &lt;SPAN&gt;#define&lt;/SPAN&gt; &lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;_QUEUE_INIT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;queue&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;_queue_init&lt;/SPAN&gt;&lt;SPAN&gt;((&lt;/SPAN&gt;&lt;SPAN&gt;QUEUE_STRUCT_PTR&lt;/SPAN&gt;&lt;SPAN&gt;)(&lt;/SPAN&gt;&lt;SPAN&gt;queue&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt; &lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;But in &lt;SPAN&gt;_queue_init&lt;/SPAN&gt;&lt;SPAN&gt;((&lt;/SPAN&gt;&lt;SPAN&gt;QUEUE_STRUCT_PTR&lt;/SPAN&gt;&lt;SPAN&gt;)(&lt;/SPAN&gt;&lt;SPAN&gt;queue&lt;/SPAN&gt;&lt;SPAN&gt;), there is a same macro &lt;SPAN&gt;_QUEUE_INIT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;queue&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;) that called in qu_init.c in a function named &lt;SPAN&gt;_queue_init().&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;Can you understand what i writed? They are called by itself. Please note that the compiler only compile&amp;nbsp; code after #else.&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;Could you explain how to compile?&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;At second, About variable PSP_MEM_STOREBLOCK_ALIGNMENT, You writed that If PSP_MEM_STOREBLOCK_ALIGNMENT is not defined,PSP_CFG_MEM_STOREBLOCK_ALIGNMENT&amp;nbsp; is default to 0, otherwise it is set to whatever value PSP_CFG_MEM_STOREBLOCK_ALIGNMENT is defined.According your mean, The variables should initialize zero?How to initialize? They are very different.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by fish_yu on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-06-23&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;07:43 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 01:32:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192965#M3900</guid>
      <dc:creator>fish_yu</dc:creator>
      <dc:date>2009-06-24T01:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Where are they?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192966#M3901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fish_yu,&amp;nbsp;&lt;/P&gt;&lt;P&gt;eGuy (Jeff) provided a good explanation. Simply re-read the original code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In qu_init.c, line 40:&lt;/P&gt;&lt;P&gt;#define MQX_FORCE_USE_INLINE_MACROS 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In mqx_cnfg.h&lt;/P&gt;&lt;P&gt;#ifdef MQX_FORCE_USE_INLINE_MACROS&lt;BR /&gt;#undef&amp;nbsp; MQX_USE_INLINE_MACROS&lt;BR /&gt;#define MQX_USE_INLINE_MACROS&amp;nbsp; MQX_FORCE_USE_INLINE_MACROS&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;So regardless of how you set MQX_USE_INLINE_MACROS, qu_init.c will use inline macros (which is the intent).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 02:01:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192966#M3901</guid>
      <dc:creator>EAI</dc:creator>
      <dc:date>2009-06-24T02:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Where are they?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192967#M3902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank really you for yout help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I finally understand that code how to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the code Why design in this way? It is very complicated.Why not design a simple code for the RTOS ？&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 02:52:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192967#M3902</guid>
      <dc:creator>fish_yu</dc:creator>
      <dc:date>2009-06-24T02:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Where are they?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192968#M3903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kernel data is initialized to ZERO in mqx.c ( V3.1 line128)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; /* Initialize the kernel data to zero. */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; _mem_zero((pointer)kernel_data, (_mem_size)sizeof(KERNEL_DATA_STRUCT));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This causes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; kernel_data-&amp;gt;PSP_CFG_MEM_STOREBLOCK_ALIGNMENT initial value is ZERO&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by eGuy on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-06-23&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;04:26 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 03:25:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192968#M3903</guid>
      <dc:creator>eGuy</dc:creator>
      <dc:date>2009-06-24T03:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Where are they?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192969#M3904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thank you for your help, Thanl you very much.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 10:54:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Where-are-they/m-p/192969#M3904</guid>
      <dc:creator>fish_yu</dc:creator>
      <dc:date>2009-06-24T10:54:46Z</dc:date>
    </item>
  </channel>
</rss>

