问答

汇集网友智慧,解决技术难题

21ic问答首页 - dsPIC33EP64GS505汇编与C混合编程问题

4G 汇编 混合编程 dspic33 include

dsPIC33EP64GS505汇编与C混合编程问题

南美大帝2021-03-15
您好:
我想在汇编文件中调用C文件定义的变量,但编译报错,具体做法和报错情况如下:
C头文件(.h):
#include "xc.h"
#include <stdint.h>
extern int16_t     dcmCorrFactor
C源文件(.C):
#include "Variables_s.h"
int16_t    dcmCorrFactor           = 32767;
汇编文件(.S):
#include "Variables_s.h"
.include "p33Exxxx.inc"
mov _dcmCorrFactor , w12   
编译时报错:
\support\dsPIC33E\h/p33EP64GS505.h:26785:Error: Invalid mnemonic: 'extern'
感觉像是头文件调用冲突了
麻烦哪位大神帮忙指导下,如何处理,万分感谢!!!
回答 +关注 7
2117人浏览 5人回答问题 分享 举报
5 个回答

您需要登录后才可以回复 登录 | 注册