I am just starting with MSP430 and Code Composer Studio (CCS).
I want to make a pure-assembly project. At the moment, I have a "hello world" program that does nothing but light an LED on the MSP430F5529 Launchpad.
However, when I run this program in the debugger, execution begins at address 0x0000 instead of at my designated entry point, called RESET (0x10000). I can see that PC is intially set to 0x0000. If I manually set it in the watch window to RESET, the program runs as expected.
I have declared RESET to be global, and I have set the linker option to make RESET the entry point.
I'm guessing I have a problem with either debugger settings or the (boot)loader, but I could be totally on the wrong track.
.cdecls C,LIST,"msp430.h" ; Include device header file
;-------------------------------------------------------------------------------
.text ; Assemble into program memory
.retain ; Override ELF conditional linking
; and retain current section
.retainrefs ; Additionally retain any sections
; that have references to current
; section
;-------------------------------------------------------------------------------
.global RESET
RESET mov.w #__STACK_END,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW|WDTHOLD,&WDTCTL ; Stop watchdog timer
;-------------------------------------------------------------------------------
; Main loop here
bis.b #01h, &P1DIR
bis.b #01h, &P1OUT
;-------------------------------------------------------------------------------
; Stack Pointer definition
;-------------------------------------------------------------------------------
.global __STACK_END
.sect .stack
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET