Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates bootloader settings, adds file size check #2029

Merged
merged 13 commits into from
Nov 28, 2017

Conversation

jackhumbert
Copy link
Member

@jackhumbert jackhumbert commented Nov 19, 2017

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 into rules.mk files (now overridable) - this is the standard block:

# Bootloader
#     This definition is optional, and if your keyboard supports multiple bootloaders of
#     different sizes, comment this out, and the correct address will be loaded 
#     automatically (+60). See bootloader.mk for all options.
BOOTLOADER = atmel-dfu

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):

# Bootloader
#     This definition is optional, and if your keyboard supports multiple bootloaders of
#     different sizes, comment this out, and the correct address will be loaded 
#     automatically (+60). See bootloader.mk for all options.
ifeq ($(strip $(KEYBOARD)), preonic/rev1)
    BOOTLOADER = atmel-dfu
endif
ifeq ($(strip $(KEYBOARD)), preonic/rev2)
    BOOTLOADER = qmk-dfu
endif

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

  • update all the keyboard's rules.mk and get rid of (now) unnecessary defines.
  • document all of this in docs/

@jackhumbert jackhumbert changed the title Updates bootloader settings Updates bootloader settings, adds file size check Nov 21, 2017
@jackhumbert jackhumbert merged commit 9fdc276 into master Nov 28, 2017
@jackhumbert jackhumbert deleted the update_jump_bootloader branch November 28, 2017 04:08
LovesTha pushed a commit to LovesTha/qmk_firmware that referenced this pull request Jul 24, 2018
* pull fuse settings for bootloader jump

* fix 32a chips

* make automatic bootloader selection optional

* quantify bootloaders

* fixs qmk#164, speeds up dfu reset

* fix for chips w/o usb

* missing an n

* fix bootloader sizes, use words for addresses

* fix bmini, pearl, and [[ issue, make things quiet

* ignore avr errors on arm for now

* update settings for the light

* document bootloader stuff

* add bootloader title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant