Updates bootloader settings, adds file size check #2029
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the Teensy reset issue from #164, and speeds up the DFU reset time by using PJRC's same USB disable and delay in that chain.
This introduces the
BOOTLOADER
variable intorules.mk
files (now overridable) - this is the standard block:If it's possible that multiple bootloaders can be used for one project of the same revision, you can leave this unset, and the correct size will be selected automatically (this is new and +60 bytes). The current options for
BOOTLOADER =
are:atmel-dfu
lufa-dfu
qmk-dfu
halfkay
caterina
bootloadHID
BOOTLOADER_SIZE
can still be defined manually, but if I'm missing anything (that's currently being used) please let me know and I'll add it to the list!If different revisions of a project use different bootloaders, you can use a block like this to define a bootloader for each (this can also be done by separate rules.mk files):
File size check
This also introduces the target
check-size
, that automatically figures out how much flashable space a keyboard will have with a certain bootloader (using the settings above) - it's called automatically, and you'll be able to see how many bytes you have left when compiling (in decimal). Currently this is only available for AVR chips.DOTOO