I'm working on a project and encountered this strange error. At first I was able to get rid of it by rearranging placements in my main par block but with the expansion of my code this no longer works. The error looks something like below, sometimes the LLNK numbers vary.
xmap: Error: Symbol "<not-found>" for resolution of resource expression for ".LLNK15" is undefined.
xmap: Error: Symbol for resolution of resource expression for ".LLNK18" is undefined.
xmap: Error: Symbol for resolution of resource expression for ".LLNK20" is undefined.
xmap: Error: Symbol for resolution of resource expression for ".LLNK23" is undefined.
...The previous three lines continue with different LLNK.
My knowledge of compilers/linkers seems to be pretty limited in this regard. Anyone seen anything like this or have ideas on what might help?
Thanks,
-Monk
xmap error ".LLNK18" is undefined.
-
- Active Member
- Posts: 38
- Joined: Wed Jun 09, 2010 3:20 am
- Location: Maine, USA
-
- Experienced Member
- Posts: 69
- Joined: Mon May 17, 2010 10:19 am
The nature of the error message is a known bug in xmap.
Last time it happened was due to: a C function being called from XC where a coersion was required (i.e. passing an arrray, resource type etc), and that C function (or its callees) uses a pointer to a function. The solution was to us a "#pragma stackfunction X" on the culprit.
Does this sound likely?
Unfortunately the error is almost no help at all in tracking down the function in question.
Last time it happened was due to: a C function being called from XC where a coersion was required (i.e. passing an arrray, resource type etc), and that C function (or its callees) uses a pointer to a function. The solution was to us a "#pragma stackfunction X" on the culprit.
Does this sound likely?
Unfortunately the error is almost no help at all in tracking down the function in question.
-
- Active Member
- Posts: 38
- Joined: Wed Jun 09, 2010 3:20 am
- Location: Maine, USA
I appreciate your rapid response on this. I added #pragma stackfunction to all of my c functions that get called from xc and that seemed to solve the problem and I was able to compile fine after that.
Is this a bug that is likely to be fixed by the next release? If not is there any way to detect/predict that it may be the culprit and spit out some sort of warning for users that this might be the problem?
Is this a bug that is likely to be fixed by the next release? If not is there any way to detect/predict that it may be the culprit and spit out some sort of warning for users that this might be the problem?
-
- Experienced Member
- Posts: 69
- Joined: Mon May 17, 2010 10:19 am
Yes. It should be fixed in the next release of the tools. When it's fixed you'll get an error message of the form "Unable to determine stack size for function <foo>".
Prior to that tracking down the specific culprit is probably best tracked down by a binary search, removing and adding the pragmas as required.
For a more directed approach, the ultimate culprit is likely to be using functions pointers. If you pragma any C functions which call through function pointers you should be able to remove all the pragmas on the called-from-XC functions.
Prior to that tracking down the specific culprit is probably best tracked down by a binary search, removing and adding the pragmas as required.
For a more directed approach, the ultimate culprit is likely to be using functions pointers. If you pragma any C functions which call through function pointers you should be able to remove all the pragmas on the called-from-XC functions.