Eralt / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

optiboot has problems upload sketches bigger than 30 KB? #380

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
See: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1287435600

Original issue reported on code.google.com by dmel...@gmail.com on 19 Oct 2010 at 3:28

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This appears to happen when the bootloader tries to write the first page that 
is in the "Non Read While Writing" (NRWW) flash section, which is always as 
large as the largest possible bootloader for a part, regardless of the size 
currently selected for the bootloader.  When writing the NRWW section, the CPU 
is supposed to be halted, and the write SHOULD work, so this SHOULD be 
transparent to the bootloader code.  However, this does not appear to be the 
case.  It seems that avrdude never sees the "ok" response from the bootloader, 
so my current theory is that "cpu halted" means that the uart is also halted.  
Alternately, the next command from avrdude may overrun the uart during the 
several milliseconds it takes the flash write to complete (but that doesn't 
match the logs that show no response, such as:
[62] . [9f] . [f0] . [01] r [72] . [9f] . [bb] ' [27] . [f0] . [0d] . [b1] . 
[1d] c [63] . [9f] . [aa] ' [27] . [f0] . [0d] . [b1] . [1d] . [aa] . [1f] d 
[64] . [9f] f [66] ' [27] . [b0] . [0d] . [a1] . [1d] f [66] . [1f] . [82] . 
[9f] " [22] ' [27] . [b0] . [0d] . [a1] . [1d] b [62] . [1f] s [73] . [9f] . 
[b0] . [0d] . [a1] . [1d] b [62] . [1f] . [83] . [9f] . [a0] . [0d] a [61] . 
[1d] " [22] . [1f] t [74] . [9f] 3 [33] ' [27] . [a0] . [0d] a [61] . [1d] # 
[23] . [1f] . [84] . [9f] ` [60] . [0d] ! [21] . [1d] . [82] / [2f] v [76] / 
[2f]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
)

Original comment by wes...@gmail.com on 23 Oct 2010 at 9:57

GoogleCodeExporter commented 9 years ago
there was an optiboot patch back in May to fix NRWW page writing,
that does not appear to be present in the version used in Uno (or distributed
with 0021) 
(http://code.google.com/p/optiboot/source/detail?r=5fb1de3b71af6c531ebca71abec62
2192c3c9b83 )

Original comment by wes...@gmail.com on 24 Oct 2010 at 4:27

GoogleCodeExporter commented 9 years ago
Problem Solved! 
Thanks westfw for your finidng, owe you a beer! 
I compiled and successfully burned a newer version of the optiboot bootloader 
(this revision: 
http://code.google.com/p/optiboot/source/detail?r=12d0c32cc84457603b4c496fe621f2
...).

Although I had found a workaround by using an ATMEGA328 without bootloader in 
my project (programmed with Arduino as ISP), the solution of this issue makes 
me happier: comes convenient and easier in my project to update sketches using 
a serial connection!

Note for the Arduino team: Update the optiboot bootloader to last version!!

Thanks to everyone.

A.

Original comment by avizz...@gmail.com on 24 Oct 2010 at 8:30

GoogleCodeExporter commented 9 years ago

Original comment by wes...@gmail.com on 5 Jun 2011 at 7:17

GoogleCodeExporter commented 9 years ago
being fixed as part of
http://code.google.com/p/arduino/issues/detail?id=556

Original comment by wes...@gmail.com on 11 Jun 2011 at 6:04

GoogleCodeExporter commented 9 years ago
Just as an FYI, before i found out about the optiboot issues, i chased down the 
max size to be 28674 bytes (on my uno).  28676 is where the problems started 
(http://arduino.cc/forum/index.php/topic,65703.0.html)

Original comment by SuperDup...@gmail.com on 5 Jul 2011 at 5:37

GoogleCodeExporter commented 9 years ago
Fixed in the 1.0-associated sources, and now shipping on new hardware.

Original comment by wes...@gmail.com on 20 Dec 2011 at 6:33