<?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: How to change static .lib file according to Preprocessor Flag with C code before compiling code in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/How-to-change-static-lib-file-according-to-Preprocessor-Flag/m-p/2098363#M34311</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201543"&gt;@burhanhagi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sorry for the delayed response.&amp;nbsp; I do not have examples or guidelines to help you.&lt;/P&gt;
&lt;P&gt;With our eclipse based IDEs you where already doing the &lt;A href="https://mcuoneclipse.com/2013/02/12/creating-and-using-libraries-with-arm-gcc-and-eclipse/" target="_self"&gt;typical process&amp;nbsp;&lt;/A&gt;&amp;nbsp;. In this &lt;A href="https://community.arm.com/support-forums/f/compilers-and-libraries-forum/47561/how-to-create-and-link-a-static-library-for-an-arm-project-using-arm-none-eabi-gcc-or-get-the-knoledge-to-do-it" target="_self"&gt;ARM community post&lt;/A&gt; there are some guidelines, for what I think is to invoke using&amp;nbsp;arm-none-eabi-gcc commands to create and convert .a files and then linking them. As the user who replied the complicated thing is to create the LD files to link the .a files . So with the IDE if you want to use macros to select which .a you want to use, I believe you will have to manually edit the ld files, and disable MCUxpresso's managed linker script option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diego&lt;/P&gt;</description>
    <pubDate>Thu, 15 May 2025 19:09:08 GMT</pubDate>
    <dc:creator>diego_charles</dc:creator>
    <dc:date>2025-05-15T19:09:08Z</dc:date>
    <item>
      <title>How to change static .lib file according to Preprocessor Flag with C code before compiling code</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/How-to-change-static-lib-file-according-to-Preprocessor-Flag/m-p/2092289#M34240</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am working on a LCD Display Project with Embedded Wizard.&amp;nbsp; I may use Display setting as one of the the rotations 0, 90, 180 or 270 degree.&lt;/P&gt;&lt;P&gt;Embedded wizard gives us 4 different libewgfx-m7-RotationDegree-gcc.a files in folder as in below SS.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="burhanhagi_0-1746542369633.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/336378i64D87D8E18852A87/image-size/medium?v=v2&amp;amp;px=400" role="button" title="burhanhagi_0-1746542369633.png" alt="burhanhagi_0-1746542369633.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to my needs, I am using one of the above libewgfx-m7-gcc.a files only. To use it; I decide and later include which lib file I am using within MCUXPresso IDE as follows;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="burhanhagi_1-1746542682942.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/336380i1666BA8F016AAC24/image-size/medium?v=v2&amp;amp;px=400" role="button" title="burhanhagi_1-1746542682942.png" alt="burhanhagi_1-1746542682942.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So, if I want to useDisplay as 90 degree Screen Orientation, I open above window under Properties by manually and&amp;nbsp; I just move&amp;nbsp;libewgfx-m7-r90-gcc.a lib to the uppermost of the list. After applying this change and closing the window, I am building the the project.&lt;/P&gt;&lt;P&gt;Now I want to link any of these 4 files to a Preprocessor Defined Symbol within code. According to the&amp;nbsp;Preprocessor Symbol status, I will include one of out of 4 libs to my C code like conditional #if #else #endif statement. Later than I will compile the whole project. So I do not want to manually move lib up or down from "Properties Window" each time.&lt;/P&gt;&lt;P&gt;I do not know it may be easier but I could not find it how I will do that in MCUXPresso. Thanks a lot in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 14:57:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/How-to-change-static-lib-file-according-to-Preprocessor-Flag/m-p/2092289#M34240</guid>
      <dc:creator>burhanhagi</dc:creator>
      <dc:date>2025-05-06T14:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to change static .lib file according to Preprocessor Flag with C code before compiling code</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/How-to-change-static-lib-file-according-to-Preprocessor-Flag/m-p/2098363#M34311</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201543"&gt;@burhanhagi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sorry for the delayed response.&amp;nbsp; I do not have examples or guidelines to help you.&lt;/P&gt;
&lt;P&gt;With our eclipse based IDEs you where already doing the &lt;A href="https://mcuoneclipse.com/2013/02/12/creating-and-using-libraries-with-arm-gcc-and-eclipse/" target="_self"&gt;typical process&amp;nbsp;&lt;/A&gt;&amp;nbsp;. In this &lt;A href="https://community.arm.com/support-forums/f/compilers-and-libraries-forum/47561/how-to-create-and-link-a-static-library-for-an-arm-project-using-arm-none-eabi-gcc-or-get-the-knoledge-to-do-it" target="_self"&gt;ARM community post&lt;/A&gt; there are some guidelines, for what I think is to invoke using&amp;nbsp;arm-none-eabi-gcc commands to create and convert .a files and then linking them. As the user who replied the complicated thing is to create the LD files to link the .a files . So with the IDE if you want to use macros to select which .a you want to use, I believe you will have to manually edit the ld files, and disable MCUxpresso's managed linker script option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2025 19:09:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/How-to-change-static-lib-file-according-to-Preprocessor-Flag/m-p/2098363#M34311</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2025-05-15T19:09:08Z</dc:date>
    </item>
  </channel>
</rss>

