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.
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 :
typedef struct{
uint32_t u32_1;
uint8_t u8_1;
uint8_t u8_2;
uint8_t au8_array[8];
} myStruct;
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.
Do you have any hints to help me debug this issue ?
Hi,
it is necessary to know the version of the CW. Is it standard v 5.1, 5.2 (and operating system) or eclipse?
Also, always enter the device number you use.
Best regards,
Ladislav