I created a new project (using CodeWarrior Development Studio 6.3) for the MCF51QE128.
This is the third project I've created and the only one that is giving me linker errors:
Link Error : Undefined : "InitializeUART"
Link Error : Undefined : "ReadUARTN"
Link Error : Undefined : "WriteUARTN"
I had assumed that these had to do with console I/O and checked exceptions.c and have NO_PRINTF as 1 and CONSOLE_IO_SUPPORT is 0. I've compared the "Standard Settings" in the project with my other two working projects and they are the same.
Any idea where I can look?
Thanks!
Brad
Look in the CodeWarrior forums.
The simplest way to try and get help with this is to type a keyword (like "WriteUARTN") into the "Search" box and select "Community" to search in all boards. I get 20 matches on this.
To investigate this yourself, does CW provide a "map" file" You're looking to find which component is calling those functions. You could also search all source files for calls to those functions if you wanted to.
Tom
Yeah, I did search. I couldn't find anything about turning it off -- lots of hits on turning it on with the CONSOLE_IO.
I'll take a look at the map file -- just checked -- no map file. There is an xMap file that just lists the three errors I'm getting.
Thanks!
Brad
Hello
In fact you need to provide an implementation of functions InitializeUART, ReadUARTNm, WriteUARTN that actually provide low level code to initialize the SCI, send a character and retrieves a character.
I did once implement these functions for MCF51QE128 in CodeWarrior for MCU V6.2 (See attachment).
I did not verify whether it is still working on V6.3, but it might be worth a try.
CrasyCat
That's odd -- I've never had to write them before -- but I'm not using, nor do I want the functionality (I don't care about printf, etc). For some reason, this project has something linking with it that requires these three functions.
Brad
So look at the MAP file and see what module it is.
Does your build system come with the equivalent of "nm" and "objdump"? I'd run them on all the object files to see which one references these. Then you'll have to find what module calls the functions in that module/library.
If something has a debug print or even a "sprintf" or maybe even floating point stuff it might be pulling in those functions.
Tom
There is no map file -- the link doesn't complete. In other project sprintf hasn't pulled them in. I've checked for any printf calls but there are none.
Brad
> There is no map file -- the link doesn't complete.
Time to check the object files. I assume it got far enough to build a bunch of object files somewhere.
You didn't answer my question "Does your build system come with the equivalent of "nm" and "objdump"?". Does it?
On development on a "real operating system" these are built in. Good development systems provide command line versions of these. Does yours? It might if you look.
These are very basic problems that every programmer has to know how to solve. If your development system doesn't have any useful tools, then the next option is to pipe the object files through "string" and "grep". As Windows doesn't have these, find some or, copy your files to a Linux system and do the search there.
Or simply open the object files one at a time in NOTEPAD and search for anything matching those function names.
Another really simple solution is to leave object files out until the problem goes away. The other way is to add some dummy functions so you CAN get a link and THEN look at the MAP file, or open the project in the debugger and go hunting in there.
Tom
Nope. "nm" and "objdump" don't exist. I was hoping it would be simple since I have all this code compiled under another project (I haven't started changing it yet) and it doesn't do this. I was just hoping it was a simple project option somewhere.
I've already grep'd the object code. No printf. If there were, the project I copied this code from wouldn't be working -- unless there is some difference in options.
Thanks,
Brad
Read the manual and see if any command-line tools are provided, and look for one that can dump object files. If that doesn't get you there, ask your TWO questions in one of the CodeWarrior Tools forums.
You want to ask both "how do I fix this problem?' and "what tools do I use to fix this now and similar ones in the future?".
Searching in those forums for "objdump" finds the following (which might get you an "objdump.exe" which may or may not be able to dump CW object files), but would take a lot of time when CW must provide this already..
https://community.freescale.com/message/75720#75720
Tom