Hello,
I think that this is because you are using printf, scanf, stdin and/or stdout. This happens because functions like printf or scanf need the functions for using the SCI in the microcontroller; this functions are TERMIO_Init for initializing the serial port, the initialization sets a baud rate ;
TERMIO_PutChar for sending a char and TERMIO_GetChar for receiving a byte. This functions are located in a file named Termio.c ; In your project sources add the file Termio.c located under the installation directory in “..\{your CW insall}\lib\hc12c\src”
If you wish to use your own SCI routines with printf, scanf, stdin and/or stdout, you can copy the file named termio.c, and replace the code in each function with your own code, keeping only the names of the functions. Also you need to copy the file termio.h which is located in the lib directory, you can leave this file as it is.
this works on my side. can this also work for you?
=================================================
this answer is for you, if it helps, please click on "Correct Answer " button. thanks!
Best Regards,
Zhang Jun