<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 7, 2024 at 8:15 PM Adriaan van Os via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Christo Crause via fpc-pascal wrote:<br>
<br>
> The level of support for AVR in 3.0.4 was rudimentary, only atmega128 is <br>
> supported in the MakeFIle.  The  support for AVR is still improving with <br>
> time so use either the development branch, or the latest release version <br>
> (if you prefer release versions).  The bootstrap compiler required is <br>
> determined by the source version, not the cross target.<br>
<br>
Thanks for the reply. With fpc-3.2.2 and<br>
<br>
make clean crossall FPC=/usr/local/lib/fpc/3.2.2/ppcx64 OS_TARGET=embedded CPU_TARGET=avr <br>
SUBARCH=avr5 BINUTILSPREFIX=avr- CROSSOPT="-O3 -XX -CX -v"<br>
<br>
I get an assembler error<br>
<br>
/Users/adriaan/fpc-3.2.2/compiler/ppcrossavr -Cpavr5 -Ur -Tembedded -Pavr -XPavr- -Xr -Ur -Xs -O2 <br>
-n -Fi../inc -Fi../avr -FE. -FU/Users/adriaan/fpc-3.2.2/rtl/units/avr-embedded -davr -dRELEASE -O3 <br>
-XX -CX -v  -Us -Sg system.pp @system.cfg<br>
/Users/adriaan/fpc-3.2.2/rtl/units/avr-embedded/system.s: Assembler messages:<br>
/Users/adriaan/fpc-3.2.2/rtl/units/avr-embedded/system.s:28783: Error: `)' required<br>
/Users/adriaan/fpc-3.2.2/rtl/units/avr-embedded/system.s:28783: Error: garbage at end of line<br>
<br>
where the offended assembly line in system.s reads<br>
<br>
ldi     r20,lo8(gs(FPC_FINALIZE)<br>
<br>
and avr-as was built from gnu-binutils version 2.17.<br>
<br>
Is there a minimal gnu-binutils version required ?<br>
<br>
Regards,<br>
<br>
Adriaan van Os<br></blockquote><div><br></div><div>The assembly line you showed above is obviously missing a closing parenthesis, so the error from avr-as is correct.  I tested building ppcrosssavr 3.2.2 with all your cross options and added -a to retain the generated assembler source. This worked fine and line 28783 from system.s has balanced parentheses: ldi r20,lo8(gs(FPC_FINALIZE))</div><div><br></div><div>Somehow that line got truncated when you were building the cross compiler, but I have no idea what could have caused that.</div><div><br></div><div>PS. My avr binutils version is 2.26 - old, but your version is about 10 years older still.<br></div></div></div>