Go Down

Topic: Bootloaing AVR chip (Read 1 time) previous topic - next topic

Vincent19

Ah..Just forget about using internal osciallator as it is not that accurate too from what I heard. Just stick to 16MHz and burn arduino UNO bootloader or optibootloader.

Anyway, any difference between optiboot and UNO bootloader ?

CrossRoads

I can't answer that, I don't really know.
Perhaps a little smaller with shorter startup delay?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Vincent19

Anyway, thanks for your great help in providing info :)

westfw

The Uno bootloader is a slightly older version of optiboot.  There shouldn't be any differences relevant to an ATmega328, unless you're compiling from the source code and making changes to the options.

Vincent19

Can you elaborate more on that ?

Thank you :)

westfw

The source code for optiboot is at http://code.google.com/p/optiboot
There was a "big sync-up" back in October of 2011 (prior to 1.0), so that that code and the optiboot included in the arduino distribution were identical.  This was Optiboot version 4.4.   Since then there have been a number of change that have been made only in the optiboot project, because they have not resulted in any change in the behavior (or code) of optiboot on any of the official arduino platforms.  They MIGHT be relevant if you were building some custom platform; for example one of the changes changed the way that the uart bit rate divisor was calculated, especially for lower bitrates.
The changes are recorded by code.google.com, and mostly also in the source code itself:
Code: [Select]
/**********************************************************/
/* Edit History:                                          */
/*                                                        */
/* Mar 2012                                               */
/* 4.5 WestfW: add infrastructure for non-zero UARTS.     */
/* 4.5 WestfW: fix SIGNATURE_2 for m644 (bad in avr-libc) */
/* Jan 2012:                                              */
/* 4.5 WestfW: fix NRWW value for m1284.                  */
/* 4.4 WestfW: use attribute OS_main instead of naked for */
/*             main().  This allows optimizations that we */
/*             count on, which are prohibited in naked    */
/*             functions due to PR42240.  (keeps us less  */
/*             than 512 bytes when compiler is gcc4.5     */
/*             (code from 4.3.2 remains the same.)        */
/* 4.4 WestfW and Maniacbug:  Add m1284 support.  This    */
/*             does not change the 328 binary, so the     */
/*             version number didn't change either. (?)   */
/* June 2011:                                             */
/* 4.4 WestfW: remove automatic soft_uart detect (didn't  */
/*             know what it was doing or why.)  Added a   */
/*             check of the calculated BRG value instead. */
/*             Version stays 4.4; existing binaries are   */
/*             not changed.                               */
/* 4.4 WestfW: add initialization of address to keep      */
/*             the compiler happy.  Change SC'ed targets. */
/*             Return the SW version via READ PARAM       */
/* 4.3 WestfW: catch framing errors in getch(), so that   */
/*             AVRISP works without HW kludges.           */

Go Up