Iam working on s32k144 board using s32 design studio for ARM version 2018.R1. I was trying to use the function strftime defined in time.c file for getting the current time and date. But while using strftime in project, Iam getting an error message saying undefined reference to 'strftime'.When I checked the include path, Iam able to see the path for the file already included.I have attached the code which Iam trying.So kindly help me with this issue.
I have tried this using the example lpuart_echo_s32k144 from the SDK (if you don't have the SDK please check the following link), adding the following code I didn't have problems with the route:
time_t rawtime; struct tm *info; char buffer; time( &rawtime ); info = localtime( &rawtime ); strftime(buffer,80,"%x - %I:%M%p", info); LPUART_DRV_SendDataBlocking(INST_LPUART1, (uint8_t *)buffer, 80, TIMEOUT);
I think this could be related to the project settings. Be sure that you're enabling the libraries (newlib/redlib).
For reference, I'm using S32 Design Studio for ARM (Version: 2.2)
I hope this helps you.