I'm trying to enable WPP tracing, while the requirement is to be backward compatible to existing trace format.
I have the next print macro that should work with WPP
#define MAC_ADDRESS_PRINTF_FORMAT "%02x:%02x:%02x:%02x:%02x:%02x"
#define MAC_ADDRESS_PRINTF(addr) \
Print(MODULE_A, TRACE_ERROR, "RX PeerMacAddr=" MAC_ADDRESS_PRINTF_FORMAT, MAC_ADDRESS_PRINTF(peer_address));
For printing the same log with WPP infrastructure I used the WPP DEFINE_CPLX_TYPE and defined MAC_ADDRESS_PRINTF_FORMAT MAC_ADDRESS_PRINTF.
// begin_wpp config
// DEFINE_CPLX_TYPE(MACADDRESS, WPP_LOGMACADDRESSDUMP, const unsigned char*, ItemMacAddr, "s", _MAC_ADDR_, 0, 1);
// WPP_FLAGS(-DWPP_LOGMACADDRESSDUMP(addr) WPP_LOGPAIR(6, (addr)) );
#define MAC_ADDRESS_PRINTF_FORMAT "%!MACADDRESS!"
#define MAC_ADDRESS_PRINTF(_addr) _addr
Unfortunately I'm getting following error wpp: (parseLegacy) 0 argument(s) expected, argument(s) supplied: 1
It seems like WPP preprocessor is not taking into account my define for MAC_ADDRESS_PRINTF_FORMAT.
While replacing MAC_ADDRESS_PRINTF_FORMAT with "%!MACADDRESS! it is working fine.
Any suggestion on how something like this could be achieved would be