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), if this is true then -SfOBJECTS can also be removed from the CPUAVR6 Define as it is already in the CPUAVR define

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....

Michael


Am 03.06.19 um 10:37 schrieb Jeppe Johansen:

Probably because of the missing softfpu support. It's failing while writing debug info for floating point stuff in variants.

It will be fixed some day :)

On 6/2/19 10:54 PM, Michael Ring wrote:

Thank you, not using -gw2 did the trick for avr5.

Is this issue also known to you? I am trying to build avr6 support:

  BINUTILSPREFIX=avr- ; CROSSOPT="-O- -g -dDEBUG"
  SUBARCH=avr6
  make clean buildbase  CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=avr SUBARCH=$SUBARCH CROSSOPT="$CROSSOPT" BINUTILSPREFIX=$BINUTILSPREFIX OPT="-XR/Library/Developer/CommandLineTools//SDKs/MacOSX.sdk/" || exit 1   sudo make installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=avr SUBARCH=$SUBARCH CROSSOPT="$CROSSOPT" BINUTILSPREFIX=$BINUTILSPREFIX INSTALL_UNITDIR=/usr/local/lib/fpc/3.3.1/units/avr-embedded/$SUBARCH/rtl || exit 1

results in:

/bin/mkdir -p /Users/ring/devel/fpc-avr/rtl/units/avr-embedded
/Users/ring/devel/fpc-avr/compiler/ppcrossavr -Cpavr6 -Ur -Tembedded -Pavr -XPavr- -Xr -Ur -Xs -O2 -n -Fi../inc -Fi../avr -FE. -FU/Users/ring/devel/fpc-avr/rtl/units/avr-embedded -XR/Library/Developer/CommandLineTools//SDKs/MacOSX.sdk/ -davr -dRELEASE -O- -g -dDEBUG  -Us -Sg system.pp @system.cfg
system.pp(293,1) Fatal: Internal error -1413909275

Michael

Am 02.06.19 um 17:56 schrieb Christo Crause:

On Sun, Jun 2, 2019 at 4:51 PM Michael Ring <m...@michael-ring.org <mailto:m...@michael-ring.org>> wrote:

    I tried answering a question on the list today and to do so I
    did my
    'first time ever' compile of the avr target.

    This is how I tried to build the avr-embedded target on my Mac:

       SUBARCH=avr5; BINUTILSPREFIX=avr- ; CROSSOPT="-O- -gw2 -dDEBUG"
       make clean buildbase  CROSSINSTALL=1 OS_TARGET=embedded
    CPU_TARGET=avr SUBARCH=$SUBARCH CROSSOPT="$CROSSOPT"
    BINUTILSPREFIX=$BINUTILSPREFIX
    OPT="-XR/Library/Developer/CommandLineTools//SDKs/MacOSX.sdk/"
    || exit 1

    [snip]
    /Users/ring/devel/fpc-avr/rtl/units/avr-embedded/system.s:
    Assembler
    messages:
    /Users/ring/devel/fpc-avr/rtl/units/avr-embedded/system.s:90477:
    Error:
    value of 68582 too large for field of 2 bytes at 4713
    /Users/ring/devel/fpc-avr/rtl/units/avr-embedded/system.s:90485:
    Error:
    value of 68582 too large for field of 2 bytes at 4731


The compiler picks dwarf3 by default to avoid this type of problem, see also https://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg35438.html

Try building without specifying -gw2 in CROSSOPT.

_______________________________________________
fpc-devel maillist  -fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

_______________________________________________
fpc-devel maillist  -fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to