Hardware Reference
In-Depth Information
Figure 1-4. Arduino Leonardo pin and feature layout
In order to add the Leonard board to the Arduino IDE, they needed to define the boards.txt file, which contains
the complete definition of the board. The boards.txt file includes the board name, platform, and upload protocol.
Most importantly, the boards.txt file indicates the location of the bootloader file and the variants file to be used.
If you make your own board based on this chip, these are the critical files to update. The SparkFun Pro Mini, the
Adafruit ATmega32u4 board, and the paper Leonardo are all defined similarly; however, the Leonardo header and the
name field need to be changed in the boards.txt file to match each board (see Listing 1-5). If there were a different pin
configuration on your custom board, you would need to create your own build.variant file.
Listing 1-5. boards.txt Definition for the Arduino Leonardo
leonardo.name=Arduino Leonardo
leonardo.platform=avr
leonardo.upload.protocol=arduino
leonardo.upload.maximum_size=28672
leonardo.upload.speed=1200
leonardo.bootloader.low_fuses=0xde
leonardo.bootloader.high_fuses=0xd8
leonardo.bootloader.extended_fuses=0xcb
leonardo.bootloader.path=diskloader
leonardo.bootloader.file=DiskLoader-Leonardo.hex
leonardo.bootloader.unlock_bits=0x3F
leonardo.bootloader.lock_bits=0x2F
leonardo.build.mcu=atmega32u4
leonardo.build.f_cpu=16000000L
leonardo.build.core=arduino
leonardo.build.variant=leonardo
Board Variants
Board variants allow the defining of custom pin mappings for new and custom boards. Originally, all of these features
were maintained in a pins_arduino.h file in the core. Now the pin maps have been moved into their own folder,
called variants .
 
Search WWH ::




Custom Search