problem with MQX_KERNEL_LOGGING option disabled in MQX 4.1

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

problem with MQX_KERNEL_LOGGING option disabled in MQX 4.1

跳至解决方案
1,079 次查看
hbouch
Contributor III

Hi,

I want to deactivate kernel logging because I don't need it, to decrease the size of MQX in my application and to reduce CPU use by MQX. The problem is that when I disable this option ("#define MQX_KERNEL_LOGGING   0" in mqx_cnfg.h file), the PSP doesn't compile anymore. I get the following problem:

-> Undefined identifier 'kernel_data' in lwevent.c

In file mqx_prv.h, macros _KLOG and _KLOGM are defined as follow if MQX_KERNEL_LOGGING is set to 0:

#define _KLOGM(x)

#define _KLOG(x)

The problem is that when kernel_data is defined as in file lwevent.c (  _KLOGM(KERNEL_DATA_STRUCT_PTR kernel_data);  ), preprocessor will remove this statement and compiler will say that kernel_data is undefined. I solved this problem by modifying the previous lines as follow:

#define _KLOGM(x) x

#define _KLOG(x)

Does anyone see a counter indication to this modification?

Thanks

Hugo

0 项奖励
回复
1 解答
873 次查看
hbouch
Contributor III

Hi Daniel,

Thanks for the answer. I haven't tested with CodeWarrior 10.6 because it might compile properly without giving me the compiler error but I wouldn't be able to have the menu File->New->MQX 4.1 Project anymore which is only compatible with 10.5.

I can't migrate to 4.2 as we are using a Power PC microcontroller. Power PC are no more supported in MQX 4.2

Regards,

Hugo

在原帖中查看解决方案

0 项奖励
回复
4 回复数
873 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Hugo:

I think this issue maybe related to the compile tools. Which IDE and the exact version you are using?

Regards

Daniel

0 项奖励
回复
873 次查看
hbouch
Contributor III

Hi Daniel,

We are using CW 10.5 Build Id:130916 with the compiler provided with it.

Regards,

Hugo

0 项奖励
回复
873 次查看
danielchen
NXP TechSupport
NXP TechSupport

HI Hugo:

According to MQX 4.1 release notes, the development tools requirements is Codewarrior 10.6. I tested this case with MQX4.1.1 + CW10.6 +FRDMk64, #define MQX_KERNEL_LOGGING   0" in mqx_cnfg.h, not found this issue.

Regards

Daniel

0 项奖励
回复
874 次查看
hbouch
Contributor III

Hi Daniel,

Thanks for the answer. I haven't tested with CodeWarrior 10.6 because it might compile properly without giving me the compiler error but I wouldn't be able to have the menu File->New->MQX 4.1 Project anymore which is only compatible with 10.5.

I can't migrate to 4.2 as we are using a Power PC microcontroller. Power PC are no more supported in MQX 4.2

Regards,

Hugo

0 项奖励
回复