Hi,
I am working on Freescale ARM Cortex M4 device MK60N512VMD100 using IDE Keil uVision v4.50.0.0
I want to insert some assembly code in c file.
This is what I did
#pragma ARM
get this error
main.c(91): error: #1114-D: this feature not supported on target architecture/processor
try
__asm { }
main.c(91): error: #1113: Inline assembler not permitted when generating Thumb code
how can I insert ARM or Thumb assembly code in C file
Please advice
Thanks and Best Regards Waseem
Cortex-M architectures only support the THUMB2 instruction set.
I don't think you can insert inline assembly, but you can create assembly functions within C files using the following syntax:
__asm void MyAsmFunction( void ) { nop nop nop etc. }
Regards, Richard.
+ http://www.FreeRTOS.org Designed for microcontrollers. More than 7000 downloads per month.
+ http://www.FreeRTOS.org/trace 15 interconnected trace views. An indispensable productivity tool.
Thanks Richard.
It worked.
Best Regards Waseem Ahmed