AWAYWSNB 发表于 2025-2-13 14:38

芯旺微KF8F中断编译错误

本帖最后由 AWAYWSNB 于 2025-2-13 15:10 编辑

KF8CC 编译器在将 C 语言的中断函数(如 void int_fun0() __interrupt (0) 和 void int_fun1() __interrupt (1) )转换为汇编代码时,自动生成了相同的 interrupt_service_routine 标签,从而导致了重复定义错误。这个问题怎么解决??

KungFu 8 MCU Compiler V2.3.2 Rev (Nov 17 2021 11:51:03)
main.asm:441:Error Duplicate label or redefining symbol that cannot be redefined. (interrupt_service_routine)
make: *** Error 1
make: Target `all' not remade because of errors.


func._int_fun0      .code
;***
;PostBlock Stats: dbName = I
;***
;entry:_int_fun0      ;Function start
; 0 exit points
;; Starting PostCode block
;      .def _int_fun0_function_begin, debug, value=$

;      ::->op : LABEL
;      ::->op : FUNCTION
_int_fun0      ;Function start
; 0 exit points
;      ::->op : GET_VALUE_AT_ADDRESS
; R3 resprent for wsave,R4 resprent for ssave, R5 resprent for psave
interrupt_service_routine
;      .line      44; "../main.c"      if(T1IF)
      JB      _EIF1_bits, 0
      JMP      _00012_DS_
;      ::->op :*=
;      .line      46; "../main.c"      T1IF = 0;                                        //清零中断标志
      CLR      _EIF1_bits, 0
;      ::->op : =
;      .line      47; "../main.c"      T1H = 0xFC;                                        //T1计数器重新赋值
      MOV      R0,# 0xfc
      MOV      _T1H, R0
;      ::->op : =
;      .line      48; "../main.c"      T1L = 0x18;
      MOV      R0,# 0x18
      MOV      _T1L, R0
;      ::->op : =
;      .line      50; "../main.c"      SMFlag_Start = 1;// 设置状态机启动标志位
      MOV      R0,# 0x01
      BANKSEL      _SMFlag_Start
      MOV      _SMFlag_Start, R0
      BANKSEL      _SMFlag_Start
      CLR      (_SMFlag_Start + 1)
;      ::->op : LABEL
;      ::->op : ENDFUNCTION
_00012_DS_
      MOV      R1, R2
      MOV      PCH, R5
      MOV      PSW, R4
      MOV      R0, R3
      IRET      
;      .def _int_fun0_function_end, debug, value=$




func._int_fun1      .code
;***
;PostBlock Stats: dbName = I
;***
;entry:_int_fun1      ;Function start
; 0 exit points
;; Starting PostCode block
;      .def _int_fun1_function_begin, debug, value=$

;      ::->op : LABEL
;      ::->op : FUNCTION
_int_fun1      ;Function start
; 0 exit points
;      ::->op : LABEL
;      ::->op : ENDFUNCTION
; R3 resprent for wsave,R4 resprent for ssave, R5 resprent for psave
interrupt_service_routine
_00015_DS_
;      .line      59; "../main.c"      }
      IRET      
;      .def _int_fun1_function_end, debug, value=$


AWAYWSNB 发表于 2025-2-13 14:43

型号KF8F3122,有没有大佬知道的?

钟爱柳州 发表于 2025-2-14 11:43

提供信息有限,可以把详细信息发邮件到support@chipon-ic.com
页: [1]
查看完整版本: 芯旺微KF8F中断编译错误