Giter VIP home page Giter VIP logo

xmega_bootloader's Introduction

Welcome to the XmegaBl. This bootloader implements the AVR911 protocol and is
purposefully stripped of the unnecessary bloat in an effort to keep it simple
and efficient.

Please see these threads for helpful tips and information:
   1. http://www.avrfreaks.net/forum/tutsoft-xmega-bootloader-available
   2. http://www.avrfreaks.net/forum/xmega-serial-bootloader

!!!!!!!!!!
NOTE - the xmega E series does not work properly with the master branch of this
repository. Use the xmegaE branch, which has a temporary workaround. I will
update the main repository to handle xmega E series microcontrollers at some
point.
!!!!!!!!!!

Bootloader information:
   1. It works with all Xmegas, but may require you to add support if it isn't
      already in the makefile. Note: AVR-GCC has to support the particular
	  Xmega you want to use as well. AVRDUDE 5.10 lacks support for many, many
	  Xmegas, so you may need to acquire a newer version if you're simply using
	  the bundled version that came with Winavr.
   2. It requires AVR-GCC to build.
   3. It uses the AVR911 protocol.
   4. It works with avrdude version 5.10 and Avr-OSP II version .549.
   5. Compilation size should be 2600-3000 bytes depending on the size of your
      AVR (>64k flash = bigger code).
   6. Unless you are adding support for unsupported baud rates or Xmegas, you
      do NOT need to edit any source code.

Bootloader Instructions (configure each setting in the makefile):
   1. It checks a pin (Active high/low and Pin/Port are configurable) for
      bootloader entry or application entry.
   2. An LED can be turned on when the bootloader is entered. Active high/low
      and Pin/Port are configurable.
   3. The default baud rate is 115200, but this can be set to anything you want.
 
How to configure:
   In the makefile, you will see the following block of text at the top of the
   file. You should not need to edit anything other than this block of code
   unless you are adding support for additional baud rates or devices.

###############################################################################
# User modification section
###############################################################################
#  Choose one of the following MCUs:
#    If you have a different MCU, you will have to define these values:
#         Name in makefile                   Name in ioxxxx.h
#         ---------------------------        -----------------------------
#         BOOT_SECTION_START_IN_BYTES        BOOT_SECTION_START
#         BOOT_PAGE_SIZE                     BOOT_SECTION_PAGE_SIZE
#         APP_PAGE_SIZE                      APP_SECTION_PAGE_SIZE
#
#    You can find these files in the include path for your compiler. Examples:
#    1) Winavr:  C:\WinAVR-20100110\avr\include\avr\ioxxxx.h
#    2) Atmel 3.4.2: C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\
#       Native\3.4.2.1002\avr8-gnu-toolchain\avr\include\avr\ioxxxx.h

# MCU = atxmega128a1
# MCU = atxmega64a3
MCU = atxmega64a3u
# MCU = atxmega32a4
# MCU = atxmega16a4
# MCU = atxmega16d4
  
# Choose a baud rate for the UART.
#    If you need a baud rate that is not listed in this makefile, you must add
#    new configuration statements in config.macros.h. Remember, Xmegas start-up
#    with a 2MHz clock.
# BAUD_RATE = 9600
# BAUD_RATE = 38400
# BAUD_RATE = 57600
  BAUD_RATE = 115200
  
# Specify a pin to check for entry into the bootloader. The notation is
# PORT,PIN. For example, if you wanted to use PIN 3 on PORTC, you would set
# the option as C,3. Then specifiy the logic value required to enable the
# bootloader code (1 = enable the bootloader if the pin is VCC, 0 = enable 
# the bootloader if the pin is GND).
  BOOTLOADER_PIN    = B,2
  BOOTLOADER_PIN_ON = 0
  
# Specify a pin to control an LED. The notation is PORT,PIN. For example, if
# you wanted to use PIN 6 on PORTA, you would set the option as A,6. Then
# specifiy the logic value required to enable the LED (1 = output VCC to turn
# on the LED, 0 = output GND to turn on the LED).
  LED_PIN = D,2
  LED_ON  = 0

# Specify which UART to use with PORT,NUM notation. For example, UART1 on
# PORTD would be D,1.
  UART = C,0

###############################################################################
# End user modification section
###############################################################################

Please email me ([email protected]) if you have any questions or comments
about the code. I will respond as quickly as possible.

If you use or fork this repository, please let me know how you're using it only
because I'm curious. Also, if you want to modify or improve the code, submit a
pull request and I'd be happy to investigate the changes.

xmega_bootloader's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.