Search code examples
assemblymsp430texas-instruments

unresolved symbols remain Code composer studio


I have been trying out my first assembly level program on MSP4302355 microcontroller. All i am doing is just moving values from one register to another. But whenever I compile the code i am getting a errors "error #10234-D: unresolved symbols remain

error #10010: errors encountered during linking; "Register_Mode_Addr_2355.out" not built"

i have tried all i could but still no use.

;-------------------------------------------------------------------------------
; 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

Project manager

Please help me out guys thanks in advance


Solution

  • The "unresolved symbols remain" means that the linker failed because it couldn't resolve one or more symbols from your assembled source, most likely the __STACK_END symbol. Suggest you open the console window that shows the build process, and scroll through that looking for the list of unresolved symbols, most likely at the end. This will confirm the __STACK_END symbol which is my guess at the problem. A bit old, but this thread may be helpful.