This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28379D: Incompatible declarations of TRUE/FALSE; true/false

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software:

In C2000Ware_5_02_00_00/libraries/flash_api/f2837xd/include/Types.h, there is a conditional declaration of false and true:

#if FALSE != 0
#define false FALSE
#endif
#if TRUE != 1
#define true TRUE
#endif
 

In C2000Ware_5_02_00_00/driverlib/f2837xd/driverlib/inc/hw_types.h TRUE and FALSE are defined as follows:

/* To fix Misra-C errors */
#ifndef TRUE
#define TRUE  ((bool) 1)
#endif
#ifndef FALSE
#define FALSE ((bool) 0)
#endif

Which leads then to following compiler errors, when expanding the code above:

"/Applications/ti/c2000/C2000Ware_5_02_00_00/libraries/flash_api/f2837xd/include/Types.h", line 129: error #18: expected a ")"
"/Applications/ti/c2000/C2000Ware_5_02_00_00/libraries/flash_api/f2837xd/include/Types.h", line 132: error #18: expected a ")"

This is reproducible with following source file:

#include <driverlib.h>
#include <Types.h>

Compiled with:

cl2000 --compile_only --c_file=flash_driver.c -DHAS_DRIVER_LIB -D_FLASH -D_LAUNCHXL_F28379D --include_path=/Applications/ti/c2000/C2000Ware_5_02_00_00/libraries/flash_api/f2837xd/include --include_path=/Applications/ti/c2000/C2000Ware_5_02_00_00/device_support/f2837xd/common/include --include_path=/Applications/ti/c2000/C2000Ware_5_02_00_00/device_support/f2837xd/headers/include --include_path=/Applications/ti/c2000/C2000Ware_5_02_00_00/driverlib/f2837xd/driverlib --include_path=/Applications/ti/ti-cgt-c2000_22.6.0.LTS/include --silicon_version=28 --large_memory_model --unified_memory --cla_support=cla1 --float_support=fpu32 --fp_mode=relaxed --tmu_support=tmu0 --vcu_support=vcu2 --display_error_number --symdebug:dwarf --c99 --gen_func_subsections --gen_data_subsections=on --opt_level=4 -DNASSERT --output_file=flash_driver.c.obj

Are there any reasons to not include `driverlib.h` and `Types.h` in a single translation unit?