Since I deleted UART module in Codewarrior, I get this error

Hi all,

Today, I wanted to delete the UART of my project to use the pins 3 and 4 (SMT module) as gpios. Unfortunately, after I started the project’s building, I got this message :

Symbol TERMIO_PutChar in file C:/Freescale/CWMCUv10.2/MCU/lib/hc08c/lib\ansifs.lib is undefined C/C++ Problem…

I tried to Clean all and rebuild all but this error is always comming. If I just change the parameter from “enable serial console == true” to “(…) false”, this error comes also.

Have someone an idea how to solve it?

Thanks a lot for your help!


In addition :

I think it is a printf scanf issue.

In , there is a dummy definition of printf and scanf, working if some macro has not been settled - to avoid warnings when compiling without real output for these functions. But in wpan_aps.c, there is a call to the “original” function in instead of in system.h. I think the “dummy define” of scanf/printf is not updated in this file when I remove the UART module in the config.xml file.

Is that right? But anyway, knows someone how to solve this problem?


Thank you to me!
I found the solution and I write it here. Perhaps is someone happy to find this answere :

I think that TERMIO_PutChar is defined as “external” in the stdio library, so that one can port this library to its architecture.

I removed the UART module, but it seems that the automatic generated code from the xbee plugin doesn’t yet add an empty definition of the function TERMIO_PutChar somewhere.

Then, I just added a “void TERMIO_PutChar(char c){}” line in the main.c and everything works fine now. This is just sad, it doesn’t look nice.



1 Like

Thank you for writing this. I ended up in the same predicament and couldn’t wrap my head around it. Seems to have worked for me as well. It’s definitely after allowing the plug-in to do it’s automated magic on the code whenever the XML file changes. That’s what seemed to break mine as well, despite fixing the code and it compiling fine.