-
Notifications
You must be signed in to change notification settings - Fork 146
Allow for flashing via the USB Serial JTAG peripheral #122
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
Allow for flashing via the USB Serial JTAG peripheral #122
Conversation
|
Hmm this isn't working for me anymore on linux (Mac M1 won't work until we fix the serial library), but the original branch still works for me via the usb jtag serial? |
MabezDev
left a comment
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.
I take that back actually, it does work! However sometimes it seems it can get into a state where no matter how many retries it won't work until its power cycled 🤔. Possibly this is a quirk of the hardware peripheral, maybe we can test with esptool.py.
For now, this is definitely an improvement, so lets get it landed and figure out the quirks later on.
|
Thanks for taking a look! I did have that happen once right when I started testing, but it did not happen again so I chalked it up to PEBKAC. I will take a second look at it today and compare with |
|
I tried it on Windows (Windows 11) with mixed results. Seems I had tinkered around with Zadig before and I had to revert to the original drivers first. After attaching the USB cable, it (always?) gets stuck like this When I do a board-info first it often is able to do the flashing. It doesn't reset the target however after flashing so I need to manually push the reset button on the dev-board. After one or more successful flash attempts it ends up in the |
|
Thanks for testing it out. Very strange indeed. I guess this will require some more digging! Just as another data point, I wasn't even able to get my Windows 10 machine to connect using this method, however now that you mentioned Zadig I realize I may have the incorrect driver installed... |
|
It looks like it has different behavior on different machines. I was able to flash on Windows 10 with pretty high success even after repeating flashing ~10 times. However, I encountered the same behavior @bjoernQ described with |
add binary for tests add test message to debug test: test reset sequence for USB-serial-JTAG C3 Add USB-serial-JTAG support add test message to debug test: test reset sequence for USB-serial-JTAG C3
05a5353 to
6f88f36
Compare
MabezDev
left a comment
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.
write_request_to_send()- it doesn't change the voltage level on the physical pin for me.
Seems this is an issue with serial-port-rs on windows (similar behavior already reported in #74)? Works well on x86 linux & mac.
Overall, I think this is probably good to go, the issues seem to be independent to this PR.
|
Yeah, I generally agree with that assessment. It seems to be working most of the time as-is from what I can tell, which is a good start at the very least. I'm only really running macOS these days, so makes sense that I wouldn't see the same behaviour described above. |
Thanks to @JurajSadel for his work on this!
As stated in the title, this adds support for flashing via the ESP32-C3's USB Serial JTAG peripheral. This required performing a small refactor for
get_serial_portto instead return aSerialPortInfostruct, as we needed access to thePIDlater on.Has been tested on macOS x86_64 successfully. I will test it on Windows later today, and I believe @MabezDev will be able to test on an M1 Mac.
Closes #93.