<?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 RTD generated code is invalid in S32K</title>
    <link>https://community.nxp.com/t5/S32K/RTD-generated-code-is-invalid/m-p/2178866#M53205</link>
    <description>&lt;P&gt;The details of my environment is as follows:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;S32 Design Studio for S32 Platform&lt;/P&gt;&lt;P&gt;Version: 3.6.2&lt;/P&gt;&lt;P&gt;Build id: 250529 (Update 2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RTD details is as per the screen shot:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="durga_choudhury_0-1759333044763.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/359208iBD70AC5637DB63C5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="durga_choudhury_0-1759333044763.png" alt="durga_choudhury_0-1759333044763.png" /&gt;&lt;/span&gt;&lt;P&gt;MCU: S32K148&lt;/P&gt;&lt;P&gt;The generated code is sometimes invalid (i.e. won't compile). A way to reproduce is as follows:&lt;/P&gt;&lt;P&gt;(this is a convoluted way, but still shows the problem without discussing the details of our internal project)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Open Spi_Transfer_S32K148 project&lt;/P&gt;&lt;P&gt;2. Delete 'Platform' MCAL driver&lt;/P&gt;&lt;P&gt;3. Update code&lt;/P&gt;&lt;P&gt;4. Add it back&lt;/P&gt;&lt;P&gt;5. Update code&lt;/P&gt;&lt;P&gt;Part of the generated Flexio_Spi_Ip_CfgDefines.h is as follows. Note the multiply defined macros that break the build.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;/*==================================================================================================&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;* DEFINES AND MACROS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;==================================================================================================*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/* Macros that indicate FLEXIO channels used by SPI */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#ifndef&lt;/SPAN&gt; &lt;SPAN&gt;FLEXIO_0_CH_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt; &lt;SPAN&gt;FLEXIO_0_CH_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#error&lt;/SPAN&gt; &lt;SPAN&gt;"CHANNEL_0 cannot be used by SPI driver to configure as TX and CLK channels. Channel locked by another driver!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#ifndef&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_CH_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_CH_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#error&lt;/SPAN&gt; &lt;SPAN&gt;"CHANNEL_0 cannot be used by SPI driver to configure as RX and CS channels. Channel locked by another driver!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/* Macros that indicate FLEXIO pins used by SPI */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#ifndef&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_PIN_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_PIN_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#error&lt;/SPAN&gt; &lt;SPAN&gt;"PIN_0 cannot be used by SPI driver to configure for TX channel. PIN locked by another driver!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#ifndef&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_PIN_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_PIN_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#error&lt;/SPAN&gt; &lt;SPAN&gt;"PIN_0 cannot be used by SPI driver to configure for RX channel. PIN locked by another driver!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#ifndef&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_PIN_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_PIN_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#error&lt;/SPAN&gt; &lt;SPAN&gt;"PIN_0 cannot be used by SPI driver to configure for CLK channel. PIN locked by another driver!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 01 Oct 2025 15:45:16 GMT</pubDate>
    <dc:creator>durga_choudhury</dc:creator>
    <dc:date>2025-10-01T15:45:16Z</dc:date>
    <item>
      <title>RTD generated code is invalid</title>
      <link>https://community.nxp.com/t5/S32K/RTD-generated-code-is-invalid/m-p/2178866#M53205</link>
      <description>&lt;P&gt;The details of my environment is as follows:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;S32 Design Studio for S32 Platform&lt;/P&gt;&lt;P&gt;Version: 3.6.2&lt;/P&gt;&lt;P&gt;Build id: 250529 (Update 2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RTD details is as per the screen shot:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="durga_choudhury_0-1759333044763.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/359208iBD70AC5637DB63C5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="durga_choudhury_0-1759333044763.png" alt="durga_choudhury_0-1759333044763.png" /&gt;&lt;/span&gt;&lt;P&gt;MCU: S32K148&lt;/P&gt;&lt;P&gt;The generated code is sometimes invalid (i.e. won't compile). A way to reproduce is as follows:&lt;/P&gt;&lt;P&gt;(this is a convoluted way, but still shows the problem without discussing the details of our internal project)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Open Spi_Transfer_S32K148 project&lt;/P&gt;&lt;P&gt;2. Delete 'Platform' MCAL driver&lt;/P&gt;&lt;P&gt;3. Update code&lt;/P&gt;&lt;P&gt;4. Add it back&lt;/P&gt;&lt;P&gt;5. Update code&lt;/P&gt;&lt;P&gt;Part of the generated Flexio_Spi_Ip_CfgDefines.h is as follows. Note the multiply defined macros that break the build.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;/*==================================================================================================&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;* DEFINES AND MACROS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;==================================================================================================*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/* Macros that indicate FLEXIO channels used by SPI */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#ifndef&lt;/SPAN&gt; &lt;SPAN&gt;FLEXIO_0_CH_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt; &lt;SPAN&gt;FLEXIO_0_CH_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#error&lt;/SPAN&gt; &lt;SPAN&gt;"CHANNEL_0 cannot be used by SPI driver to configure as TX and CLK channels. Channel locked by another driver!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#ifndef&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_CH_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_CH_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#error&lt;/SPAN&gt; &lt;SPAN&gt;"CHANNEL_0 cannot be used by SPI driver to configure as RX and CS channels. Channel locked by another driver!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/* Macros that indicate FLEXIO pins used by SPI */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#ifndef&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_PIN_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_PIN_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#error&lt;/SPAN&gt; &lt;SPAN&gt;"PIN_0 cannot be used by SPI driver to configure for TX channel. PIN locked by another driver!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#ifndef&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_PIN_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_PIN_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#error&lt;/SPAN&gt; &lt;SPAN&gt;"PIN_0 cannot be used by SPI driver to configure for RX channel. PIN locked by another driver!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#ifndef&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_PIN_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define&lt;/SPAN&gt;&lt;SPAN&gt; FLEXIO_0_PIN_0_USED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#error&lt;/SPAN&gt; &lt;SPAN&gt;"PIN_0 cannot be used by SPI driver to configure for CLK channel. PIN locked by another driver!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 01 Oct 2025 15:45:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/RTD-generated-code-is-invalid/m-p/2178866#M53205</guid>
      <dc:creator>durga_choudhury</dc:creator>
      <dc:date>2025-10-01T15:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: RTD generated code is invalid</title>
      <link>https://community.nxp.com/t5/S32K/RTD-generated-code-is-invalid/m-p/2178996#M53209</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/250000"&gt;@durga_choudhury&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have followed the steps you outlined, and I am afraid I was not able to reproduce the issue on my end.&lt;/P&gt;
&lt;P&gt;However, since the problem seems to be related to the files generated by ConfigTools, could you please try deleting the generated files for the project? Then, go to ConfigTools → Update Code to regenerate them.&lt;/P&gt;
&lt;P&gt;If the issue persists after that, please let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, VaneB&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 20:45:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/RTD-generated-code-is-invalid/m-p/2178996#M53209</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2025-10-01T20:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: RTD generated code is invalid</title>
      <link>https://community.nxp.com/t5/S32K/RTD-generated-code-is-invalid/m-p/2185909#M53542</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the code generator gets into this state, it does not recover on its own; i.e. manually deleting the duplicated lines and regenerating the code puts them back. Since you cannot reproduce the issue, I am going to close this thread; let's hope that it has been fixed in the 3.6.4 version of the IDE.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2025 15:46:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/RTD-generated-code-is-invalid/m-p/2185909#M53542</guid>
      <dc:creator>durga_choudhury</dc:creator>
      <dc:date>2025-10-14T15:46:02Z</dc:date>
    </item>
  </channel>
</rss>

