-
-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Sleep until USB port becomes writable before running avrdude #5393
Conversation
This breaks It looks like we need to check the OS before calling this routine. |
@drashna I resurrected the |
needs testing on macOS too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verified on macOS
Confirmed working on MSYS2, now. Thanks!! |
* 'master' of https://github.com/qmk/qmk_firmware: (48 commits) [Keymap] Added Boy_314's layout for half n half keyboard (qmk#5373) Align use of atmega32a program script (qmk#5259) [Keyboard] new keyboard lovelive9 (qmk#5266) [Keyboard] Inital port of xd96 (qmk#5401) Fix ascii art (qmk#5407) [Keyboard] Georgi Support (qmk#5384) fresh commit for a new fork for PR to upstream/master (qmk#5406) Added info.json for mt980 keyboard and fixes to walker keymap (qmk#5391) Add support for THE60 (qmk#5385) Added 1up60rgb keymap: mdyevimnav (qmk#5386) Fix i2c calls for HotDox keyboard (qmk#5387) Sleep until USB port becomes writable before running avrdude (qmk#5393) [Keymap] Some more improvements to keymap, currency symbols.. (qmk#5395) [Keymap] Add atreus, ergotravel and org60 keymaps (qmk#5381) archetype keymap for jj50 (qmk#5397) Wheat Field Peripherals mt980 (FC980M Layout) PCB Support (qmk#5374) Minor readme fix (qmk#5389) Add new keyboard Plaid and ATMEGA328p support (qmk#5379) Next set of split_common changes (qmk#4974) [Keyboard] Lily58 Add info.json file (qmk#5354) ...
* sleep until usb port becomes writable before running avrdude * only wait for a writable USB port when not on MSYS using MINGW or MSYS: sleep for one second, as before. otherwise: wait for the port to become writable. * typo * typo
* sleep until usb port becomes writable before running avrdude * only wait for a writable USB port when not on MSYS using MINGW or MSYS: sleep for one second, as before. otherwise: wait for the port to become writable. * typo * typo
* sleep until usb port becomes writable before running avrdude * only wait for a writable USB port when not on MSYS using MINGW or MSYS: sleep for one second, as before. otherwise: wait for the port to become writable. * typo * typo
* sleep until usb port becomes writable before running avrdude * only wait for a writable USB port when not on MSYS using MINGW or MSYS: sleep for one second, as before. otherwise: wait for the port to become writable. * typo * typo
Description
Currently, running with :avrdude as a target will monitor /dev/tty* for the appearance of a new device, then sleep for one second, then launch avrdude to flash the keyboard.
For reasons that I haven't yet determined, that one-second sleep is insufficient on my system.
/dev/ttyACM0
appears with root:root ownership, and it takes udev a good 2.5 seconds or so to change its permissions to root:dialout, giving my normal user write access. This causes avrdude (and make) to exit with an error most of the time:To account for this I have replaced the 1-second sleep with a small loop, similar to the other, to wait for the device to become writable. This seems to successfully resolve the problem, at least on my Debian Linux machine.
If there is a known fix that will make my udev rules do their thing faster, I'm eager to hear about it.
Types of Changes
Issues Fixed or Closed by This PR
None that I am aware of.
Checklist