Sometimes when I add a bit of code and build I get an error message during linking: *********************************************************** IAR Universal Linker V4.56E/386 Copyright 1987-2003 IAR Systems. All rights reserved. Internal Error: In function: unknown Diagnostic: unexpected exception P0: 1 P1: 0 *********************************************************** Compiler version is: IAR MSP430 C Compiler V2.21B/W32 It seems to be possibly related to constant char strings ("like this") but I am not sure. I can add or comment out code to get rid of the error. For instance I have the code in a state where with a section like: if(fDumpDebug) { DumpDebugString("Debugs enabled", 14); } generates the link error but if(fDumpDebug) { DumpDebugString("Debugs enabled", 14); DumpDebugString("Debugs enabled", 14); } does not. There is more to it than I have shown but this gives the idea. The code above would probably compile OK by itself - it seems to depend on how many other constant char strings there are. The above is just a very cut down example. I am generating debug information (both compile and link). Target is 'F147. I am no where near filling code space. Any ideas?
IAR "Tool Internal Error"
Started by ●June 30, 2004
Reply by ●June 30, 20042004-06-30
This may be related to odd/even addressing. Using "" around
strings adds
a 0 to the end of the string, whereas using ' ' around strings does
not. It may well be that the linker isn't correcting for these when they
are inlined with code. This is certaily a problem with assembler.
Al
joeblogss84 wrote:
> Sometimes when I add a bit of code and build I get
an error message
> during linking:
>
> ***********************************************************
> IAR Universal Linker V4.56E/386
> Copyright 1987-2003 IAR Systems. All rights reserved.
> Internal Error: In function: unknown
> Diagnostic: unexpected exception
> P0: 1 P1: 0
> ***********************************************************
>
>
> Compiler version is: IAR MSP430 C Compiler V2.21B/W32
>
> It seems to be possibly related to constant char strings ("like
this")
> but I am not sure. I can add or comment out code to get rid of the
> error. For instance I have the code in a state where with a section
> like:
>
> if(fDumpDebug)
> {
> DumpDebugString("Debugs enabled", 14);
> }
>
> generates the link error but
>
> if(fDumpDebug)
> {
> DumpDebugString("Debugs enabled", 14);
> DumpDebugString("Debugs enabled", 14);
> }
>
> does not.
>
> There is more to it than I have shown but this gives the idea. The
> code above would probably compile OK by itself - it seems to depend on
> how many other constant char strings there are. The above is just a
> very cut down example.
>
> I am generating debug information (both compile and link). Target is
> 'F147. I am no where near filling code space.
>
> Any ideas?
>
>
>
>
> .
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
Reply by ●July 2, 20042004-07-02
joeblogss84 wrote: > Sometimes when I add a bit of code and build I get an error message > during linking: > *********************************************************** > IAR Universal Linker V4.56E/386 > Copyright 1987-2003 IAR Systems. All rights reserved. > Internal Error: In function: unknown > Diagnostic: unexpected exception > P0: 1 P1: 0 > *********************************************************** > Compiler version is: IAR MSP430 C Compiler V2.21B/W32 > [...] > Any ideas? Unfortunately this seems to be a tricky, non-reproducable bug in IAR's compiler and/or linker. I also encountered this message quite frequently, once the programm had reached a certain degree of compexity. But from my point of view, the occurence of this bug has nothing to do with a certain code you write. The behaviour is rather chaotic. Once you got this message, any smallest change makes it disappear, even if this change does not change the assembly code at all. I had situations where changing "int a, b;" to "int b, a;" solved the problem. From my experience it should be no problem to just ignore this bug and do some minor cosmetic changes to your code as a workaround. Regards Dirk
Reply by ●July 5, 20042004-07-05
IAR's response 22.3.2004: "This should not occure, please try to use the new version of our Linker, http://www.iar.com/Support/?note492 " > *********************************************************** > IAR Universal Linker V4.56E/386 > Copyright 1987-2003 IAR Systems. All rights reserved. > Internal Error: In function: unknown > Diagnostic: unexpected exception > P0: 1 P1: 0 > ***********************************************************
Reply by ●July 5, 20042004-07-05
Maybe it sounds strange, I had this problem also, but only if I had
started (by mistake) the Embedded Workbench twice.
Stefan
--- In msp430@msp4..., "joeblogss84" <i.wilson@c...> wrote:
> Sometimes when I add a bit of code and build I get
an error message
> during linking:
>
> ***********************************************************
> IAR Universal Linker V4.56E/386
> Copyright 1987-2003 IAR Systems. All rights reserved.
> Internal Error: In function: unknown
> Diagnostic: unexpected exception
> P0: 1 P1: 0
> ***********************************************************
>
>
> Compiler version is: IAR MSP430 C Compiler V2.21B/W32
>
> It seems to be possibly related to constant char strings ("like
this")
> but I am not sure. I can add or comment out code to get rid of the
> error. For instance I have the code in a state where with a section
> like:
>
> if(fDumpDebug)
> {
> DumpDebugString("Debugs enabled", 14);
> }
>
> generates the link error but
>
> if(fDumpDebug)
> {
> DumpDebugString("Debugs enabled", 14);
> DumpDebugString("Debugs enabled", 14);
> }
>
> does not.
>
> There is more to it than I have shown but this gives the idea. The
> code above would probably compile OK by itself - it seems to depend on
> how many other constant char strings there are. The above is just a
> very cut down example.
>
> I am generating debug information (both compile and link). Target is
> 'F147. I am no where near filling code space.
>
> Any ideas?