013月 2019

0

681

0

MTK功能机MMI,添加GNU特性

1. make\plutommi\mmi_app\mmi_app.mak尾部添加 CFLAGS += – -gnu

2.注释掉 \plutommi\Framework\DebugLevels\DebugLevelInc\DebugInitDef_Int.h

#if 0  //注释
#ifndef __GNUC__
#define MMI_TRACE_FUNC        TRACE_FUNC
#define MMI_TRACE_STATE       TRACE_STATE
#define MMI_TRACE_INFO        TRACE_INFO
#define MMI_TRACE_WARNING     TRACE_WARNING
#define MMI_TRACE_ERROR       TRACE_ERROR
#define MMI_TRACE_G1_FRM      TRACE_GROUP_1
#define MMI_TRACE_G2_GUI      TRACE_GROUP_2
#define MMI_TRACE_G3_BOOTUP   TRACE_GROUP_3
#define MMI_TRACE_G4_PHB      TRACE_GROUP_4
#define MMI_TRACE_G5_CM       TRACE_GROUP_5
#define MMI_TRACE_G6_SMS      TRACE_GROUP_6
#define MMI_TRACE_G7_MISC     TRACE_GROUP_7
#define MMI_TRACE_G8_MEDIA    TRACE_GROUP_8
#define MMI_TRACE_G9_EMAIL    TRACE_GROUP_9
#define MMI_TRACE_G10_RESERVED TRACE_GROUP_10
#define MAX_MMI_TRACE_LOG_TYPE (MMI_TRACE_G10_RESERVED+1)
#else /* __GNUC__ */ 
typedef enum
{
MMI_TRACE_FUNC = 0,
MMI_TRACE_STATE,
MMI_TRACE_INFO,
MMI_TRACE_WARNING,
MMI_TRACE_ERROR,

MMI_TRACE_G1_FRM,
MMI_TRACE_G2_GUI,
MMI_TRACE_G3_BOOTUP,
MMI_TRACE_G4_PHB,
MMI_TRACE_G5_CM,
MMI_TRACE_G6_SMS,
MMI_TRACE_G7_MISC,
MMI_TRACE_G8_MEDIA,
MMI_TRACE_G9_EMAIL,
MMI_TRACE_G10_RESERVED,
MAX_MMI_TRACE_LOG_TYPE
} mmi_log_type_enum;
#endif /* __GNUC__ */
#endif

 
插入新代码:

#define MMI_TRACE_FUNC TRACE_FUNC
#define MMI_TRACE_STATE TRACE_STATE
#define MMI_TRACE_INFO TRACE_INFO
#define MMI_TRACE_WARNING TRACE_WARNING
#define MMI_TRACE_ERROR TRACE_ERROR
#define MMI_TRACE_G1_FRM TRACE_GROUP_1
#define MMI_TRACE_G2_GUI TRACE_GROUP_2
#define MMI_TRACE_G3_BOOTUP TRACE_GROUP_3
#define MMI_TRACE_G4_PHB TRACE_GROUP_4
#define MMI_TRACE_G5_CM TRACE_GROUP_5
#define MMI_TRACE_G6_SMS TRACE_GROUP_6
#define MMI_TRACE_G7_MISC TRACE_GROUP_7
#define MMI_TRACE_G8_MEDIA TRACE_GROUP_8
#define MMI_TRACE_G9_EMAIL TRACE_GROUP_9
#define MMI_TRACE_G10_RESERVED TRACE_GROUP_10
#define MAX_MMI_TRACE_LOG_TYPE (MMI_TRACE_G10_RESERVED+1)

 
3.make new

 

PS: GNU支持特性的特性如下:

  • 可执行代码可以定义变量;
  • 结构体初始化时可指定成员;
  • 支持匿名union;
  •  ……

 

 


								

Comments (0)