在线时间11 小时
UID3173053
注册时间2016-11-1
NXP金币0
TA的每日心情 | 衰 2016-11-15 10:41 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]初来乍到
注册会员

- 积分
- 92
- 最后登录
- 2017-6-23
|

楼主 |
发表于 2016-11-14 17:49:19
|
显示全部楼层
这是我Start.S文件的内容:
;
xref main
;
xdef _BootStart
;
AppResetVect: equ $effe ; here is stored reset vector of user application
StackTop: equ $3900
_BootStart:
; -----------------------------------------------------------------------------
movb #$01, $025C ; enable pull up resistor on PP0 (or we can use external one)
nop ;wait a few cycles for stabilization of the signal
nop
nop
nop
nop
brclr $0259, $01, GoBoot ; if PP0 == 0 then start the bootloader
; if PP0 == 1 then start the application
movb #$00, $025C ; disable pull up resistor on pin PP0 - restore default state
; -----------------------------------------------------------------------------
ldd AppResetVect
cpd #$ffff
beq GoBoot ; if the application reset vector is not available
; then start the bootloader
ldx AppResetVect
jmp 0,x ; jump to the application
GoBoot:
lds #StackTop
jmp main
;********************************************************************************
每次编译程序的时候都是从ldd AppResetVect开始执行的,而一般正常的程序应该从movb #$01,$025C处执行的,请问这是什么原因啊? |
|