<?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: S32K358 C++ project based on S32DS3.5 in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K358-C-project-based-on-S32DS3-5/m-p/2000812#M43607</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;We do not have C++ based project.&lt;/P&gt;
&lt;P&gt;But RTD is written is such way that it should be used with C++ code.&lt;/P&gt;
&lt;P&gt;You have to define it in macro __cplusplus.&lt;/P&gt;
&lt;P&gt;But I have never tied it.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Peter&lt;/P&gt;</description>
    <pubDate>Mon, 25 Nov 2024 07:46:50 GMT</pubDate>
    <dc:creator>petervlna</dc:creator>
    <dc:date>2024-11-25T07:46:50Z</dc:date>
    <item>
      <title>S32K358 C++ project based on S32DS3.5</title>
      <link>https://community.nxp.com/t5/S32K/S32K358-C-project-based-on-S32DS3-5/m-p/2000489#M43582</link>
      <description>&lt;P&gt;We use RTD50.0 and want to integrate C++ code into S32DS3.5. Do you have a C++project based on S32K3? Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Nov 2024 09:21:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K358-C-project-based-on-S32DS3-5/m-p/2000489#M43582</guid>
      <dc:creator>CherryDeng</dc:creator>
      <dc:date>2024-11-23T09:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: S32K358 C++ project based on S32DS3.5</title>
      <link>https://community.nxp.com/t5/S32K/S32K358-C-project-based-on-S32DS3-5/m-p/2000812#M43607</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;We do not have C++ based project.&lt;/P&gt;
&lt;P&gt;But RTD is written is such way that it should be used with C++ code.&lt;/P&gt;
&lt;P&gt;You have to define it in macro __cplusplus.&lt;/P&gt;
&lt;P&gt;But I have never tied it.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2024 07:46:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K358-C-project-based-on-S32DS3-5/m-p/2000812#M43607</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2024-11-25T07:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: S32K358 C++ project based on S32DS3.5</title>
      <link>https://community.nxp.com/t5/S32K/S32K358-C-project-based-on-S32DS3-5/m-p/2058809#M46635</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/13836"&gt;@petervlna&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/200759"&gt;@CherryDeng&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please see the attached for a simple cpp and S32K358 RTD3.0.0 example. (based on a single core)&lt;/P&gt;
&lt;P&gt;Note...in order to use the RTD with a c++ program, a few things need to be considered.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;1 - correct include paths in the project which include paths to the RTD&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;2 - modified linker file to include c++ requirements (i.e crt0.o and constructor definitiions)&lt;/LI&gt;
&lt;LI&gt;3 - modified startup to include both RTD and c++ requirements.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the attached S32K358 example, the steps to get it working were:&lt;/P&gt;
&lt;P&gt;1 - Start with an RTD example.&lt;/P&gt;
&lt;P&gt;2 - Convert RTD example to c++ by selecting &lt;STRONG&gt;File/New/Convert to a C/C++ Project&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;3 - Modify linker file to include c++ requirements. (refer to attached linker file)&lt;/P&gt;
&lt;P&gt;4 - Modify RTD startup_cm7.s by changing the Reset_Handler entry name to _start_RTD (needed to avoid redundant definitioin of _start from RTD and C++)&lt;/P&gt;
&lt;DIV id="tinyMceEditorpeter_pinewski_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peter_pinewski_2-1741615978444.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/327370iF543AF6027853E07/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peter_pinewski_2-1741615978444.png" alt="peter_pinewski_2-1741615978444.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;5. Change the &lt;STRONG&gt;bl main&lt;/STRONG&gt; to &lt;STRONG&gt;bl _start&lt;/STRONG&gt;&amp;nbsp;to jump to the c++ _start files.&amp;nbsp; (this is defined incrt0.o)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peter_pinewski_3-1741615987104.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/327371i6B544DD5F449F9DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peter_pinewski_3-1741615987104.png" alt="peter_pinewski_3-1741615987104.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The attached project is a very simple PIT interrupt example but may be a good place to start.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Peter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 14:23:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K358-C-project-based-on-S32DS3-5/m-p/2058809#M46635</guid>
      <dc:creator>peter_pinewski</dc:creator>
      <dc:date>2025-03-10T14:23:42Z</dc:date>
    </item>
  </channel>
</rss>

