avr-chat
[Top][All Lists]
Advanced

[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: Joerg Wunsch
Subject: Re: [avr-chat] Can avrdude-5.3.1 handle stk500v1 and ATtiny15?
Date: Thu, 8 Mar 2007 07:16:19 +0100
User-agent: Mutt/1.5.11

As Erik Christiansen wrote:

> 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;

Ick.  Please replace buf[pagesize + 16] in the beginning of that
function by buf[256 + 16] (256 is the maximal page size of an AVR), as
a stop-gap measure.  pagesize is initially 0 when we enter the
function, so we allocate 16 bytes only.  Then we notice it's 0, and
invent an artifitial 128 bytes pagesize.  Obviously, now the buffer's
way too small for the data to fit.

I think the actual error is that the paged write function should not
be called at all, but I have to think a bit about that.

Please file a bug report, so we'll make sure this won't be forgotten.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)




reply via email to

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