inline assemblers in c file, in IAR32
I read the guide doc, but too limited info from that.
What are you trying to access exactly? A C declared variable that you want access to in inline assembly?
For gcc it's done like this:
#define SETREG( sregister, regval ) \
__asm__( "mtsr %0, %1\n" \
:"X"(sregister), "r"(regval) )
But I don't know for IAR. Maybe it's similar.
I don't know much about avr32 C yet, but many compilers put an underscore in front of C variables. So int foo; would be accessed as _foo.
However, why not look at a link map or assembly listing from the compiler? That should tell you for sure.
my problem is that i have the sample code in gcc but not in IAR32
For IAR try:
asm ("stm --sp, r0-r7");
© 2022 Microchip Technology Inc.