diff options
| author | tmk <hasu@tmk-kbd.com> | 2015-05-13 15:01:49 +0900 |
|---|---|---|
| committer | tmk <hasu@tmk-kbd.com> | 2015-05-13 15:01:49 +0900 |
| commit | 192024124b65fb65a65b44eef0bbc308c5971cea (patch) | |
| tree | 46193b2eb18837f2d2a5bc9f02a0d281f3d35e22 /tmk_core/common/avr | |
| parent | 6057e915b53728f7b9d421b604c7c4654ca58743 (diff) | |
| download | qmk_firmware-192024124b65fb65a65b44eef0bbc308c5971cea.tar.gz qmk_firmware-192024124b65fb65a65b44eef0bbc308c5971cea.zip | |
Add description of AVR bootloader and boot section
Diffstat (limited to 'tmk_core/common/avr')
| -rw-r--r-- | tmk_core/common/avr/bootloader.c | 49 |
1 files changed, 43 insertions, 6 deletions
diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index cda295b18..7c744e8c7 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c | |||
| @@ -11,12 +11,49 @@ | |||
| 11 | #endif | 11 | #endif |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | /* Boot Section Size in *BYTEs* | 14 | /* Bootloader Size in *bytes* |
| 15 | * Teensy halfKay 512 | 15 | * |
| 16 | * Teensy++ halfKay 1024 | 16 | * AVR Boot section size are defined by setting BOOTSZ fuse in fact. Consult with your MCU datasheet. |
| 17 | * Atmel DFU loader 4096 | 17 | * Note that 'Word'(2 bytes) size and address are used in datasheet while TMK uses 'Byte'. |
| 18 | * LUFA bootloader 4096 | 18 | * |
| 19 | * USBaspLoader 2048 | 19 | * |
| 20 | * Size of Bootloaders in bytes: | ||
| 21 | * Atmel DFU loader(ATmega32U4) 4096 | ||
| 22 | * Atmel DFU loader(AT90USB128) 8192 | ||
| 23 | * LUFA bootloader(ATmega32U4) 4096 | ||
| 24 | * Arduino Caterina(ATmega32U4) 4096 | ||
| 25 | * USBaspLoader(ATmega***) 2048 | ||
| 26 | * Teensy halfKay(ATmega32U4) 512 | ||
| 27 | * Teensy++ halfKay(AT90USB128) 1024 | ||
| 28 | * | ||
| 29 | * | ||
| 30 | * AVR Boot section is located at the end of Flash memory like the followings. | ||
| 31 | * | ||
| 32 | * | ||
| 33 | * byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB128) | ||
| 34 | * 0x0000 +---------------+ 0x00000 +---------------+ | ||
| 35 | * | | | | | ||
| 36 | * | | | | | ||
| 37 | * | Application | | Application | | ||
| 38 | * | | | | | ||
| 39 | * = = = = | ||
| 40 | * | | 32KB-4KB | | 128KB-8KB | ||
| 41 | * 0x6000 +---------------+ 0x1FC00 +---------------+ | ||
| 42 | * | Bootloader | 4KB | Bootloader | 8KB | ||
| 43 | * 0x7FFF +---------------+ 0x1FFFF +---------------+ | ||
| 44 | * | ||
| 45 | * | ||
| 46 | * byte Teensy(ATMega32u4) byte Teensy++(AT90SUB128) | ||
| 47 | * 0x0000 +---------------+ 0x00000 +---------------+ | ||
| 48 | * | | | | | ||
| 49 | * | | | | | ||
| 50 | * | Application | | Application | | ||
| 51 | * | | | | | ||
| 52 | * = = = = | ||
| 53 | * | | 32KB-512B | | 128KB-1KB | ||
| 54 | * 0x7E00 +---------------+ 0x1FC00 +---------------+ | ||
| 55 | * | Bootloader | 512B | Bootloader | 1KB | ||
| 56 | * 0x7FFF +---------------+ 0x1FFFF +---------------+ | ||
| 20 | */ | 57 | */ |
| 21 | #ifndef BOOTLOADER_SIZE | 58 | #ifndef BOOTLOADER_SIZE |
| 22 | #warning To use bootloader_jump() you need to define BOOTLOADER_SIZE in config.h. | 59 | #warning To use bootloader_jump() you need to define BOOTLOADER_SIZE in config.h. |
