这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界» 论坛首页» 嵌入式开发» MCU» 请教RENESAS工程师 stater kit 遇到了问题

共3条 1/1 1 跳转至

请教RENESAS工程师 stater kit 遇到了问题

菜鸟
2007-10-26 10:42:29 打赏

就算是很简单的汇编程序,下载到mcu上后,运行起来会说: communications timeout, pls restart E8.

为什么?


简单程序如下:
;****************************************************
;* Definition of ROM *
;****************************************************


VRAMTOP .EQU 0400H ; Setting the starting point of the RAM
VROMTOP .EQU 0F0000H ; Setting the starting point of the ROM
VSB .EQU 0400H ; Setting the starting point of the SB
P0 .EQU 03E0H ; Setting p0 register
PD0 .EQU 03E2H ; Setting p0 direction register

;****************************************************
;* P0----- LED lighting output *
;* P0_0-------LED1 *
;* P0_1-------LED2 *
;* P0_2-------LED3 *
;* P0_3-------LED4 *
;* P0_4-------LED5 *
;* P0_5-------LED6 *
;* P0_6-------LED7 *
;* P0_7-------LED8 *
;****************************************************


.SECTION PROGRAM, CODE
.ORG VROMTOP ; This program will store from the VROMTOP
SETING:
MOV.B #0FFH, PD0 ; P0 are the output pins

MOV.B #081H, P0


.END





build的时候只有这个a30文件,没有其他任何文件

请高手解决




关键词: 请教 RENESAS 工程师 stater 到了

工程师
2007-11-02 11:08:09 打赏
2楼

主要问题可能在于您编写的汇编程序没有对浮动向量表和堆栈指针进行初始化,
如果不定义堆栈,E8调试时候会跑飞.
建议您在程序中加入下列语句试试:
VECTOR_ADR .EQU 0FFEDCh ;Define the Relocatable variable table address
ISTACKTOP .EQU 0685h ;Define the Stack Adrress, pls related to your MCU RAM size!
FCLR I ;Close Interrupt Bit
LDC #ISTACKTOP, isp ;Define ISP Pointer
LDINTB #VECTOR_ADR ;Transfer the Relocatable Vector Address

另外,调试时请注意把Watchdog Timer关掉.


菜鸟
2007-11-02 13:35:33 打赏
3楼
谢谢
我试试去

共3条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册]