Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

AURIX™ Forum Discussions

User20098
Level 1
Level 1
First reply posted First question asked
Hi, new to the forum but long time user of your products!

Using the newer compiler for the tc1.6.x through Aurix Studio 1.1.6 I am having a compiler error come up when attempting to use this inline asm instruction.

Attempted Instruction:

" register int d2_save __asm("%d2");"

Compiler Error:

E208: syntax error - token ";" inserted before "__asm"
1 errors, 0 warnings

If anyone has any insight that would be great!

C
0 Likes
2 Replies
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
Hi C. What assembly code are you trying to end up with? Here's an example of something similar:

int in;

// store the register holding *in* to 0x70000000
__asm( "st.w 0x70000000,%0"
:
: "d" (in) );
0 Likes
User20098
Level 1
Level 1
First reply posted First question asked
Hey thanks for the reply!

I am simply trying to save the register locally so that it does not get overwritten in the function to follow. This was the best way to do so in the past for me. Only the declaration of the register was necessary to write in the __asm method. Not sure why the newer compiler doesn't work in the same fashion.
0 Likes