Reply by Mostafa Kassem July 19, 20052005-07-19
MK wrote:
> "Mostafa Kassem" <No_One@Nowhere.com> wrote in message > news:L5WdnT_kkaXb80ffRVn-iw@rogers.com... > >>Greetings: >> >>I am helping a friend with a small battery charger project. I chose the >>Atmega88 for this project because it has a good mix of peripherals, memory >>size and physical size. >> >>I am using Winavr 4.11 to develop the code (which I found to be very easy > > to > >>use) and a combination of AVR Studio, STK500 and JTAGICE mkII for > > debugging. > >>I am having a hell of time getting AVR Studio to work with JTAGICE mkII. I >>have encountered the following problems: >> >>1- The USB interface does not work on the JTAGICE mkII, even where I work > > (I > >>am working on PowerPC) they are using the same thing, they can't get the > > USB > >>interface to work. The host is a Dell D505 laptop. >> >>2- Perhaps my choice of ATmega88 was not the best choice because it does >>have a debugwire interface and not a JTAG interface. Because the debugwire >>is also the reset pin, one can not use the debugwire and ISP > > simultaneously. > >>It is either debugwire or ISP and the chip has to be re-prgrammed for > > either > >>one. >> >>3- The latest revision to the STK500 firmware does not work with avrdude > > 4.4 > >>or even 4.3. I understand that there is avrdude 5.0 beta that solves this >>problem but I could never find it for Windoze and I don't want to switch > > to > >>Linux just to be able to use avrdude 5.0. >> >>4- The worst problem is that JTAGICE mkII either loses connection to the >>debugwire and ISP or can't find them and I have to unplug the serial port >>connection from JTAGICE mkII and connect to the STK500, reconnect the >>parallel programing cables on the STK500 and re-program the chip for the >>JTAGICE mkII to declare that it can not see the debugwire again. >> >>5- Even at the odd time when the JTAGICE mkII sees the debugwire, I am >>seeing ridiculous things, F11 (step into in the AVR Studio) goes through >>every line of code indiscriminately after loading the .elf file. >> >> >>Any bright ideas besides switching to a processor with JTAG interface? >>Unfortunately they are at least 40 pins and more expensive and the PCB is >>about to be routed (not too late to change though). >> >>Best regards, >> >>Mostafa >>-- >>---------------------------------------- >>Mostafa Kassem >>M Dot Kassem At ieee Dot org >>--------------------------------------- >> > > > Hello, > > I'm using the IAR toolset to generate code but the AVR Studio/JTAGICEMkII > (via USB) combination to debug mega88. > > I have seen symptoms very like yours when the ISP pins from the JTAGICE were > connected to the target when using the debug wire. (The docs say that the > ISP pins will be high Z duirng debugWire operations but I think that signals > on them fool the JTAGICE into never properly starting the debugWire > session.) > Whatever the exact cause when I connected ONLY the debugWire pins to the > target it all works fine. > > Hope this is some help - please let me know. > > > Michael Kellett > > www.mkesc.co.uk > >
Hello Michael: I decided to take Frank-Christian Kr&#4294967295;gel's advice and use a processor with JTAG. So, I switched to the ATMEGA16 that came with the STK500 and things seem to work much better with the JTAG. I'll switch back to the M88 once everything is working. However, in the process of switching I discovered that I may have been setting the clock fuse to the wrong value and that may have been my problem all along even when I used only the three wires for the DEBUGWIRE. Thanks for your post. Best regards, Mostafa -- ---------------------------------------- Mostafa Kassem M Dot Kassem At ieee Dot org ---------------------------------------
Reply by MK July 18, 20052005-07-18
"Mostafa Kassem" <No_One@Nowhere.com> wrote in message
news:L5WdnT_kkaXb80ffRVn-iw@rogers.com...
> Greetings: > > I am helping a friend with a small battery charger project. I chose the > Atmega88 for this project because it has a good mix of peripherals, memory > size and physical size. > > I am using Winavr 4.11 to develop the code (which I found to be very easy
to
> use) and a combination of AVR Studio, STK500 and JTAGICE mkII for
debugging.
> > I am having a hell of time getting AVR Studio to work with JTAGICE mkII. I > have encountered the following problems: > > 1- The USB interface does not work on the JTAGICE mkII, even where I work
(I
> am working on PowerPC) they are using the same thing, they can't get the
USB
> interface to work. The host is a Dell D505 laptop. > > 2- Perhaps my choice of ATmega88 was not the best choice because it does > have a debugwire interface and not a JTAG interface. Because the debugwire > is also the reset pin, one can not use the debugwire and ISP
simultaneously.
> It is either debugwire or ISP and the chip has to be re-prgrammed for
either
> one. > > 3- The latest revision to the STK500 firmware does not work with avrdude
4.4
> or even 4.3. I understand that there is avrdude 5.0 beta that solves this > problem but I could never find it for Windoze and I don't want to switch
to
> Linux just to be able to use avrdude 5.0. > > 4- The worst problem is that JTAGICE mkII either loses connection to the > debugwire and ISP or can't find them and I have to unplug the serial port > connection from JTAGICE mkII and connect to the STK500, reconnect the > parallel programing cables on the STK500 and re-program the chip for the > JTAGICE mkII to declare that it can not see the debugwire again. > > 5- Even at the odd time when the JTAGICE mkII sees the debugwire, I am > seeing ridiculous things, F11 (step into in the AVR Studio) goes through > every line of code indiscriminately after loading the .elf file. > > > Any bright ideas besides switching to a processor with JTAG interface? > Unfortunately they are at least 40 pins and more expensive and the PCB is > about to be routed (not too late to change though). > > Best regards, > > Mostafa > -- > ---------------------------------------- > Mostafa Kassem > M Dot Kassem At ieee Dot org > --------------------------------------- >
Hello, I'm using the IAR toolset to generate code but the AVR Studio/JTAGICEMkII (via USB) combination to debug mega88. I have seen symptoms very like yours when the ISP pins from the JTAGICE were connected to the target when using the debug wire. (The docs say that the ISP pins will be high Z duirng debugWire operations but I think that signals on them fool the JTAGICE into never properly starting the debugWire session.) Whatever the exact cause when I connected ONLY the debugWire pins to the target it all works fine. Hope this is some help - please let me know. Michael Kellett www.mkesc.co.uk
Reply by Mostafa Kassem July 17, 20052005-07-17
Frank-Christian Kruegel wrote:
> On Sun, 17 Jul 2005 10:39:42 -0400, Mostafa Kassem <No_One@Nowhere.com> > wrote: > > >>I am having a hell of time getting AVR Studio to work with JTAGICE mkII. I >>have encountered the following problems: >> >>1- The USB interface does not work on the JTAGICE mkII, even where I work (I >>am working on PowerPC) they are using the same thing, they can't get the USB >>interface to work. The host is a Dell D505 laptop. > > > I've never had any problems with the mkII's usb port with both my desktop > pcs and a Sony Vaio SR1K notebook (all Windows XP). A fried of mine had > problems with ground loops and the STK500, which went away with swapping > polarity on the STK500's power supply. >
I tried the mkII with an IBM Thinkpad running Win98SE and the USB interface did not work either. The DEll is running Win2K.
> >>3- The latest revision to the STK500 firmware does not work with avrdude 4.4 >>or even 4.3. I understand that there is avrdude 5.0 beta that solves this >>problem but I could never find it for Windoze and I don't want to switch to >>Linux just to be able to use avrdude 5.0. > > > Why should I use avrdude instead of AVR Studio?
Because I suspected the AVR Studio was not programming the chip correctly. I did a DIFF on the hex file generated by AVR GCC and the hex file read by AVR Studio from the chip and there was quite a bit of discrepancy. After I posted, I came across these two links which confirmed my suspicion. http://supp.iar.com/Support/?note=60448&from=search+result http://lists.gnu.org/archive/html/avr-gcc-list/2005-05/msg00004.html
> > >>Any bright ideas besides switching to a processor with JTAG interface? >>Unfortunately they are at least 40 pins and more expensive and the PCB is >>about to be routed (not too late to change though). > > > A better way would be developing on a JTAG capable chip (via adapter board) > and porting to a smaller chip after everything is working.
Yep, I should have done that from the start. Except that I did not want to duplicate the work as there is really no direct downgrade path. Also, I didn't think it was going to be that difficult as this is my first experience using AVR and its tools.
> > Mit freundlichen Gr&#4294967295;&#4294967295;en
Wielen danke.
> > Frank-Christian Kr&#4294967295;gel
Mostafa -- ---------------------------------------- Mostafa Kassem M Dot Kassem At ieee Dot org ---------------------------------------
Reply by Frank-Christian Kruegel July 17, 20052005-07-17
On Sun, 17 Jul 2005 10:39:42 -0400, Mostafa Kassem <No_One@Nowhere.com>
wrote:

>I am having a hell of time getting AVR Studio to work with JTAGICE mkII. I >have encountered the following problems: > >1- The USB interface does not work on the JTAGICE mkII, even where I work (I >am working on PowerPC) they are using the same thing, they can't get the USB >interface to work. The host is a Dell D505 laptop.
I've never had any problems with the mkII's usb port with both my desktop pcs and a Sony Vaio SR1K notebook (all Windows XP). A fried of mine had problems with ground loops and the STK500, which went away with swapping polarity on the STK500's power supply.
>3- The latest revision to the STK500 firmware does not work with avrdude 4.4 >or even 4.3. I understand that there is avrdude 5.0 beta that solves this >problem but I could never find it for Windoze and I don't want to switch to >Linux just to be able to use avrdude 5.0.
Why should I use avrdude instead of AVR Studio?
>Any bright ideas besides switching to a processor with JTAG interface? >Unfortunately they are at least 40 pins and more expensive and the PCB is >about to be routed (not too late to change though).
A better way would be developing on a JTAG capable chip (via adapter board) and porting to a smaller chip after everything is working. Mit freundlichen Gr&#4294967295;&#4294967295;en Frank-Christian Kr&#4294967295;gel
Reply by Mostafa Kassem July 17, 20052005-07-17
Greetings:

I am helping a friend with a small battery charger project.  I chose the 
Atmega88 for this project because it has a good mix of peripherals, memory 
size and physical size.

I am using Winavr 4.11 to develop the code (which I found to be very easy to 
use) and a combination of AVR Studio, STK500 and JTAGICE mkII for debugging.

I am having a hell of time getting AVR Studio to work with JTAGICE mkII. I 
have encountered the following problems:

1- The USB interface does not work on the JTAGICE mkII, even where I work (I 
am working on PowerPC) they are using the same thing, they can't get the USB 
interface to work. The host is a Dell D505 laptop.

2- Perhaps my choice of ATmega88 was not the best choice because it does 
have a debugwire interface and not a JTAG interface. Because the debugwire 
is also the reset pin, one can not use the debugwire and ISP simultaneously. 
It is either debugwire or ISP and the chip has to be re-prgrammed for either 
one.

3- The latest revision to the STK500 firmware does not work with avrdude 4.4 
or even 4.3. I understand that there is avrdude 5.0 beta that solves this 
problem but I could never find it for Windoze and I don't want to switch to 
Linux just to be able to use avrdude 5.0.

4- The worst problem is that JTAGICE mkII either loses connection to the 
debugwire and ISP or can't find them and I have to unplug the serial port 
connection from JTAGICE mkII and connect to the STK500, reconnect the 
parallel programing cables on the STK500 and re-program the chip for the 
JTAGICE mkII to declare that it can not see the debugwire again.

5- Even at the odd time when the JTAGICE mkII sees the debugwire, I am 
seeing ridiculous things, F11 (step into in the AVR Studio) goes through 
every line of code indiscriminately after loading the .elf file.


Any bright ideas besides switching to a processor with JTAG interface? 
Unfortunately they are at least 40 pins and more expensive and the PCB is 
about to be routed (not too late to change though).

Best regards,

Mostafa
-- 
----------------------------------------
Mostafa Kassem
M Dot Kassem At ieee Dot org
---------------------------------------