avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] [bug #43471] avrdude 5.11 buffer overruns in stk500v2 code


From: Joerg Wunsch
Subject: [avrdude-dev] [bug #43471] avrdude 5.11 buffer overruns in stk500v2 code
Date: Wed, 19 Nov 2014 17:06:46 +0000
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:33.0) Gecko/20100101 Firefox/33.0

Follow-up Comment #1, bug #43471 (project avrdude):

The problem is that this situation (Xmega but STK500v2 protocol 
anyway) is uncommon.  The entire code had been tailored on the 
non-Xmega devices as Xmegas use their own (different) protocols.

Also, the STK500v2 itself is limited to a maximal message 
size of 275 bytes, see AVR068, page 2.  That used to cause 
the current implementation.

I think the actual issue is that the following procedure 
described in AVR068 is not implemented:

"For devices with page size bigger than what can be 
transferred to STK500 in one command, several 
CMD_PROGRAM_FLASH_ISP commands must be issued.  In such a 
case, only the last command should have the Write Page mode 
bit set."

I wonder whether your bootloader would be able to handle that.

Nevertheless, changing the fixed buffers into malloc'ed 
buffers might make a lot of sense.  Other programmer 
implementations (like those for the JTAGICEs) already do it 
that way.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?43471>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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