[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Cannot use my new JTAG for programming
From: |
Juergen Harms |
Subject: |
[avr-gcc-list] Cannot use my new JTAG for programming |
Date: |
Sun, 18 Mar 2007 17:23:13 +0100 |
User-agent: |
Thunderbird 1.5.0.10 (X11/20070305) |
I completed my initial learning period programming an ATmega16 that sits
in a STK500v2 - no problems. I now re-did things on a small breadbord
(essentially the "simple project" layout of the avr-libc demo-projects),
and tried to write the program (initially tested and developed on the
STK500) now in-circuit programming with a newly purchased JTAG: and got
stuck (and I have correctly written the OCDEN fuse bit to 0).
What works OK:
Calling "avrdude -p m16 -c jtagmkII -P /dev/ttyS0 -t"
and interactively dumping and writing flash, (h/l)fuse, eeprom
What does not work:
Writing program code to flash or eeprom, using avrdude -p m16 -c
jtagmkII -P /dev/ttyS0 -U flash:w:timer.hex (or eeprom:w:timer_eeprom.hex)
The response from avrdude is appended to the end of this message
(essentially some not necessarily fatal messages complaining about
time-out and firmware version), and evidence the the write/readback of
program code failed - paritcularly amazing the message that lfuse could
not be read properly). Checking in terminal mode after the failed
programming tentative, something has been written to the ATmega16 (I did
my work with an entirely new processor, no possibility of a "tired"
flash memory, and also tried another processor).
I then went back to my STK500v2 and piloted it (not, as before, directly
through its RS232 port) but from the JTAG, plugged via the "STK500 JTAG
ADAPTER" with the same result: OK in terminal mode, but total failure
when trying to write code from a file to flash memory or eeprom.
If I call avrdude with the -v option, I get the following complementary
information:
avrdude: Version 5.3.1, compiled on Feb 20 2007 at 22:01:48
Programmer Type : JTAGMKII
Description : Atmel JTAG ICE mkII
M_MCU hardware version: 0
M_MCU firmware version: 1.06
S_MCU hardware version: 0
S_MCU firmware version: 1.06
Serial number: 00:a0:00:00:06:33
Vtarget : 5.0 V
JTAG clock : 891.7 kHz (1.1 us)
What can I do to further clarify the situation - is it possible that I
received a JTAG with an old firmware version (I bought it from a company
with which I have only had positive experiences so far) that does not
work with the recent version of avrdude ?
Thanks for any help, Juergen
================================= resonse from avrdude
avrdude -p m16 -c jtagmkII -P /dev/ttyS0 -U flash:w:timer.hex
avrdude: jtagmkII_getsync(): S_MCU firmware version might be too old to
work correctly
avrdude: jtagmkII_set_devdescr(): timeout/error communicating with
programmer (status -1)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.06s
avrdude: Device signature = 0x1e9403
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be
performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: jtagmkII_set_devdescr(): timeout/error communicating with
programmer (status -1)
avrdude: reading input file "timer.hex"
avrdude: input file timer.hex auto detected as Intel Hex
avrdude: writing flash (5620 bytes):
Writing | | 0%
0.00savrdude: jtagmkII_paged_write(): bad response to write memory
command: Unknown JTAG ICE mkII result code 0x94
Writing | ################################################## | 100% 0.09s
avrdude: failed to write flash memory, rc=-1
avrdude: jtagmkII_read_byte(): bad response to read memory command:
RSP_FAILED
avrdude: jtagmkII_read_byte(): bad response to read memory command:
RSP_FAILED
avrdude: safemode: Verify error - unable to read lfuse properly.
Programmer may not be reliable.
avrdude: jtagmkII_read_byte(): bad response to read memory command:
RSP_FAILED
avrdude: jtagmkII_read_byte(): bad response to read memory command:
RSP_FAILED
avrdude: safemode: Verify error - unable to read lfuse properly.
Programmer may not be reliable.
avrdude: safemode: Sorry, reading back fuses was unreliable. I have
given up and exited programming mode
avrdude: jtagmkII_program_disable(): bad response to leave progmode
command: RSP_FAILED
avrdude: jtagmkII_close(): bad response to GO command: RSP_FAILED
avrdude done. Thank you.
- [avr-gcc-list] Cannot use my new JTAG for programming,
Juergen Harms <=