[fpc-devel] AVR target on trunk does not compile for me
Florian Klämpfl
florian at freepascal.org
Sat Jun 15 23:08:40 CEST 2019
Am 03.06.2019 um 12:00 schrieb Michael Ring:
> I set CROSSOPT to empty, after this change avr6 builds. BUT:
>
> What made me wonder was that avr5 builds fine, it should be affected by the same SOFTFPU issue.
>
> I did a quick grep through the fpc sources and found no obviously missing defines for avr6.
>
> However, a grep for avr revealed this code snippet in rtl/embedded/system.cfg:
>
> # AVR6 has normally more memory, so enable more functions
> #ifdef CPUAVR6
> -SfANSISTRINGS
> -SfWIDESTRINGS
> -SfDYNARRAYS
> -SfTHREADING
> -SfVARIANTS
> -SfOBJECTS
> -SfCOMMANDARGS
> -SfRANDOM
> -SfRESOURCES
> #endif
>
>
> The build works find with -g when I remove -SfVARIANTS
>
> I am also wondering if CPUAVR is set when CPUAVR6 is set (I guess so),
Yes.
> if this is true then -SfOBJECTS can also be
> removed from the CPUAVR6 Define as it is already in the CPUAVR define
This is true indeed.
>
> Last question: Is avr6 the only subarch that has enough memory for enabling strings? I am a Noob when it comes to avr,
> but I guess there should be more subarchs that have more memory, I today saw some ATTINY Chips with 32kB of Flash....
It depends on the particular controller type and it is a rough estimation when it should be enabled. In practice, one
should recompile the rtl with the needed settings.
More information about the fpc-devel
mailing list