while i am adding debug .h and .c file in my UART project and getting below error .
Build error: The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.
i want to use DBG_PRINTF(" "); function for that i had include debug.h and debug.c now it showing me (Build error: undefined reference to `DBG_PRINTF') error .
The real error message comes earlier, what you are seeing is just the statement "there was an error". Please look for the real error message and look at what it says (but probably it just tells you that DBG_PRINTF is never declared anywhere).