I have this part of code that was compiling using ARMASM :
/* Software Interrupt */ /* we must save lr in case it is called from SVC mode */ #define ngARMSwi( code) __asm { SWI code,{},{},{lr} } example of use : ngARMSwi( 0x23);
I try to convert this to compile using gcc (code sourcery GCC-4.6.2 eabi). I found this link http://www.ethernut.de/en/documents/arm-inline-asm.html but I cannot find a way to compile this line correctly.
my best try is
#define ngARMSwi( code) __asm__ ("SWI " (code) : : :"lr" ) but I get compile error :
error: expected ':' or ')' before '(' token Any help is appreciated!