Closed Franiac closed 2 weeks ago
Aside from the error at the end, and the "not blank" part, does it flash correctly?
@drashna Yes, the firmware works perfectly fine after flashing. But my guess is that it only works because I already have flashed the .epp files with QMK Toolbox once. Without that I think it would not work since the 2 parts would not know what's left and right.
Further info: I only habe this problem on Linux (Mint Debian Edition). When I was flashing with Windows (MSYS2) the error did not occur.
Is the "not blank" thing a problem? What does it exactly mean? I don't clear the EEPROM before flashing so that message made sense to me. Am I doing something wrong? Let me know.
The error is returned by the final dfu-programmer atmega32u4 reset
command; this just happens on some machines (when the bootloader resets the MCU, it is seen as an USB device disconnect from the computer side, and if it happens before dfu-programmer
manages to close the USB device handle, dfu-programmer
gets some kind of error and reports it). So you should ignore the error if the previous messages show that the flash process succeeded.
As for the Checking memory from 0x0 to 0x6FFF... Not blank at 0x1.
message, in this case it is normal — note that it happens before the flash is erased, so at that moment the flash still contains the previous firmware. The bad case is when that message is seen after Erasing flash... Success
— in that case it would mean that the erase did not actually work, and ISP flashing may be needed to recover the MCU from that state.
@sigprof Thanks for your explanation. I understand the second paragraph of your answer. This makes sense, since i don't erase the previous firmware manually.
But where does your dfu-programmer atmega32u4 reset
come from. I do not quite understand that. The error points to flash.mk
line 71 where the eeprom-lefthand.eep
should get flashed. I am not familiar with C build tools at all, so this is probably just a lack of understanding on my side, but I want to understand how you came to the conclusion that the culprit of the error is the closing of the USB handle. Can you elaborate a little more on that, please?
That $(call EXEC_DFU,eeprom-lefthand.eep)
expands to a rather long sequence of commands:
https://github.com/qmk/qmk_firmware/blob/11daef82e0c710d7bdacc7c78fe21fae864be191/platforms/avr/flash.mk#L25-L53
In this case make
receives the exit status of the last command in the sequence, which ends up being dfu-programmer atmega32u4 reset
(after substituting things like $(MCU)
).
And closing the handle is about the only place where the error can be triggered after the reset operation had been performed successfully (if the error happened anywhere earlier, the reset command would not go through, and the MCU would remain in the bootloader).
Ah, I missed the part that EXEC_DFU
is just another function call. Thank you for clarifying!
Since everything has been answered, I am closing this now.
Describe the Bug
When flashing my Avalanche v4 with Sea Micro (white) controllers and DFU bootloaders, I get an error at the end:
Here's the complete output:
Line 71 of
flash.mk
is the call for writing the hands .epp to the controller. I did that some time ago with QMK Toolbox, so my firmware does run without any problems anyways, but this error should not happen, i suppose.Here's the section from
flash.mk
:The firmware compiles fine and gets written to the controller and verified successfully, but writing the hands file to the controller fails.
Keyboard Used
avalanche/v4
Link to product page (if applicable)
No response
Operating System
Windows 11
qmk doctor Output
Is AutoHotKey / Karabiner installed
Other keyboard-related software installed
QMK Toolbox
Additional Context
No response