Home/Support/Support Forum/Since I deleted UART module in Codewarrior, I get this error

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

0 votes
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!

asked Mar 28, 2017 in XBee Programmable Development by herrmattoon New to the Community (12 points)
retagged Mar 28, 2017 by herrmattoon

Please log in or register to answer this question.

2 Answers

+1 vote
Best answer
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.


answered Mar 31, 2017 by herrmattoon New to the Community (12 points)
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.
0 votes
In addition :

I think it is a printf scanf issue.

In <system.h>, 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 <stdio.h> 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?

answered Mar 28, 2017 by herrmattoon New to the Community (12 points)