未解决的符号仍然存在 Code composer studio
unresolved symbols remain Code composer studio
我一直在 MSP4302355 微控制器上尝试我的第一个汇编级程序。我所做的只是将值从一个寄存器移动到另一个寄存器。但是每当我编译代码时,我都会收到错误
“错误 #10234-D:未解析的符号仍然存在
error #10010:链接过程中遇到错误; “Register_Mode_Addr_2355.out”未建成
我已经尽力了,还是没有用。
;-------------------------------------------------------------------------------
; MSP430 Assembler Code Template for use with TI Code Composer Studio
;
;
;-------------------------------------------------------------------------------
.cdecls C,LIST,"msp430.h" ; Include device header file
;-------------------------------------------------------------------------------
.def RESET ; Export program entry-point to
; make it known to linker.
;-------------------------------------------------------------------------------
.text ; Assemble into program memory.
.retain ; Override ELF conditional linking
; and retain current section.
.retainrefs ; And retain any sections that have
; references to current section.
;-------------------------------------------------------------------------------
RESET mov.w #__STACK_END,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW|WDTHOLD,&WDTCTL ; Stop watchdog timer
;-------------------------------------------------------------------------------
; Main loop here
;-------------------------------------------------------------------------------
main:
mov.w PC, R4 ;Move from Program counter to Register R4
mov.w R4, R5 ;Move from R4 to Register R5
mov.w R5, R6 ;Move from R5 to Register R6
jmp main
;-------------------------------------------------------------------------------
; Stack Pointer definition
;-------------------------------------------------------------------------------
.global __STACK_END
.sect .stack
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET
请大家帮帮我先谢谢了
“未解析的符号仍然存在”意味着链接器失败,因为它无法从您的汇编源中解析一个或多个符号,很可能是 __STACK_END 符号。建议您打开显示构建过程的控制台 window,然后滚动查看未解析符号列表,最有可能在最后。这将确认 __STACK_END 符号,这是我对问题的猜测。有点旧,但 this thread 可能会有帮助。
我一直在 MSP4302355 微控制器上尝试我的第一个汇编级程序。我所做的只是将值从一个寄存器移动到另一个寄存器。但是每当我编译代码时,我都会收到错误 “错误 #10234-D:未解析的符号仍然存在
error #10010:链接过程中遇到错误; “Register_Mode_Addr_2355.out”未建成
我已经尽力了,还是没有用。
;-------------------------------------------------------------------------------
; MSP430 Assembler Code Template for use with TI Code Composer Studio
;
;
;-------------------------------------------------------------------------------
.cdecls C,LIST,"msp430.h" ; Include device header file
;-------------------------------------------------------------------------------
.def RESET ; Export program entry-point to
; make it known to linker.
;-------------------------------------------------------------------------------
.text ; Assemble into program memory.
.retain ; Override ELF conditional linking
; and retain current section.
.retainrefs ; And retain any sections that have
; references to current section.
;-------------------------------------------------------------------------------
RESET mov.w #__STACK_END,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW|WDTHOLD,&WDTCTL ; Stop watchdog timer
;-------------------------------------------------------------------------------
; Main loop here
;-------------------------------------------------------------------------------
main:
mov.w PC, R4 ;Move from Program counter to Register R4
mov.w R4, R5 ;Move from R4 to Register R5
mov.w R5, R6 ;Move from R5 to Register R6
jmp main
;-------------------------------------------------------------------------------
; Stack Pointer definition
;-------------------------------------------------------------------------------
.global __STACK_END
.sect .stack
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET
请大家帮帮我先谢谢了
“未解析的符号仍然存在”意味着链接器失败,因为它无法从您的汇编源中解析一个或多个符号,很可能是 __STACK_END 符号。建议您打开显示构建过程的控制台 window,然后滚动查看未解析符号列表,最有可能在最后。这将确认 __STACK_END 符号,这是我对问题的猜测。有点旧,但 this thread 可能会有帮助。