ATTiny402 Microcontroller – How to Create a Hex File Using WinAVR

attinyavrmicrocontroller

I have written a code in the 'Programmer's Notepad' of winavr. But when I went to make the hex file, I didn't find the attiny402 microcontroller in 'mfile'.

enter image description here

Can anyone help me? Now, what should I do? it is very urgent for me.
thank you

Best Answer

Winavr has not been updated since 2010; the ATtiny402 was released in 2018. According to en.wikipedia.org/wiki/ATtiny_microcontroller_comparison_chart the ATtiny402 requires gcc arch id avrxmega3. So winavr will not be able to work. Check whether you have a new enough version of gcc to support ATtiny402 (avrxmega3), the version installed with winavr is probably out of date.