problem with MQX_KERNEL_LOGGING option disabled in MQX 4.1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

problem with MQX_KERNEL_LOGGING option disabled in MQX 4.1

Jump to solution
649 Views
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 Kudos
1 Solution
443 Views
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

View solution in original post

0 Kudos
4 Replies
443 Views
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 Kudos
443 Views
hbouch
Contributor III

Hi Daniel,

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

Regards,

Hugo

0 Kudos
443 Views
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 Kudos
444 Views
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 Kudos