В CCS создаю ассемблерный проект для msp430f5256.
код генерируется автоматически:
Код
.cdecls C,LIST,"msp430.h" ; Include device header file
;-------------------------------------------------------------------------------
.sect .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
;-------------------------------------------------------------------------------
RESET
mov.w #__STACK_END,SP ; Initialize stackpointer
mov.w #WDTPW|WDTHOLD,&WDTCTL; Stop watchdog timer
;-------------------------------------------------------------------------------
; Main loop here
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
; Stack Pointer definition
;-------------------------------------------------------------------------------
.global __STACK_END
.sect .stack
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET
;-------------------------------------------------------------------------------
.sect .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
;-------------------------------------------------------------------------------
RESET
mov.w #__STACK_END,SP ; Initialize stackpointer
mov.w #WDTPW|WDTHOLD,&WDTCTL; Stop watchdog timer
;-------------------------------------------------------------------------------
; Main loop here
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
; Stack Pointer definition
;-------------------------------------------------------------------------------
.global __STACK_END
.sect .stack
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET
Проблема в том, что когда начинаю отлаживаться, PC указывает на SFRs, а не на FLASH, где расположен код RESET.
т.е. вместо адреса 0x010004 PC устанавливается в 0x000004.
Подскажите пожалуйста, как исправить это.
Пробовал указывать точку входа в настройках линкера, игрался с другими параметрами - не помогло.