Skip to content
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

UPDI init failed on Ubuntu 22.04.3 LTS #1047

Open
kr15h opened this issue Jan 10, 2024 · 1 comment
Open

UPDI init failed on Ubuntu 22.04.3 LTS #1047

kr15h opened this issue Jan 10, 2024 · 1 comment

Comments

@kr15h
Copy link

kr15h commented Jan 10, 2024

Hi,

I am trying to program ATtiny412 and ATtiny1614 boards using Serial UPDI (tried all programmer options) and Quentin's SWD UARD Adapter and the packaged pymcuprog throws a UPDI Initialization failed error.

I tried to export the compiled binary and upload it with the latest pymcuprog installed on my system via pip and it worked. I also added the workaround to the README of Quentin's SWD UARD Adapter.

First, yes, I am using Arduino IDE 1.8.13. Second, I tried it on Windows 10 and it works out of the box, no problem. Mac is another issue, but it would be great to solve it on Linux first.

I assume that the packaged pymcuprog should be updated. Packaged version is 3.6.4.86, but the latest available version is 3.16.8.40.

If you can give me hints about how to perform the upgrade, I could do it and submit a pull request.

Thank you for your time!

@SpenceKonde
Copy link
Owner

No, the packaged version of SerialUPDI is very very different from the official one and has departed too much from the codebase and the code can no longer be ported between the two. Performance with the "official" version is markedly worse than for my version, a huge amount of effort was put towards optimizing it. 99% of the time a UPDI init failed is a bad connection or incorrect wiring - where it's failing for you it has received no response from the target; I don't think anything in the upstream helps other than that it acts like our version with all the speed-robbing settings set to the most grindingly slow and even worse, it doesn't use RSD when writing bulk data, forcing the excessively long default guard times and pauses noted above on every byte, which adds a round trip, which is typically 1-2 ms.

If there are enhancements, that need to be pulled in from the main one, it needs to be done by hand, working in godawful code.

It is of course also possible that they locked UPDI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants