How does one insert a compiler level memory barrier using IAR embedded workbench for ARM?
The equivalent in GCC would be asm volatile ("" : : : "memory")
The words barrier and fence are absent from the User Guide.
How does one insert a compiler level memory barrier using IAR embedded workbench for ARM?
The equivalent in GCC would be asm volatile ("" : : : "memory")
The words barrier and fence are absent from the User Guide.
You can use the same inline assembler as in gcc if your IAR-tools are new enough.
To get the hardware effects you can try putting a DMB instruction in the inline assembler statement or simply use the __DMB()
intrinsic function.