单片机学习小组
直播中

于惠

8年用户 168经验值
私信 关注

混编遇到这样的问题该怎么办?

在C程序中加入了
  #pragam asm
  
  MOV R1, 0X12;
  #pragam endasm
同样

回帖(11)

李雨坤

2019-9-4 06:41:59
参考这个:
[C++] 纯文本查看 复制代码
//设置栈顶地址//addr:栈顶地址__asm void MSR_MSP(u32 addr) {MSR MSP, r0 //set Main Stack valueBX r14}
举报

楚红梅

2019-9-4 06:59:16
error:  #11-D: unrecognized preprocessing directive                 #pragam asm ..srcmain.c(92): error:  #20: identifier "MOV" is undefined                 MOV R1, 0X12; ..srcmain.c(92): error:  #40: expected an identifier                 MOV R1, 0X12; ..srcmain.c(93): error:  #11-D: unrecognized preprocessing directive          #pragam endasm ..srcmain.c: 0 warnings, 4 errors ".STM32303C-EVALSTM32303C-EVAL.axf" - 4 Error(s), 0 Warning(s). Target not created
举报

李淳鑫

2019-9-4 07:15:43
Build target 'STM32303C-EVAL'
compiling main.c...
..srcmain.c(90): error:  #11-D: unrecognized preprocessing directive
                #pragam asm
..srcmain.c(92): error:  #20: identifier "MOV" is undefined
                MOV R1, 0X12;
..srcmain.c(92): error:  #40: expected an identifier
                MOV R1, 0X12;
..srcmain.c(93): error:  #11-D: unrecognized preprocessing directive
         #pragam endasm
..srcmain.c: 0 warnings, 4 errors
".STM32303C-EVALSTM32303C-EVAL.axf" - 4 Error(s), 0 Warning(s).
Target not created
举报

杨娟

2019-9-4 07:28:18
error:  #11-D: unrecognized preprocessing directive
                #pragam asm
error:  #20: identifier "MOV" is undefined
                MOV R1, 0X12;
error:  #40: expected an identifier
                MOV R1, 0X12;
error:  #11-D: unrecognized preprocessing directive
         #pragam endasm
..srcmain.c: 0 warnings, 4 errors
".STM32303C-EVALSTM32303C-EVAL.axf" - 4 Error(s), 0 Warning(s).
Target not created
举报

更多回帖

发帖
×
20
完善资料,
赚取积分