pymcuprog icon indicating copy to clipboard operation
pymcuprog copied to clipboard

Feature request: a new generic device: 'auto' or 'auto_updi'

Open raimond opened this issue 3 years ago • 11 comments

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.

raimond avatar Dec 06 '21 06:12 raimond