laghari123 / arduino

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

optiboot should support ATmega1284 #794

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Several projects have appeared that use the ATmeg1284 chip (largest AVR 
available in a DIP; the next step up from Sanguino.)
optiboot should be modified to support this chip as well; this should involve 
mere makefile and #define changes that do not change the existing binaries.

http://code.google.com/p/optiboot/issues/detail?id=51

Original issue reported on code.google.com by wes...@gmail.com on 16 Jan 2012 at 1:02

GoogleCodeExporter commented 9 years ago
Fixed in the optiboot project.

Original comment by wes...@gmail.com on 29 Jan 2012 at 11:47

GoogleCodeExporter commented 9 years ago
I've made some changes to the OptiBoot bootloader for devices with more than 
64K of Flash generally and for the mega1284P in particular.  The attached patch 
reflects these changes and a separate change that adds a build option to pass 
the reset flags (MCUSR) to the application at startup time (some additional 
code is needed in the application to exploit this capability).  The code was 
tested on a mega1284p but the bootloader can be built for the mega1281 and 
mega1280 as well.

The patch is relative to the OptiBoot files accompanying Arduino v1.0.2.  The 
changes, taken together, should result in a smaller bootloader for all targets 
even when the new PASS_RESET_FLAGS option is enabled.  When enabled, the 
bootloader puts the reset flags in a particular register (r2 was chosen).  If 
you want the reset flags in an application you add a small amount of code (see 
the second attachment).

Original comment by dkin...@gmail.com on 30 Dec 2012 at 11:32

Attachments:

GoogleCodeExporter commented 9 years ago
I have incorporated in the optiboot repository 
(http://code.google.com/p/optiboot/ ) the parts of this patch that were not 
already present.  That was the space-saving use of the Z+ mode of LPM/ELPM, and 
passing the reset causes to the App in R2 (although I made that unconditional.) 
 This bumps optiboot to version 4.6.

Original comment by wes...@gmail.com on 5 Jan 2013 at 5:51