-
Notifications
You must be signed in to change notification settings - Fork 24
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
Feature request: a new generic device: 'auto' or 'auto_updi' #15
Comments
Thanks for the input - logged as DSG-4313 |
This is the way Atmel did the things since the first AVR, although there always have been the signature bytes ready to be used. You must say what chip do you want, then the tool reads the signature and tells you: OK, or, Wrong. It's just a way to do the things. The other way is not to ask the user about the chip, the chip is what it is, discovered from the real world. There are other important things to ask the user, like the file name, memory type, offsets, etc. |
Indeed - you are right about the history, but its not political. |
I have a similar issuer - I am using pymcuprog API to write simple tool to check serial number, read fuses, etc... And the first step should be to check the DeviceID and branch accordingly. But I need to specify the device type beforehand. |
Hi @Kedarius |
Hi @xedbg , thanks for prompt answer. |
Indeed - i see your problem... in a quick test with avriot connected and tiny1607 specified
However - there is another caveat in that the Dx/Ex families have an additional configuration requirement, so they will fail in a different way... so perhaps its not that foolproof... |
I am using a serialUPDI as it seems to be the simplest way for now. I also have a Curiosity Nano and I am thinking about "converting it to a generic programmer" but that is for another time.
The goal is to practice python and create tool to see the status of the chip and possibly change single fuse field. And I plan to publish it here on github once it is at least a little presentable :-) |
OK, got it. |
Thanks for the response. I will look more into backend internals :-) |
Correction: When I dug a little bit deeper into my code, I noticed that the exception is being thrown by backend.read_device_id() not the backend.start_session(). So I can start the session with wrong device and then execute the code found in the read_device_id() minus the deviceId check:
|
Hi,
I'm talking about updi devices. Wouldn't it be nice to have an auto discovery of the updi device/target as long as we have the signature bytes?
Test case: I have two different boards, one has an atmega1609 and one has an atmega3209. The first one can support 1609, 3209 or 4809. The second one can have an 3209 or 4809. For the first board, I can stick of course to 1609, but there may be times that I will be force to put an 3209 or 4809 because of the availability.
Now, the pymcuprog is very happy to tell me that I'm wrong, and I use '-d atmega1609' but it have found an atmega3209. And quits. This is just useless. Useful is indeed when it tells me that the binary is too big for the target mcu found.
So, I'm thinking of a new switch, or just a new device like 'auto' or 'updi_auto' for these situations. I would like to be able to use such a thing:
pymcuprog -d auto write -f xyz.hex
pymcuprog -t uart -u com35 -d auto write -f xyz.hex
I'm aware that the nano kits already have a default target, so the '-d auto' will tell it that there is not the default target, but just 'ping' it and see what you find.
What do you think?
Thanks.
The text was updated successfully, but these errors were encountered: