AnsweredAssumed Answered

How to write an assembly function?

Question asked by zhou hongliang on Apr 14, 2018
Latest reply on Apr 17, 2018 by zhou hongliang

Hello.

I am developing an embedded system with S32DS and I have a problem.

I have to write an assembly function as below:

 

asm volatile void OSPendSVException (void)
{

add sp, sp, #(9*4)
pop {pc}

bx lr
}

__asm void OSPendSVException1(void)
{

add sp, sp, #(9*4)
pop {pc}

bx lr
}

__asm__ void OSPendSVException2(void)
{

add sp, sp, #(9*4)
pop {pc}

bx lr
}

 

When compiling, the three functions above all have errors as below. 

Compiling errors

I wonder to know how to write assembly function in S32DS.

 

Thank you very much.

Outcomes