Part Number: C2000WARE
Hello,
I am getting a build error when importing and building the following example project from C2000Ware v26.00.00.00:
{C2000Ware}\device_support\f28p65x\examples\cpu1\led\led_ex1_blinky
== Error Message ==
"C:/ti/C2000Ware_26_00_00_00/device_support/f28p65x/headers/include/f28p65x_device.h", line 73: error #20: identifier "uint16_t" is undefined
"C:/ti/C2000Ware_26_00_00_00/device_support/f28p65x/headers/include/f28p65x_device.h", line 73: error #839: illegal type for cregister 'IFR'
"C:/ti/C2000Ware_26_00_00_00/device_support/f28p65x/headers/include/f28p65x_device.h", line 74: error #20: identifier "uint16_t" is undefined
"C:/ti/C2000Ware_26_00_00_00/device_support/f28p65x/headers/include/f28p65x_device.h", line 74: error #839: illegal type for cregister 'IER'
== Root Cause (Suspected) ==
Comparing f28p65x_device.h between v26.00.00.00 and v5.05.xx, the declarations for IFR/IER were changed as follows:
Before (v5.05.xx): extern __cregister volatile unsigned int IFR;
After (v26.00.00): extern __cregister volatile uint16_t IFR;
It appears that uint16_t is used in f28p65x_device.h without a prior #include <stdint.h>, causing the compiler to fail to resolve the type.
The same project builds without errors under C2000Ware v5.xx and v6.xx.
== Workarounds I've Tried ==
1. Adding #include <stdint.h> directly above the IFR/IER declarations in f28p65x_device.h → Resolves the error.
2. Reverting uint16_t back to unsigned int → Also resolves the error.
3. Adding #include <stdint.h> at the top of main.c → Does NOT resolve the error (since the header itself is compiled before stdint.h is visible at the point of the cregister declaration).
== Question ==
Is there a recommended/official fix for this issue in C2000Ware v26.00.00.00?
Specifically, I would like to know:
- Is this a known bug in v26.00.00.00 that will be addressed in a patch?
- Is there a compiler flag or predefined include path that ensures stdint.h is resolved before device header files are processed?
- Is there any other "clean" solution that does not require modifying the C2000Ware header files directly?
Any guidance would be appreciated.
== Environment ==
- C2000Ware: v26.00.00.00
- Device: F28P650DK9
- IDE: CCS Theia 20.2.0.12__1.8.0
- Compiler: ti-cgt-c2000_22.6.2.LTS
Thank you.