Programmer question

Go To Last Post
24 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I wasn't sure where to post this - but I was looking at the JTAGICE as a programmer since it's fairly cheap, but I think it only works on 8 bit AVRs and not 32bit AVRs? Is there a reasonably priced programmer that works on both?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AVRISPmkII $34

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I was looking at the JTAGICE as a programmer since it's fairly cheap, but I think it only works on 8 bit AVRs
If you mean the Mk 1, then it is worse than that: it only programs a small number of 8 bit AVRs.

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The AVRISP mkii will do the job?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
it only programs a small number of 8 bit AVRs.
...and nothing at all with AS5. :?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
The AVRISP mkii will do the job?

If you have only recently got into to AVR's, it will do you for a long time. Lets say in the future you wish to get something more grunty(and need something more grunty), it will be a totally new ball game!

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Koshchi wrote:
it only programs a small number of 8 bit AVRs.

AFAIK it programs all AVRs with JTAG. I do not own the chips to test it but you can select any AVR with JTAG from the long list of supported devices in programming mode.
Quote:
it will do you for a long time.

Till next wednesday, when you meet ARMs :)

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
AFAIK it programs all AVRs with JTAG. I do not own the chips to test it but you can select any AVR with JTAG from the long list of supported devices in programming mode.

AFAIK the JTAG-1 clones will only debug the small list of older AVRs.
You can only program the flash of the small list of older AVRs.
You can read the fuses and signatures of all JTAG AVRs.

In theory you can do anything with JTAG if you send the bare JTAG wiggles on the connector.

However most AVR JTAGICE devices communicate via USB or RS232 using high level commands. Your Studio or C-SPY software will only use these high level commands.

For the cost of a Dragon, you will get proper hardware and software.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
You can only program the flash of the small list of older AVRs. (..) You can read the fuses and signatures of all JTAG AVRs.

I have just asked AS to program and verify(fuse+flash) of AT90USB1287. Works as expected (verification ok). Well, actually I had to cheat a little bit because I do not own AT90USB1287, so the ATMega128 (which has similar layout) was connected. Signature does not match, but apart from that - no major problems.

Can somebody verify (on Si) that JTAGICE Mk1 does not work as expected in programming mode?

Attachment(s): 

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well. I connected a JTAGICE-1 clone to a AT90USB1287 and read the memory via AS4.18.

It reads fine. It verifies the 'read.hex' fine too.

OTOH, the read.hex file is simply zeroes.

The AT90USB1287 contains a real program.
The JTAGICE-1 read the signature, fuses and calibration byte successfully.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not following you David. Are you saying that your verify operation was successful according to AS4, but you used a file of all 0's for the verify operation, but the chip has real code in it?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simple. The chip contains real code.

AS4 reads the real code as zeroes. Writes "u1287_read.hex" file to hard disk.
A subsequent verify of "u1287_read.hex" will also agree that the AVR is all zeroes. Hence success.

Brutte's filename rather suggests that he read the chip first, then verified those contents. In fact any duff programmer will pass this test. A 'verify' is only a 'read' and compare with disk.

If you go through the JTAGICE-1 protocol, it may well contain a 'write-raw-command-to-bus'. In which case you could write a program for flash read/write using this. OTOH, none of the commercial programs do this. They use the high level protocol.

Incidentally, I tried a JTAGICE-1 with Rowley. It will not debug the newer AVRs.

Edit. Removed erroneous references to Wiggler.

I very much doubt that any third party would ever support debugWire. Hence you might just as well buy a Dragon and be done with it. A Dragon is only marginally more expensive than a Pickit-3. Just less sexy.

David.

Last Edited: Tue. Jan 10, 2012 - 06:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Brutte's filename rather suggests that he read the chip first,

I do not own the debugging-not-supported-with-Mk1 chips. I have checked the content of the downloaded files - indeed these are 0xFFFF. It seems for those chips AS interface shows "Verification OK", while actually nothing was written.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My JTAGICE-1 always reads 0x00. It looks as if you used Studio to read and verify your hex file.

So I am surprised that you read 0xFF if I read 0x00.

I will have a cup of tea and then try a Wiggler with Rowley. Rowley does not support the Wiggler with AVR. I must have been mistaken.

I am not an avrice, avr-gdb or Linux user. Does avrice support Wigglers or other ARM JTAG devices?

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I am not an avrice, avr-gdb or Linux user. Does avrice support Wigglers or other ARM JTAG devices?

I have no idea, I am a Windozer. I do not think so - it was made to support Atmel's High Quality Genuine Tools. If it did, who would buy JTAGICE Mk6?

If you want to try other dongles, try Lubo1's HappyJTAG2 (LURA.sk) which (I haven't try) does programming of some and debugging of some JTAGed AVRs (including XMega). It is based on FTDIx232.

And I have just successfully uploaded/downloaded hex from/to my ATMega162 (from ATMega162 pretending ATMega164 with JTAGICE Mk1 to/from file) and it contains working program this time!

I suspect JTAGICE does support programming and verification of flash, eeprom, fuse and lockbits memory spaces of the enlisted chips (although I am not able to verify that). The only problem is that Atmel's software has lots of bugs and it happened AT90USB1287 (and perhaps other chips support) has some flaws.

Edit: I have just tried ATMega128 pretending AT90USB1287 and now it programs and verifies correctly. Program is erased and written again. All works as expected.

If you have ATMegaXX4 or other debugging-not-supported, please try those (hope this will not lock the chips - hell knows what daemons live inside that AS interface).

Quote:
So I am surprised that you read 0xFF if I read 0x00.

Gremlins, I suppose.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If AVR JTAGICEs were $1000s then I would obviously be very interested in using a Wiggler or FTDI-JTAG.

However a Dragon is not expensive. I did in fact buy a JTAGICE-1 clone before I bought the Dragon.

Yes. I agree with you. A JTAGICE-1 clone is very nice to use. It works well but only with the older chips. Let's face it, the mega16/32/64/128 are perfectly capable chips.

So you have flashed a mega164 executable binary into a mega164 chip by saying that it was a mega162.

I am a little sceptical. I have a mega324P and a mega1284P chip. I have told Studio that the mega1284P is a mega128. It reads 0x00s. I also called it a mega162 and it still reads 0x00.

Please could you describe exactly what you have tried.

It does seem a pointless exercise. You must buy a Dragon to use debugWire chips. You get complete JTAG support as a side-effect.

Even if you wrote your own JTAG flash loader, are you going to write the debug client too? It is easier to spend $50.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
So you have flashed a mega164 executable binary into a mega164 chip by saying that it was a mega162.

Misunderstanding. I have flashed and verified ATMega162 with a binary (and with JTAGICEMk1 programming settings) of ATMega164. And then I have made the same thing with ATMega128 and AT90USB1287.

Quote:
It works well but only with the older chips.

Wait a minute. That is what we are trying to find out. Debugging - yes, indeed only limited count is supported. Programming - are you sure JTAGICEMk1 does not program/verify ATMegaXX4 for example?

Quote:
It does seem a pointless exercise. You must buy a Dragon to use debugWire chips.

I have never planned to play with DebugWire chips.
Quote:
Please could you describe exactly what you have tried.

Sorry for the confusion:
1. I have stated that JTAGICEMk1 supports programming of all JTAGed AVRs.
2. You have contradicted. In your opinion only limited count of AVRs is supported.
3. I do not own debugging-not-supported-with-Mk1 chips, so the only thing I could do to prove my statement was to program ATMega128 with the firmware and programming mode settings of some "incompatible" chip. And it worked, although initially instead of verifying programmed ATMega128, I think I made a mistake and tested "Erase Device" (that is why the output was 0xFFFF).

Anyway, now I have made the programming and verification, the firmware is not 0xFFFF's and it does program and verify correctly.

My conclusion is: AS4 does not verify JTAG ID in programming mode. Only the fusebits and lockbits layouts change with the model selected from the dropdown list. You can even read-out ATMega162 telling AS it is AT90USB1287 - it will poll the chip and roll over the flash 8 times, returning 128kB hex (filled with 8 identical copies).

The only thing that worries me is why you cannot program the chips as I can. What is your AS version? And the JTAGICEMk1 Hw/Sw version?

Quote:
Even if you wrote your own JTAG flash loader, are you going to write the debug client too? It is easier to spend $50.

Why should I? I do not use AVRs not debuggable by JTAGICEMk1 so I do not see the point in buying a Dragon or writing any drivers to support it.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am still confused. You say you do not possess any modern AVR chips.

You simply programmed a mega164 binary into a mega162.

If the application is simple enough, it could easily run. e.g. blinky

Yes. AS4 programmer makes no attempt to check signatures. It believes what you tell it. It will report if you ask it to read the signature and it does not match. It will blindly read or program fuses as if it was the imposter chip.

My JTAG1 is HW:0xC0 SW:0x80
My AS4 is v4.18.692

I claim that the JTAG-1 will NOT read or program the flash of modern AVRs.
I said quite clearly that it WILL read signature, fuses, lockbits, calibration. Untested, but I would guess erase_chip works too.

It should be fairly simple to write a standalone flash loader application. More difficult to write one that uses the JTAG-1, JTAG-2, JTAG-3, Dragon hardware.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just plugged in my JTAG Mk1 ( AS4.18 ) and looked at the programmable chips dropdown list, it says it programs pretty much ANYTHING including chips that don't have JTAG and PTI chips like tiny 4, 5 etc.

It's a miracle !! :evil: no wonder Atmel is no longer suppporting the device, it IS the SUPREME tool. :?

ps Anyone named Sheldon Cooper should beware....

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
it says it programs pretty much ANYTHING

But you cannot select the appropriate programming mode with it (next drop-down list). Only JTAG mode is available for JTAGICEMk1 clone. Each chip can only be programmed with the tool that supports its programming mode.

david.prentice wrote:
You simply programmed a mega164 binary into a mega162.

..using mega164 layout. That is the only test I could do currently. And frankly I do not plan to buy any "modern" AVRs, so unless there is someone who can confirm JTAGICEMk1 capabilities in that matter, we will never know.

david.prentice wrote:
I am a little sceptical. I have a mega324P and a mega1284P chip. I have told Studio that the mega1284P is a mega128.

That is strange, indeed. Your sw/hw version is the same as mine.
Could you please connect ATMega324P to the JTAGICEMk1, select "ATMega324P" chip and "JTAG programming" from the drop-down lists and test Erase, Read, Program, Erase+Program etc?

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
But you cannot select the appropriate programming mode with it
Obviously you didn't read my "ps Anyone named Sheldon Cooper should beware...." or you don't get Bing Bang Theory translated and transmitted on Polish TV. :wink:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
That is strange, indeed. Your sw/hw version is the same as mine.
Could you please connect ATMega324P to the JTAGICEMk1, select "ATMega324P" chip and "JTAG programming" from the drop-down lists and test Erase, Read, Program, Erase+Program etc?

1. JTAG_Erase works fine.
2. JTAG_Read reports every byte as 0x00
3. JTAG_Program does not alter any byte.
4. (2)+(3) just erases the mega324P

I could go on forever, but there seems little point. I am sure that most clone owners have experimented with non-supported AVRs. They have the same results. If you are not prepared to buy and test a non-supported chip for yourself, you will never believe others.

There is no great mystery over JTAG. You can sniff the bus and see exactly what commands are sent by a Dragon or JTAG-1. And write a flash-downloader application for yourself.

If you are desperate, you can sniff a Dragon +mega324 debug session. Compare it to a JTAG-1 +mega32 debug session.

Write your own firmware for the JTAG-1. I would guess that the AVR060 Write_Memory high level command puts some different raw bytes on the JTAG bus. Either that or the firmware only has structure tables for the limited number of older AVRs.

I cannot see a send 'raw JTAG command' in the AVR060 protocol. It may exist but is undocumented.

You may be able to send a "Set Device Descriptor" suitable for a different AVR. I doubt it, or else some third party would have done it.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
If you are not prepared to buy and test a non-supported chip for yourself, you will never believe others.

I didn't know about the fact, that although these devices are mentioned in the programming interface software, they are not supported.
Was the subject discussed before?
I thought that if these were listed, then you could have programmed the chips with the tool. Thanks for testing it!

I do not plan to buy or use AVRs, neither ancient nor old versions any more. But if I notice some not tested AVR passing by - I would give it a try!

Quote:
If you are desperate, you can sniff a Dragon +mega324 debug session.

That is not my intention. I do not see the point in playing with the protocol.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Having just read your previous posts ( where have you been for the last two years", I note that you have a Butterfly. Why not use Deane's Butloader and turn that into a all singing all dancing programmer.

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?