我把SYS.C文件放到IAR的工程里来 编译不正确 有人知道怎么改吗

2019-07-20 20:44发布


友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
6条回答
zmingwang
2019-07-20 20:52
IAR下面,要用类似GCC的语法Syntax
The syntax of an inline assembler statement is (similar to the one used by GNU gcc):
asm [volatile]( string [assembler-interface])
string can contain one or more valid assembler instructions or data definition assembler directives, separated by .
For example:
asm("label:nop "
    "b label");
[mw_shl_code=c,true]void WFI_SET(void)
{
        asm("WFI");
}

void INTX_DISABLE(void)
{
        asm("CPSID I "
                "BX LR");
}[/mw_shl_code]

一周热门 更多>