Other Parts Discussed in Thread: SYSCONFIG, C2000WARE
Tool/software:
Hello TI Community,
While working with the TMS320F28P650DK library provided by Texas Instruments, I encountered the following compiler warning:
#303-D: typedef name has already been declared (with same type)
This warning appears when I need to include hw_types.h and (in my case) f28p65x_device.h. Although this doesn't stop the build, it does clutter the output and may confuse users who are trying to maintain clean builds.
After reviewing the code, I believe this warning could be avoided by wrapping the typedef in the f28p65x_device.h file with a conditional preprocessor directive to check if the type has already been defined by the same way of files like dsp.h or fastrts.h.
// c2000 types for IEEE754 (same as defined in <device>/inc/hw_types.h) #ifndef C2000_IEEE754_TYPES #define C2000_IEEE754_TYPES #ifdef __TI_EABI__ typedef float float32_t; typedef double float64_t; #else // TI COFF typedef float float32_t; typedef long double float64_t; #endif // __TI_EABI__ #endif // C2000_IEEE754_TYPES
Would it be possible for the TI team to consider integrating such a guard in future releases of the library? This small change could help improve compatibility and reduce unnecessary warnings across projects.
Or maybe I'm doing wrong inclusion, so let me know.
Thank you for your support and for providing such a robust set of tools and libraries.
All the best,
Alexandre