PDA

View Full Version : Debug Windriver issue.....


programmr
12-18-2008, 07:41 AM
Hello, two problems i am having are 1) on the DS it says Battery: No Code and 2) when i try debugging the cRIO i get a nice screen of error messages "Unresolved Symbols on Download Module. On downloading module '/IterativeDemo/PPC603gnu/IterativeDemo/Debug/IterativeDemo.out' on target 'VxWorks6x_10.5.22.2-MPC5200', the module symbols could not be fully resolved. and then i get a nice list of unresolved symbols. What does this mean? Any help would be greatly appreciated.

Mike Soukup
12-18-2008, 11:28 AM
Funny you should ask this question, we had the same error pop up yesterday. When VxWorks loads a kernel module (ie your robot code) it makes sure that every function that is called by your code exists somewhere in the running kernel or the previously loaded modules. This check is not done when the code is built or linked.

Look at each symbol it is complaining about and ensure that you haven't made a typo and that the method is actually implemented in your code. Our problem yesterday was that the base class didn't have a method implemented.

programmr
12-18-2008, 12:28 PM
but i haven't edited the code at all. I just used the template, built it, and it built with no errors. Does this mean i have to actually write code for it to work, instead of just building and downloading the template?

Alan Anderson
12-18-2008, 12:37 PM
Hello, two problems i am having are 1) on the DS it says Battery: No Code and 2) when i try debugging the cRIO i get a nice screen of error messages...

Did you reimage the cRIO to support C++ debugging?

programmr
12-18-2008, 01:23 PM
yes i did, am i doing something wrong somewhere?

Dave Scheck
12-18-2008, 02:30 PM
To elaborate more on the problem that Mike referred to, we had something like this
class A
{
public:
virtual void func(void);
};

class B : public A
{
virtual void func(void);
};

void B::func(void)
{
}EDIT**Dave corrected me below. See his description along with my original text**

What template are you using? What are the symbols that it complains about? Maybe posting your source and headers may help us help you.

Dave Flowerday
12-18-2008, 03:34 PM
Since we never created a definition for A::func(), the operating system had problems creating the virtual function table and crashed the program.
That's not quite correct... since A::func() was not implemented, the vxWorks loader could not load our compiled program because it couldn't resolve all the symbols. The compiled .out file is basically a dynamically-linked library (DLL), and one of the jobs of the vxWorks loader is to resolve all the symbols in the .out file before it starts it. It couldn't do that so it presented an error message and gave up trying to load it. That left the Rio running fine but with no user program on it (DS says "No Code"). Nothing crashed.

BradAMiller
12-18-2008, 06:44 PM
On downloading module '/IterativeDemo/PPC603gnu/IterativeDemo/Debug/IterativeDemo.out' on target 'VxWorks6x_10.5.22.2-MPC5200', the module symbols could not be fully resolved. and then i get a nice list of unresolved symbols. What does this mean? Any help would be greatly appreciated.

Another place where you can get "nice" list if unresolved symbols is if the cRIO image version doesn't match the version of the library you are using. All the FPGA functions are in a namespace that is tied to the version of the FPGA image. When you see a giant list of ChipObject symbols undefined, it's because the program loader is looking for a newer (or older) version of those functions in the cRIO image.

If that's what you're seeing make sure that the cRIO is flashed with the same version of code as the library you're using for your C/C++ program. We are trying to keep the releases in sync so at any point in time, the two should match. And we'll say on the download page what is required for the C/C++ library.

wadehas
01-17-2009, 05:29 PM
In trying to build the simple robot example we are seeing this issue... Unresolved symbols for nFPGA things.

How can we verify that we have matching versions of the library and the firmware?

Thanks,

-Wade Hasbrouck