You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to add support for the attiny202 and similar devices. It turns out avr-gcc doesn't recognize --mmcu=attiny202, and instead required me to use --mmcu=avrxmega3, which is the MCU's ISA.
Looking at the relevant avr-gcc manual, it seems to me that specifying the ISA is all that's needed. Allowing the user to specify the MCU model seems to be just a convenience, and was probably just forgotten in the case of the latest attiny devices.
Looking at what is actually changed between avr-specs, I believe it would be a lot easier to maintain at most 17 json spec files (the current number of ISAs), rather than one file per MCU.
The specs are only needed for the rustc target, and are currently decoupled from the device selection using features.
I can submit a PR with these changes, just please let me know if it makes sense.
The text was updated successfully, but these errors were encountered:
IIRC, this setting also influences which linker-script is used. As we don't currently specify one ourselves but instead rely on avr-gcc/avr-ld's linker scripts, this is important. The linker script will e.g. influence how much SRAM/FLASH space the program may fill.
This is an artifact of how the avr-device crate currently works. When our dependency on avr-libc is dropped (ref Rahix/avr-device#76), I think this will also not be relevant anymore. At that point, I think we'd also be able to do the change you propose.
I am trying to add support for the attiny202 and similar devices. It turns out avr-gcc doesn't recognize
--mmcu=attiny202
, and instead required me to use--mmcu=avrxmega3
, which is the MCU's ISA.Looking at the relevant avr-gcc manual, it seems to me that specifying the ISA is all that's needed. Allowing the user to specify the MCU model seems to be just a convenience, and was probably just forgotten in the case of the latest attiny devices.
Looking at what is actually changed between avr-specs, I believe it would be a lot easier to maintain at most 17 json spec files (the current number of ISAs), rather than one file per MCU.
The specs are only needed for the rustc target, and are currently decoupled from the device selection using
features
.I can submit a PR with these changes, just please let me know if it makes sense.
The text was updated successfully, but these errors were encountered: