-
-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
RESET/DFU not working on TADA68 #1215
Comments
According to the instructions, the TADA68 has a special way of flashing it, so it probably don't work at all with the dfu-programmer. That custom bootloader is also probably the reason why the reset button doesn't do anything. |
What if one would flash a different bootloader to the chip? |
Maybe this will help. The file where this probably should be implemented is tmk_core/common/avr/bootloader.c. |
I'm a bit blind; a link to that is in the file itself. Tried a lot of stuff to get it working but I didn't succeed. |
I'm just guessing, but based on the way that this keyboard is flashed, it's using the lufa mass storage bootloader. The instructions for that, states that the bootloader size is 6KB plus an auxillary section. So based on that, I think the jump should work if you change the bootloader size to 6KB in the makefile. |
I'm closing this to clean up our open issues, but if you still have questions @AndreasBackx and @Maartenwut please reopen this or open a new issue. |
Hi, sorry to resurrect an old bug, but is there any clarification on whether software DFU is possible on this board, by changing the bootloader memory size or otherwise? I know it's a bit of an odd-ball flashing mechanism, but the board is otherwise great with QMK, it's just a pain to have to keep disassembling it every time I want to update the keymap. Thanks! |
The Tada68 doesn't have DFU, when in bootloader mode it appears as a mass storage device, and is very susceptible to bricking. Could you try adding |
Will give it a roll, thanks for the reply. The 6K/ 6144 byte figure that was mentioned before however, I've read the LUFA docs above and it comments:
Does 6K definitely apply here? |
That sentence relates to the AT90USB128 which the LUFA mass storage bootloader builds for by default, but the Tada68 is using an ATmega32U4. The max bootloader section size for the former is 8kB, and 4kB for the 32U4. Thus you lose 2kB of firmware space when using this bootloader on anything with less than 128kB of flash (basically only the USB128) as the FAT filesystem code is just too large to fit in 4kB. |
Make sense, thanks for clarifying. Will try later in the day and report. |
Unfortunately this doesn't seem to help. Rebuilding with make |
So the keyboard level rules.mk has the Command feature enabled, which will change the checksum on every build because it bakes in the build time along with some other diagnostic info eg. compiler version. If I disable that and add |
Another option is to simply replace the bootloader with something less ... fragile. You can use an ISP flasher to replace the bootloader and change the fuses to use DFU instead. This may be a better long term solution, too. |
Thanks @fauxpark I'd run several builds without the checksum updating, but will give it another crack this evening. The only other thing I noticed is that the boot key differs from the published boot key in the LUFA documentation, but even swapping the key didn't help. @drashna good to know that's an option, when you say "change the fuses" is that a HW mod? I'm not the world's most competent solderer (although did get all the switches in without needing to visit a burns unit...) Is there any documentation for that process (the actual flashing with an ISP programmer looks relatively straightfoward), and reliable source for the firmware or build instructions? Thanks. |
Fuses in the context of AVRs are not the electrical component, they're more like EEPROM memory and are used to configure some low level stuff about the chip: https://hackaday.com/2012/08/30/avr-fuse-bits-explained/ |
Oh right, makes much more sense. That's great thanks, I might get a hold of a programmer and give it a crack. |
So after a stressful evening with a USBasp, avrdude and crossed fingers I've got the QMK bootloader installed on my board, and it's great! Quick key combo into DFU mode, with LED feedback and escape to exit, and command-line flashing with the QMK build tools works great. This is exactly what I wanted out of the board, thanks @fauxpark and @drashna for your help! |
* fix keymap usage of KC_NLCK `KC_NLCK` -> `KC_NUM` * fix keymap usage of KC_SLCK `KC_SLCK` -> `KC_SCRL` * fix keymap usage of KC_LCTRL `KC_LCTRL` -> `KC_LCTL` * fix keymap usage of RESET `RESET` -> `QK_BOOT` * fix keymap usage of EEP_RST `EEP_RST` -> `EE_CLR` * fix keymap usage of KC_GESC `KC_GESC` -> `QK_GESC` * fix keymap usage of KC_HENK `KC_HENK` -> `KC_INT4` * fix keymap usage of KC_MHEN `KC_MHEN` -> `KC_INT5` * fix keymap usage of KC_BSPACE `KC_BSPACE` -> `KC_BSPC` * fix instance of KC_LCTR in rate/pistachio_pro keymap * fix keymap usage of DEBUG `DEBUG` -> `DB_TOGG`
I was working on my own layout for my TADA68 and while doing so I found that the RESET keycode doesn't seem to trigger the keyboard to go into DFU mode and dfu-programmer also doesn't detect the keyboard while it's in its reprogrammable state. Is there a way I can perhaps make a PR to get this to work? Where would I start?
The text was updated successfully, but these errors were encountered: