Confirming AVR-GCC supports for AVR Sx Series

Aloysius Indrayanto aloysius.indrayanto@gmail.com
Mon Oct 27 00:32:30 GMT 2025


Hello,


> > However, the precompiled AVR-GCC 15.2.0 I downloaded from:
> >      https://github.com/ZakKemble/avr-gcc-build/releases
> > does not seem to include the necessary headers and libraries (*.h, *.o, and
> > *.a) for the AVR32SD28.
>
> There are provided by the to-be-released AVR-LibC v2.3. The news
>
> https://github.com/avrdudes/avr-libc/blob/main/NEWS.md
>
> mention AVR32SD28 under "Improvements and Additions".  So you could
> build AVR-LibC from GitHub main. There are build instructions:
>
> https://avrdudes.github.io/avr-libc/avr-libc-user-manual-2.3.0/install_tools.html#install_avr_libc
>
Ah yes:
   https://github.com/ZakKemble/avr-gcc-build/releases
comes bundled with AVR-LibC 2.2.1

As of today:
   https://github.com/avrdudes/avr-libc/releases
AVR-LibC 2.3 has not been officially released.

So I think I'll inspect the 2.3 tree first and either wait for the
official release or build directly from GIT.


> > Therefore I downloaded 'Microchip.AVR-Sx_DFP.1.1.17.atpack' from:
> >      https://packs.download.microchip.com
> > After extracting the file, I noticed that there is no gcc directory in the
> > package tree.
> >
>
> I'd rather use the device-specs from the compiler.
>
Alright.

I also think it would be interesting to check whether the Microchip
DFP can be modified to enable older versions of AVR-GCC to support the
AVR Sx series. I'll look into this as well.


> To date, the GNU tools treat the AVR-SD devices like and other AVR-xx.
>
That's good to hear.


> So my question is, what is the AVR-GCC equivalent for "mdevice=avr32sd28"
> and "-msafety-device-features"?

I'll check whether Microchip responds to this.


> The NOPs in the IVT are a result of -mrelax (you should rather -mrelax
> instead of -Wl,--relax).  The linker replaces JMP with RJMP if possible
> since that is shorter and faster.  As the IVT entries must be 4 bytes
> wide, there is a NOP after each RJMP in order to align the next RJMP.
> When these NOPs are not allowed on that device, then drop -mrelax.
>
Ah yes, because "-mrelax" does more than simply passing "-Wl,--relax"
to the linker.


> > the AVR32SD28's ERRCTRL module perpetually reset the MCU, mistaking it for
> > a fault condition?
Actually, not yet. I haven't uploaded anything to the MCU. I'm just
asking preemptively whether, based on existing knowledge, the
placement of extra NOPs could potentially cause issues. But I suppose
I'll need to test it on the actual device.


Thank you and best regards,
Aloysius


More information about the Gcc-help mailing list