Closed MCUdude closed 3 years ago
...or make the 'at'-prefix optional on tiny and mega parts?
...or make the 'at'-prefix optional on tiny and mega parts?
Yes, even better!
be my guest 👍
...or make the 'at'-prefix optional on tiny and mega parts?
be my guest 👍
As a guy who has barely written python code, this may be a fun challenge.
I'll guess that device_name
in device.py is a string, and can be checked if it starts with at*
? If so, it looks like it's pretty straight forward to shave off these two characters and continue on with the process.
As I see it, there are two ways #73 could be solved. The first option is to make at* optional as I've done. The other option is to add "duplicates" to the DEVICES lists. What do you prefer @mraardvark?
optional works for me.
actually, i would also be happy to hard-rename the old ones to "correct" names, but i doubt users will like that...
(in the end, there will* be no more tiny/mega names coming out as all new parts start with "AVR", so at least this problem is not growing)
actually, i would also be happy to hard-rename the old ones to "correct" names, but i doubt users will like that...
We could #73 the other way around. Rename all targets to atmega and attiny, but still support mega and tiny. You're in charge!
yes, rename and pre-pend the AT.... but be careful not to prepend AT in front of the AVRxxD etc!
Only prepend if name starts with 'tiny' or 'mega'.
# Add add at* prefix if not present
if(device_name.startswith("tiny") or device_name.startswith("mega")):
device_name = "at" + device_name
insert slight delay due to Julelunsj...
Enjoy your meal! We're having julelønsj on Tuesday 😉
No problem - anything is possible with some ribbe... :) Actually this was requested by other users on another forum and was long overdue
For integration with other tools that uses avr-gcc and Avrdude (Like Arduino IDE and PlatformIO) would be great if pyupdi supported the same target names as avr-gcc and Avrdude uses.
In other words, it would be great if we also could refer to chips as
atmega4809
and not justmega4809
.As you can see in the PlatformIO configuration for pyupdi uploads below,
mega4809
actually has to be "manually" specified in the upload flags. It would be much more elegant if it could use the underlyingatmega4809
name instead so I could refer to the chip with${board_build.mcu}
instead.Would you accept a PR where "extra" attiny and atmega targets are added in device.py?