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]
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]
void MSR_MSP(u32 addr)
{
asm("MSR MSP r0" //set Main Stack value
"BX r14");
}
我依照你的改的 这个改的不对 错在哪里呢
加上去也不对
void MSR_MSP(u32 addr)
{
asm("MSR MSP r0 " //set Main Stack value
"BX r14");
}
void MSR_MSP(u32 addr)
{
asm("MSR_MSP r0 " //set Main Stack value
"BX r14");
}
这两种都不行
一周热门 更多>