avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] JTAGICE & WinAVR not emulating


From: kas
Subject: RE: [avr-gcc-list] JTAGICE & WinAVR not emulating
Date: Sun, 16 Nov 2003 17:55:09 +0800

Hi Brian,

Thanks for replying.

I used the JTAGICE option of the Debug menu to bring up the JTAG ICE
Properties. I unchecked the "Warn & break if not found or not in section
corresponding to boot reset fuses" option of the Debug tab. After this, the
JTAG ICE warning: Execution stopped on reset vector... is gone.

However, I still have the "000068AC: FFFF ??? Data or unknown opcode"
problem. I have downloaded your avarice.exe and used it but it does not
help. I am trying to initialize the MCU and the USB chip attached. But after
the initialization of the MCU, the program should go on to the USB chip
initialization but it does not. See below for the code. The emulation goes
into init_mcu() but at the end of the init_mcu(), it goes to "000068AC: FFFF
??? Data or unknown opcode" instead!! By right, the emulation should goes to
init_peripherals(), but it does not!

Any idea?

The following is my codes.
++++++++++++++++
main.c
++++++++++++++++
#include
#include
#include
#include
#include "def.h"
#include "init.h"

int main(void)
{
init();
for(;;);
return 1;
}
++++++++++++++++
init.c
++++++++++++++++
#include
#include
#include "def.h"
#include "init.h"

volatile unsigned long g_sof_counter;
volatile uint8_t usb_state;

void init_usb(void);

void init(void)
{
init_mcu();
init_peripherals();
}

void init_mcu(void)
{
/* set the external interrupt pins */
outb(EICRA,ZERO|BIT2|BIT3);
outb(EIMSK,ZERO|BIT0|BIT1);
outb(PORTA,ZERO);
outb(DDRA,ZERO);
outb(PORTB,ZERO|BIT2);
outb(DDRB,ALL_ONE);
outb(PORTC,ZERO);
outb(DDRC,ZERO);
outb(PORTD,ZERO|BIT4|BIT5|BIT6|BIT7);
outb(DDRD,ZERO|BIT2|BIT3|BIT4|BIT5|BIT6|BIT7);
outb(PORTE,ZERO|BIT6|BIT7);
outb(DDRE,ALL_ONE);
outb(PORTG,ZERO);
outb(DDRG,ALL_ONE);
}
void init_peripherals(void)
{
init_usb();
}
void init_usb(void)
{
g_sof_counter = 0x00;
usb_state = 0x00;
}

++++++++++++++++

-----Original Message-----
From: Brian Cuthie [mailto:address@hidden
Sent: Sunday, November 16, 2003 4:41 AM
To: 'kas'; address@hidden
Subject: RE: [avr-gcc-list] JTAGICE & WinAVR not emulating



Sounds like some weirdness that may be caused by the JTAG pod running
too fast (don't ask how I would know this ;-).

Try using the latest avarice that includes the --jtag-bitrate option.
I've found that slowing things down helps a whole lot.

The jtag-bitrate option is new for avarice, and isn't included in the
one that's part of the WinAVR 091303 release. But I've built one that
runs on Windows that you can download from
http://www.systemix.com/avarice.exe if you need it.

Good luck.

-brian

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf Of kas
> Sent: Saturday, November 15, 2003 2:02 AM
> To: address@hidden
> Subject: [avr-gcc-list] JTAGICE & WinAVR not emulating
>
>
>
> I have just bought the ATJTAGICE and a AtMega64 chip. I have
> built a platform for the chip to attach the JTAG. After I
> have complied my code with WinAVR 20030913 and AVR COFF Beta
> May 19, 2003 packages and try to do emulation, I find that
> the emulation is not working well. I cannot do any
> development at all. The syndromes are as follow... How can I
> get the JTAGICE and WinAVR to work? I am generating the
> EXTCOFF file and using Studio 4.07.
>
> =====================================
> The emulation always jumps into some unknown opcode like
> below when I stop it.
>
> 000068AC: FFFF ??? Data or unknown opcode
>
> Also, I find that the emulation keep repeating itself at the main().
>
> There are also the warnings below. Dont know it is causing
> the problem...
>
> JTAG ICE Warning: Execution stopped on reset vector. Could
> not get location for program entry function, or no entry
> function was specified. See the 'Debug' section in JTAG ICE
> options. JTAG ICE Warning: If this is not an error, this
> check can be disabled in the 'Debug' section in the JTAG ICE
> options. Studio will then perform low level singlesteps until
> a source statement is reached. =====================================
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003
>
>
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-> list
>



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003



reply via email to

[Prev in Thread] Current Thread [Next in Thread]