qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.27k stars 39.35k forks source link

bootloader_jump() for HHKB not working? #1271

Closed tengg closed 7 years ago

tengg commented 7 years ago

Re-editted:

I have tried both TMK and QMK with latest codes. On TMK, using magic key to enter bootloader will enable the keyboard DFU mode. On QMK, same magic key doesn't work.

I traced the definition in ./tmk_core/common/command.h: -> ./tmk_core/common/avr/bootloader.c:bootloader_jump(), it seems QMK and TMK use same code.

I'm just confused.. any one can help?

skullydazed commented 7 years ago

Check the Makefile or rules.mk, is BOOTLOADER_SIZE the same in both?

tengg commented 7 years ago

You are right. Tmk is 4096 and qmk is 512. Why is that? And should I change to 4096 in qmk/hhkb?

skullydazed commented 7 years ago

512 is the size for teensy. Other boards use a bootloader that is 4096 bytes. You should change that to match in qmk/hhkb.

cinaeco commented 7 years ago

I encountered the same issue before, but didn't think much about it. Updating BOOTLOADER_SIZE to 4096 does indeed allow the RESET keycode to work. We should change it! Unless anyone knows the reason it was set to 512?

tengg commented 7 years ago

Thanks! It worked. The comment in rules.mk is "As per original Hasu settings". But in TMK it's 4096 now. I agree that we might want to change that too! Unless there's a particular reason.

skullydazed commented 7 years ago

We'd love to have this fix if one of you wants to submit a PR. Otherwise it'll end up waiting until we have a chance to get around our own PR. :)

tengg commented 7 years ago

I'll do the PR, and close this issue.