12# 冷漠
多谢冷漠的回复。
确实原工程文件中少加了个init.A51。但是仅仅加了它还不行,还要修改一下init.A51.
本人使用的单片机有WDT,而我发现A51中有那么一段文字,如下:
; User-defined Watch-Dog Refresh.
;
; If the C application contains many initialized variables uses a watchdog
; it might be possible that the user has to include a watchdog refresh into
; the initialization process. The watchdog refresh routine can be included
; in the following MACRO and can alter all CPU registers except
; DPTR.
;
之后补充汇编程序,直接关掉WDT。编译,下载,运行,成功!
再一次感谢前面网友的指点。
|