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.

TMS320F2800157: #20 identifier "float32" is undefined 错误

Part Number: TMS320F2800157
Other Parts Discussed in Thread: C2000WARE

编译报错提示
#20 identifier "float32" is undefined 原位置:C:\ti\C2000Ware_DigitalPower_SDK_5_00_01_00\libraries\solar\mppt_pno.h C/C++ 问题

已知这一行定义在“C:\ti\C2000Ware_DigitalPower_SDK_5_00_01_00\c2000ware\device_support\f280015x\headers\include\f280015x_device.h”文件下:

//
// The following data types are included for compatibility with legacy code,
// they are not recommended for use in new software. Please use the C99
// types included above
//
#if (!defined(DSP28_DATA_TYPES) && !defined(F28_DATA_TYPES))
#define DSP28_DATA_TYPES
#define F28_DATA_TYPES

#ifdef __TMS320C28XX_CLA__
typedef short int16;
typedef long int32;
typedef unsigned char Uint8;
typedef unsigned short Uint16;
typedef unsigned long Uint32;
typedef float float32;
typedef long double float64;
typedef struct { Uint32 low32; Uint32 high32; } Uint64;
typedef struct { int32 low32; int32 high32; } int64;

也已将该文件添加入工程的include options中

但是编译“C:\ti\C2000Ware_DigitalPower_SDK_5_00_01_00\libraries\solar\mppt_pno.h”仍然会报错

  • 上面帖出来的这一部分代码是通过条件编译的形式参与到编译过程中的。请确认一下这一部分代码是否参与到编译过程。

    另外注释中也提到,这一部分代码的存在仅仅是为了保证与旧版本之间的兼容性。新版本的软件请使用上面include进来的C99 type。