-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix bootloader reenumerate issue in new OSX #590
base: master
Are you sure you want to change the base?
Conversation
DFU_UTIL don't reenumerate successfully in new OSX. So the bootloader will not exit and user need to reset target board. reenumerate utility from Apple's Prober.app can fix this issue
What happens on older OSX systems with this change ? |
Don't have an old Mac to test. I can add -R back. If -R works, bootloader device will not be found and reenumerate will be ignored. |
I don't have any MAC. |
It is possible I'm experiencing this issue. Serial device disappears if I reconnect the board for example, osx reboot will fix it which is obviously not the best solution :). Also, I've noticed that if I attach the device to Win10 running inside of a VirtualBox and then detach it, it will also "restore" the serial device. I'm not sure how to test this properly, but just running the reenumerate tool makes the device available again:
If you could point me on a better way to test it, I'll be happy to do it. |
Have you tried the fix above (link below the first post)? |
So the script I run is following (I have macOS 10.15.4):
Following steps:
So the maple_upload script works, however it looks like it is solving a different issue from the one I'm facing. Also the error
(e.g just Maple but not Maple 003), however after reattaching it, it becomes Maple 003 again. I started experimenting with a script and found that if the "re-enumerate" block is placed somewhere before:
Then my use case works (e.g plug-in and upload). Also, I had to add a sleep(1) right after reenumerate |
What board are you using. BluePill etc ? Because the BluePill relies on the hack of setting one of the USB pins to GPIO then pulsing it low and high, to force re-enumeration of the USB bus, its not guaranteed to work with all OS's or hardware. It doesn't work on one of the RaspberryPi boards, and various other computers. This is a fundamental hardware issue with the BluePill type boards. |
STM32F103C8T6. USB resistor is the correct one out of the box (1.5k ohm). |
Actually, this issue does not even seem to be related to the Arduino core, but is related to the bootloader repo. |
Doesn't matter what resistor you use. Its still never compatible with all OS's / Hardware. The only board which is more reliable is the Maple Mini, which uses a separate USB reset control circuit |
very likely yes. However, it helped me to find this reenumerate workaround, without it I was considering getting back to st-link. So even if it's not included in the maple_upload script (which I think would be the right choice), I will still have a way to bring the device back. |
DFU_UTIL don't reenumerate successfully in new OSX. So the bootloader will not exit and user need to reset target board.
reenumerate utility from Apple's Prober.app can fix this issue