This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I want to use DSB instruction with inline assembly in my C code.

I want to use DSB instruction with inline assembly in my C code.

With ARM C/C++ Compiler, 4.1 [Build 894], it results in compilation error - instruction not allowed for inline assembly.

__asm("DSB"); is not allowed.

But it is possible to use embedded assembly of this instruction with a wrapper function as below.

__asm void fXYZ()

{

   DSB

}

But since I need to use it inline in C code, I tried

__inline __asm void fXYZ()

{

   DSB

}

or

__forceinline __asm void fXYZ()

{

   DSB

}

but compiler is ignoring the __inline/__forceinline.

I tried using optimization option -Otime as suggested in ARM manual, but still there was no success.

Please suggest a solution.

Parents Reply Children
No data