To make changes to the project build settings, perform these steps:
Add ConsoleIO.c, ConsoleIO.h, UART0_PDD .h, PDD_Types.h files to the project in the respective folders as shown in the image below. ConsoleIO.c contains the UART Console routines __read_console, __write_console, __close_console, InitClock and ConsoleIO_Init.
Location of the files: <CWInstallDir>\MCU\ARM_GCC_Support\UART\TWR-KL25Z128 (or your respective board).

#include "derivative.h" /* include peripheral declarations */
#include "ConsoleIO.h"
int main(void)
{
int counter = 0;
ConsoleIO_Init();
puts("Hello World in 'C'!");
for(;;) {
counter++;
}
return 0;
}