[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] Can avrdude-5.3.1 handle stk500v1 and ATtiny15?
From: |
Erik Christiansen |
Subject: |
Re: [avr-chat] Can avrdude-5.3.1 handle stk500v1 and ATtiny15? |
Date: |
Thu, 8 Mar 2007 12:05:28 +1100 |
User-agent: |
Mutt/1.5.9i |
On Wed, Mar 07, 2007 at 07:51:32AM +0100, Joerg Wunsch wrote:
> Of course, I'm particularly interested whether the segfault still
> happens.
Yes, it's still there. I'll give you a look over my shoulder, with the
gdb run at the end, after confirming the build. Working back from the
outcome:
$ avrdude -c stk500v1 -p t15 -e -U flash:w:obj/flash.srec -F
avrdude: please define PAGEL and BS2 signals in the configuration file for part
ATtiny15
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9006
avrdude: erasing chip
avrdude: please define PAGEL and BS2 signals in the configuration file for part
ATtiny15
avrdude: reading input file "obj/flash.srec"
avrdude: input file obj/flash.srec auto detected as Motorola S-Record
avrdude: writing flash (126 bytes):
Writing | | 0%
0.00sSegmentation fault
That's not what's anticipated. Let's check that we actually have a new avrdude:
$ which avrdude
avrdude is hashed (/usr/local/bin/avrdude)
$ ll /usr/local/bin/avrdude
-rwxr-xr-x 1 root root 480608 2007-03-07 21:13 /usr/local/bin/avrdude*
For the sake of thoroughness, /usr/bin/install did that, just a moment ago:
$ sudo make install
Password:
make[1]: Entering directory `/usr/local/src/avr/avrdude-5.3.1'
make[2]: Entering directory `/usr/local/src/avr/avrdude-5.3.1'
test -z "/usr/local/bin" || mkdir -p -- "/usr/local/bin"
/usr/bin/install -c 'avrdude' '/usr/local/bin/avrdude'
Backing up avrdude.conf in /usr/local/etc
test -z "/usr/local/etc" || mkdir -p -- "/usr/local/etc"
/usr/bin/install -c -m 644 'avrdude.conf' '/usr/local/etc/avrdude.conf'
test -z "/usr/local/man/man1" || mkdir -p -- "/usr/local/man/man1"
/usr/bin/install -c -m 644 './avrdude.1' '/usr/local/man/man1/avrdude.1'
make[2]: Leaving directory `/usr/local/src/avr/avrdude-5.3.1'
make[1]: Leaving directory `/usr/local/src/avr/avrdude-5.3.1'
And before that, a new avrdude-stk500.o was compiled and linked:
$ make
make all-recursive
make[1]: Entering directory `/usr/local/src/avr/avrdude-5.3.1'
make[2]: Entering directory `/usr/local/src/avr/avrdude-5.3.1'
if gcc -DHAVE_CONFIG_H -I. -I. -I. -DCONFIG_DIR=\"/usr/local/etc\" -Wall -g
-O2 -MT avrdude-stk500.o -MD -MP -MF ".deps/avrdude-stk500.Tpo" -c -o
avrdude-stk500.o `test -f 'stk500.c' || echo './'`stk500.c; \
then mv -f ".deps/avrdude-stk500.Tpo" ".deps/avrdude-stk500.Po"; else rm -f
".deps/avrdude-stk500.Tpo"; exit 1; fi
gcc -g -O2 -o avrdude avrdude-config_gram.o avrdude-lexer.o avrdude-avr.o
avrdude-avr910.o avrdude-avrpart.o avrdude-bitbang.o avrdude-butterfly.o
avrdude-config.o avrdude-confwin.o avrdude-crc16.o avrdude-fileio.o
avrdude-jtagmkI.o avrdude-jtagmkII.o avrdude-lists.o avrdude-main.o
avrdude-par.o avrdude-pgm.o avrdude-ppi.o avrdude-ppiwin.o avrdude-safemode.o
avrdude-serbb_posix.o avrdude-serbb_win32.o avrdude-ser_avrdoper.o
avrdude-ser_posix.o avrdude-ser_win32.o avrdude-stk500.o avrdude-stk500v2.o
avrdude-stk500generic.o avrdude-term.o avrdude-usbasp.o avrdude-usb_libusb.o
make[2]: Leaving directory `/usr/local/src/avr/avrdude-5.3.1'
make[1]: Leaving directory `/usr/local/src/avr/avrdude-5.3.1'
Here it is:
-rw-r--r-- 1 erik erik 38240 2007-03-07 21:13
/usr/local/src/avr/avrdude-5.3.1/avrdude-stk500.o
Ah, but did the patch take?:
$ diff -w stk500.c stk500.c.orig
497,499d496
< n_extparms = 1; /* EEPROM only */
< }
<
510d506
< if (n_extparms > 1) {
520d515
< }
527a523
> }
OK, time to follow your suggestion, and run avrdude under gdb:
(gdb) run -c stk500v1 -p t15 -e -U flash:w:obj/flash.srec
Starting program: /usr/local/bin/avrdude -c stk500v1 -p t15 -e -U
flash:w:obj/flash.srec
avrdude: please define PAGEL and BS2 signals in the configuration file for part
ATtiny15
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9006
avrdude: erasing chip
avrdude: please define PAGEL and BS2 signals in the configuration file for part
ATtiny15
avrdude: reading input file "obj/flash.srec"
avrdude: input file obj/flash.srec auto detected as Motorola S-Record
avrdude: writing flash (126 bytes):
Writing | | 0% 0.00s
Program received signal SIGSEGV, Segmentation fault.
0x08060cf9 in stk500_paged_write (pgm=0x8089b18, p=0x81bb2c0, m=0x81bc638,
page_size=128, n_bytes=Variable "n_bytes" is not available.
) at stk500.c:749
749 buf[i++] = Sync_CRC_EOP;
The code around line 749 doesn't instantly hit me in the face with a
plausible cause. Gaining familiarity would take longer that I'm afforded
tonight. Hopefully this much is a useful start.
Thanks for the v2 firmware. I'll hold off upgrading while we still need
a v1 testbed. (Or it's concluded that upgrading is the fix. ;-)
Many thanks.
Erik
- [avr-chat] Can avrdude-5.3.1 handle stk500v1 and ATtiny15?, Erik Christiansen, 2007/03/05
- Re: [avr-chat] Can avrdude-5.3.1 handle stk500v1 and ATtiny15?, Joerg Wunsch, 2007/03/06
- Re: [avr-chat] Can avrdude-5.3.1 handle stk500v1 and ATtiny15?, Erik Christiansen, 2007/03/06
- RE: [avr-chat] Can avrdude-5.3.1 handle stk500v1 and ATtiny15?, Eric Weddington, 2007/03/06
- Re: [avr-chat] Can avrdude-5.3.1 handle stk500v1 and ATtiny15?, Joerg Wunsch, 2007/03/07
- Re: [avr-chat] Can avrdude-5.3.1 handle stk500v1 and ATtiny15?,
Erik Christiansen <=
- Re: [avr-chat] Can avrdude-5.3.1 handle stk500v1 and ATtiny15?, Joerg Wunsch, 2007/03/08
- Re: [avr-chat] Can avrdude-5.3.1 handle stk500v1 and ATtiny15?, Erik Christiansen, 2007/03/08
- Re: [avr-chat] Can avrdude-5.3.1 handle stk500v1 and ATtiny15?, Erik Christiansen, 2007/03/13