Tool/software: Code Composer Studio
Hello,
I am getting an error when compiling a CPP file.
I have drilled it down to this. This is a source file with no contents. The header file "ti/drv/emac/src/v4/emac_drv_v4.h" is generating an error on line 138
Here are the entire contents of my source file:
/* * TestFile.cpp * * Created on: Jul 24, 2017 * Author: me */ #include <ti/drv/emac/emac_drv.h> #include <ti/drv/emac/src/v4/emac_drv_v4.h>
When CCS 7.2 compiles this, using the GNU 4.9.3 compiler, it generates this error:
'Building file: ../TestFile.cpp'
'Invoking: GNU Compiler'
"C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -marm -mfloat-abi=hard
-Dam3359 -DSOC_AM335x -DBBB_AM335X -I"C:/Users/scott/workspace_v7/NIMU_BasicExample_bbbAM335x_armExampleproject"
-I"C:/ti/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include" -I"C:/ti/ndk_2_25_01_11/packages/ti/ndk/inc/bsd" -g -gdwarf-3
-gstrict-dwarf -Wall -c -MMD -MP -MMD -MP -MF"TestFile.d" -MT"TestFile.o" -o"TestFile.o" @"configPkg/compiler.opt"
"../TestFile.cpp"
subdir_rules.mk:16: recipe for target 'TestFile.o' failed
In file included from ../TestFile.cpp:12:0:
C:/ti/pdk_am335x_1_0_7/packages/ti/drv/emac/src/v4/emac_drv_v4.h:138:13: error: expected '}' at end of input
} EMAC_McbV4;
This exact location is the closing of a "typedef struct" I cannot see any reason the compiler would complain about it, in either C or C++.
Does anyone know why this header file will not compile in C++, but will compile in straight C?
Thanks.
-CSW