Discussion group dedicated to the Philips LPC2000 family of ARM MCUs
So far in May, you have voted 0 times ou of a total of 22 votes by the community.
Please help us clean the archives from unuseful discussion threads by using the voting system! Details here.
Is this thread worth a thumbs up?
IAR Inline Assembly Error - Addison Mayberry - Jul 19 16:50:13 2012
I just upgraded to the latest version of IAR Kickstart (code-limited). When I
tried recompiling my code (which includes a lot of inline assembly), I got a
large number of errors where there were none before. I found the issue, and
reproduced it in the simple program below:
int main()
{
asm("test_label:\n");
asm("jmp test_label\n");
return 0;
}
This generates two errors on the second asm line, saying: "Unknown symbol in
inline assembly: 'test_label'", and "Syntax error in inline assembly:
'Error[54]: Expression can not be forward.'" I'm really surprised, as this code
follows all the conventions as far as I know. Any thoughts on what could be
going on?
(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )Re: IAR Inline Assembly Error - boB G - Jul 21 19:16:54 2012
Not sure what's up, but I do know that the newer versions of EWARM are way more
finicky about having correct C syntax.
Your code worked fine for me using EWARM 5.40 but I had to
change the jmp to a branch instruction because it did not know what a jmp
instruction was. That seems fine to me though.
asm("test_label:\n");
asm("b test_label\n");
The changes in IAR's requirements are why I have not updated to the newer
versions of EWARM. Our code is working as is, even though we have to get around
some IAR bugs with 5.40 Newer versions don't quite compile "as is" without
modifications and so would require a complete and lengthy test of the workings
of our products, so we'll just use the old stuff for now.
boB
--- In l..., Addison Mayberry wrote:
>
> I just upgraded to the latest version of IAR Kickstart (code-limited). When I
tried recompiling my code (which includes a lot of inline assembly), I got a
large number of errors where there were none before. I found the issue, and
reproduced it in the simple program below:
>
> int main()
> {
> asm("test_label:\n");
> asm("jmp test_label\n");
>
> return 0;
> }
>
> This generates two errors on the second asm line, saying: "Unknown symbol in
inline assembly: 'test_label'", and "Syntax error in inline assembly:
'Error[54]: Expression can not be forward.'" I'm really surprised, as this code
follows all the conventions as far as I know. Any thoughts on what could be
going on?
>
(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )