csw20066 发表于 2008-7-14 12:54:56

调试出现的问题

我用avr stdio4.0版本调试mega48的C程序,但是,调试结果出现如下问题,请问是怎么回事?谢谢了。

Loaded objectfile: F:\wuxiantongxun\AVR3.cof
AVR Simulator: Unsupported instruction 'jmp' at address 0x000000
AVR Simulator: Unsupported instruction 'call' at address 0x00009b
AVR Simulator: Uninitialized stack pointer used at 0x009b
AVR Simulator: Stack Overflow at 0x0119
AVR Simulator: Invalid opcode 0xffff at address 0x006060
AVR Simulator: Invalid opcode 0xffff at address 0x000061
AVR Simulator: Invalid opcode 0x90eb at address 0x000072
AVR Simulator: Invalid opcode 0xff6f at address 0x00007a
AVR Simulator: Unsupported instruction 'call' at address 0x00009b
AVR Simulator: Stack Overflow at 0x009b

Gorgon_Meducer 发表于 2008-7-14 18:21:07

我基本没有用过仿真,帮不上你忙哈。

machao 发表于 2008-7-14 18:55:19

在编译mega48的C程序时,芯片选择不对,没有选择M48,选择了其它型号的。

M48不支持jmp和call,仅支持rjmp和rcall,因为M48的FLASH小,rjmp,rcall就够了。

yulutong 发表于 2008-8-21 08:18:40

我也碰到了这个问题,我用的MEGA8,根据马老师指点,还没有解决。楼主解决了么

rogerllg 发表于 2008-8-23 21:25:02

我也遇到过这种问题,是单片机选择的问题.....在ICCAVR里面Project_Options里面选择正确的单片机型号.我用的是MEGA48,但是选择了MEGA168,
按马老师的方法解决了,呵呵.谢谢!
页: [1]
查看完整版本: 调试出现的问题