【发布时间】:2021-10-17 05:50:59
【问题描述】:
我一直在 MSP4302355 微控制器上尝试我的第一个汇编级程序。我所做的只是将值从一个寄存器移动到另一个寄存器。但是每当我编译代码时,我都会遇到错误 “错误 #10234-D:未解析的符号仍然存在
错误 #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
请帮帮我提前谢谢
【问题讨论】:
标签: assembly msp430 texas-instruments