Please have a look at our reference example code:
Thanks, but the example you shared does not redirect printf in diab compiler,
but rather uses the UART directly.
my goal is ti use printf from libc
Have you finally figured out how to implement and use prinft on the MCP5448G? I have the same problem.