I want printf the date and time when compiling code. But I drag on this error:
SEGGER_RTT_printf("%s %s.\r\n", __DATE__,__TIME__);
compiler says:
It's strange.I use keil MDK-ARM.
I want printf the date and time when compiling code. But I drag on this error:
SEGGER_RTT_printf("%s %s.\r\n", __DATE__,__TIME__);
compiler says:
It's strange.I use keil MDK-ARM.
Hi,
The first argument of SEGGER_RTT_printf()
function should be the buffer index:
SEGGER_RTT_printf(unsigned BufferIndex, const char * sFormat, ...)
You can set this to zero:
SEGGER_RTT_printf(0, "%s %s.\r\n", __DATE__,__TIME__);
Best regards,
Jørgen
Thank you,Jorgen. My bad,actually I already use this format to print reset reason.
SEGGER_RTT_printf(0, "RESET_REAS:%2x\r\n",(uint16_t)NRF_POWER->RESETREAS);
Thank you,Jorgen. My bad,actually I already use this format to print reset reason.
SEGGER_RTT_printf(0, "RESET_REAS:%2x\r\n",(uint16_t)NRF_POWER->RESETREAS);