<?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: File Inclusion: Multiple files with the same name and function in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/File-Inclusion-Multiple-files-with-the-same-name-and-function/m-p/2157568#M13706</link>
    <description>&lt;P&gt;Hello Karmegan,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can imagine you create a separate build configuration per each timing interval.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stanish_0-1756126047525.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/353936i4E18222E367B4A16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stanish_0-1756126047525.png" alt="stanish_0-1756126047525.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The output executable&amp;nbsp; (.elf) would only consist from 1ms methods and 1ms lib. Similarly to other timing configurations&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In order to avoid &lt;STRONG&gt;multiple definition errors&amp;nbsp;&lt;/STRONG&gt;you can exclude all others .c files and libraries from the build configuration. See below the Build Configuration Explorer you can use to select source to be used by the specific build configuration. Excluded sources are crossed and grayed in the project manager View.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stanish_2-1756126624776.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/353938i102A07C4309BE3A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stanish_2-1756126624776.png" alt="stanish_2-1756126624776.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stanish_1-1756126462121.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/353937i7518764403939B81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stanish_1-1756126462121.png" alt="stanish_1-1756126462121.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If it does not meet your need please specify your goal more in the details.&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Aug 2025 13:00:18 GMT</pubDate>
    <dc:creator>stanish</dc:creator>
    <dc:date>2025-08-25T13:00:18Z</dc:date>
    <item>
      <title>File Inclusion: Multiple files with the same name and function</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/File-Inclusion-Multiple-files-with-the-same-name-and-function/m-p/2157414#M13704</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have MATLAB-generated .c and .h files included in my S32DS IDE application project.&lt;/P&gt;&lt;P&gt;In this project, I have separate application and library files for each timing interval: &lt;STRONG&gt;1 ms, 10 ms, 50 ms, and 100 ms&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Each of these timing-based libraries (e.g., 1 ms, 10 ms, etc.) contains files like rte.c/.h and rtd_init.c/.h. These files include a function with the same signature, for example:&lt;/P&gt;&lt;P&gt;void get(uint8_t a);&lt;/P&gt;&lt;P&gt;So, in:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;1 ms: rte.c/.h and rtd_init.c/.h → contains void get(uint8_t a);&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;10 ms: rte.c/.h and rtd_init.c/.h → also contains void get(uint8_t a);&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;50 ms: same structure and function&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;100 ms: same structure and function&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The problem is, while building the project, I get &lt;STRONG&gt;multiple definition errors&lt;/STRONG&gt;, since the same function (get) with the same name exists in multiple libraries.&lt;/P&gt;&lt;P&gt;What I want is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;If I’m calling a 1 ms function, it should use only the 1 ms version of rte.c/.h and rtd_init.c/.h&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;If calling a 10 ms function, it should use only the 10 ms version of those files&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;But right now, I cannot include them conditionally like this.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there any configuration setting, build setup, or recommended method in S32DS to manage this kind of situation where multiple libraries contain same-named files and functions?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;thanks and Regards,&lt;/P&gt;&lt;P&gt;Karmegan C.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Aug 2025 08:06:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/File-Inclusion-Multiple-files-with-the-same-name-and-function/m-p/2157414#M13704</guid>
      <dc:creator>karmegancjk</dc:creator>
      <dc:date>2025-08-25T08:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: File Inclusion: Multiple files with the same name and function</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/File-Inclusion-Multiple-files-with-the-same-name-and-function/m-p/2157568#M13706</link>
      <description>&lt;P&gt;Hello Karmegan,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can imagine you create a separate build configuration per each timing interval.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stanish_0-1756126047525.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/353936i4E18222E367B4A16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stanish_0-1756126047525.png" alt="stanish_0-1756126047525.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The output executable&amp;nbsp; (.elf) would only consist from 1ms methods and 1ms lib. Similarly to other timing configurations&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In order to avoid &lt;STRONG&gt;multiple definition errors&amp;nbsp;&lt;/STRONG&gt;you can exclude all others .c files and libraries from the build configuration. See below the Build Configuration Explorer you can use to select source to be used by the specific build configuration. Excluded sources are crossed and grayed in the project manager View.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stanish_2-1756126624776.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/353938i102A07C4309BE3A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stanish_2-1756126624776.png" alt="stanish_2-1756126624776.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stanish_1-1756126462121.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/353937i7518764403939B81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stanish_1-1756126462121.png" alt="stanish_1-1756126462121.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If it does not meet your need please specify your goal more in the details.&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Aug 2025 13:00:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/File-Inclusion-Multiple-files-with-the-same-name-and-function/m-p/2157568#M13706</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2025-08-25T13:00:18Z</dc:date>
    </item>
  </channel>
</rss>

