<?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>S12 / MagniV MicrocontrollersのトピックProblem with use of structure</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-use-of-structure/m-p/2108783#M20501</link>
    <description>&lt;P&gt;I am developping a software for HCS12 microcontroller used in a CAN controller. I am only developping the application code as the low-level part is already developed by the controller manufacturer. To keep my code base clean, I defined some source files/header files in a folder.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not able to include stdint and I included PE_Types instead to access definition of uint32_t and uint8_t. My problem is that I am defining a structure in my new header file like this :&amp;nbsp;&lt;/P&gt;&lt;P&gt;typedef struct{&lt;BR /&gt;uint32_t u32_1;&lt;BR /&gt;uint8_t u8_1;&lt;BR /&gt;uint8_t u8_2;&lt;BR /&gt;uint8_t au8_array[8];&lt;BR /&gt;} myStruct;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In my main file, I included this header file. I have one functoin where I want to create a variable from the myStruct structure. I used : myStruct structA; just at the beginning of my function definition. It triggers an error " ERROR C1518: myStruct not declared (or typename)" when I compile. Then in the function, I have an if loop. If I define my structure variable inside the if loop, it compiles well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any hints to help me debug this issue ?&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jun 2025 16:33:21 GMT</pubDate>
    <dc:creator>Ivan_T</dc:creator>
    <dc:date>2025-06-02T16:33:21Z</dc:date>
    <item>
      <title>Problem with use of structure</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-use-of-structure/m-p/2108783#M20501</link>
      <description>&lt;P&gt;I am developping a software for HCS12 microcontroller used in a CAN controller. I am only developping the application code as the low-level part is already developed by the controller manufacturer. To keep my code base clean, I defined some source files/header files in a folder.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not able to include stdint and I included PE_Types instead to access definition of uint32_t and uint8_t. My problem is that I am defining a structure in my new header file like this :&amp;nbsp;&lt;/P&gt;&lt;P&gt;typedef struct{&lt;BR /&gt;uint32_t u32_1;&lt;BR /&gt;uint8_t u8_1;&lt;BR /&gt;uint8_t u8_2;&lt;BR /&gt;uint8_t au8_array[8];&lt;BR /&gt;} myStruct;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In my main file, I included this header file. I have one functoin where I want to create a variable from the myStruct structure. I used : myStruct structA; just at the beginning of my function definition. It triggers an error " ERROR C1518: myStruct not declared (or typename)" when I compile. Then in the function, I have an if loop. If I define my structure variable inside the if loop, it compiles well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any hints to help me debug this issue ?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 16:33:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-use-of-structure/m-p/2108783#M20501</guid>
      <dc:creator>Ivan_T</dc:creator>
      <dc:date>2025-06-02T16:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with use of structure</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-use-of-structure/m-p/2109414#M20502</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;it is necessary to know the version of the CW. Is it standard v 5.1, 5.2 (and operating system) or eclipse?&lt;/P&gt;
&lt;P&gt;Also, always enter the device number you use.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Ladislav&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jun 2025 09:56:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-use-of-structure/m-p/2109414#M20502</guid>
      <dc:creator>lama</dc:creator>
      <dc:date>2025-06-03T09:56:26Z</dc:date>
    </item>
  </channel>
</rss>

