Disabling the UART in the board file only disables the pin defines, it doesn't exclude the UART functions and causes error.