AnsweredAssumed Answered

problem with MQX_KERNEL_LOGGING option disabled in MQX 4.1

Question asked by Hugo Bouchard on Oct 23, 2015
Latest reply on Dec 3, 2015 by Hugo Bouchard



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?