Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2017-12

Compiler error for target AVR - r37660

8 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Christo

After updating to svn r37660 I cannot compile an empty program for AVR target:

test.pp: program test; begin end.

Compile with ../compiler/ppcrossavr -Cpavr5 -Pavr -Wpatmega328p test.pp

test.pp(1,20) Fatal: Cannot find system type "variant". Check if you use the correct run time
library.

SVN r37659 is working for AVR.

Reply by email

Florian Klämpfl
to Christo
Christo wrote 10 lines
After updating to svn r37660 I cannot compile an empty program for AVR target: test.pp: program test; begin end. Compile with ../compiler/ppcrossavr -Cpavr5 -Pavr -Wpatmega328p test.pp test.pp(1,20) Fatal: Cannot find system type "variant". Check if you use the correct run time library. SVN r37659 is working for AVR.

Indeed, I have feature defines in my configs, then it works. Add for now

#ifdef CPUAVR
-SfOBJECTS
-SfEXCEPTIONS
-SfCLASSES
-SfRTTI
# AVR6 has normally more memory, so enable more functions #ifdef CPUAVR6
-SfANSISTRINGS
-SfWIDESTRINGS
-SfDYNARRAYS
-SfTHREADING
-SfVARIANTS
-SfOBJECTS
-SfCOMMANDARGS
-SfRANDOM
-SfRESOURCES
#endif
#endif

to your config. I am not sure how we can handle this, maybe the features should be stored in the system.ppu.

Reply by email

Christo
to Florian Klämpfl
Florian Klämpfl wrote 38 lines
Am 03.12.2017 um 13:51 schrieb Christo: > > After updating to svn r37660 I cannot compile an empty program for AVR target: > > test.pp: program test; begin end. > > Compile with ../compiler/ppcrossavr -Cpavr5 -Pavr -Wpatmega328p test.pp > > test.pp(1,20) Fatal: Cannot find system type "variant". Check if you use the correct run > time > library. > > SVN r37659 is working for AVR. Indeed, I have feature defines in my configs, then it works. Add for now #ifdef CPUAVR -SfOBJECTS -SfEXCEPTIONS -SfCLASSES -SfRTTI # AVR6 has normally more memory, so enable more functions #ifdef CPUAVR6 -SfANSISTRINGS -SfWIDESTRINGS -SfDYNARRAYS -SfTHREADING -SfVARIANTS -SfOBJECTS -SfCOMMANDARGS -SfRANDOM -SfRESOURCES #endif #endif to your config. I am not sure how we can handle this, maybe the features should be stored in the system.ppu.

I have added the defines above to my .fpc.cfg, recompiled latest trunk, but still get an error: ../compiler/ppcrossavr -Cpavr5 -dAVR -Wpatmega328p -vu test.pp  Error: Illegal parameter: AVR6 has normally more memory, so enable more functions

I guess I'm missing something?

Reply by email

Christo
to Christo
Christo wrote 47 lines
On Sun, 2017-12-03 at 19:03 +0100, Florian Klämpfl wrote: > > Am 03.12.2017 um 13:51 schrieb Christo: > > > > > > After updating to svn r37660 I cannot compile an empty program for AVR target: > > > > test.pp: program test; begin end. > > > > Compile with ../compiler/ppcrossavr -Cpavr5 -Pavr -Wpatmega328p test.pp > > > > test.pp(1,20) Fatal: Cannot find system type "variant". Check if you use the correct run > > time > > library. > > > > SVN r37659 is working for AVR. > Indeed, I have feature defines in my configs, then it works. Add for now > > #ifdef CPUAVR > -SfOBJECTS > -SfEXCEPTIONS > -SfCLASSES > -SfRTTI > # AVR6 has normally more memory, so enable more functions > #ifdef CPUAVR6 > -SfANSISTRINGS > -SfWIDESTRINGS > -SfDYNARRAYS > -SfTHREADING > -SfVARIANTS > -SfOBJECTS > -SfCOMMANDARGS > -SfRANDOM > -SfRESOURCES > #endif > #endif > > > to your config. I am not sure how we can handle this, maybe the features should be stored in > the > system.ppu. I have added the defines above to my .fpc.cfg, recompiled latest trunk, but still get an error: ../compiler/ppcrossavr -Cpavr5 -dAVR -Wpatmega328p -vu test.pp  Error: Illegal parameter: AVR6 has normally more memory, so enable more functions I guess I'm missing something?

OK, missed a comment marker in the config file which is now fixed. Now I get the origninal error
- Cannot find system type "variant"

Reply by email

Christo
to Florian Klämpfl: Indeed, I have feature defines in my configs, then it works. Add for now #ifdef CPUAVR…
Florian Klämpfl wrote 38 lines
Am 03.12.2017 um 13:51 schrieb Christo: > > After updating to svn r37660 I cannot compile an empty program for AVR target: > > test.pp: program test; begin end. > > Compile with ../compiler/ppcrossavr -Cpavr5 -Pavr -Wpatmega328p test.pp > > test.pp(1,20) Fatal: Cannot find system type "variant". Check if you use the correct run > time > library. > > SVN r37659 is working for AVR. Indeed, I have feature defines in my configs, then it works. Add for now #ifdef CPUAVR -SfOBJECTS -SfEXCEPTIONS -SfCLASSES -SfRTTI # AVR6 has normally more memory, so enable more functions #ifdef CPUAVR6 -SfANSISTRINGS -SfWIDESTRINGS -SfDYNARRAYS -SfTHREADING -SfVARIANTS -SfOBJECTS -SfCOMMANDARGS -SfRANDOM -SfRESOURCES #endif #endif to your config. I am not sure how we can handle this, maybe the features should be stored in the system.ppu.

I got the cross compiler working by explicitly disabling the VARIANTS feature by setting  -SfnoVARIANTS.  Not ideal, but works for now.

Reply by email

Florian Klämpfl
to Christo
Christo wrote 42 lines
On Sun, 2017-12-03 at 19:03 +0100, Florian Klämpfl wrote: > Am 03.12.2017 um 13:51 schrieb Christo: >> >> After updating to svn r37660 I cannot compile an empty program for AVR target: >> >> test.pp: program test; begin end. >> >> Compile with ../compiler/ppcrossavr -Cpavr5 -Pavr -Wpatmega328p test.pp >> >> test.pp(1,20) Fatal: Cannot find system type "variant". Check if you use the correct run >> time >> library. >> >> SVN r37659 is working for AVR. > Indeed, I have feature defines in my configs, then it works. Add for now > > #ifdef CPUAVR > -SfOBJECTS > -SfEXCEPTIONS > -SfCLASSES > -SfRTTI > # AVR6 has normally more memory, so enable more functions > #ifdef CPUAVR6 > -SfANSISTRINGS > -SfWIDESTRINGS > -SfDYNARRAYS > -SfTHREADING > -SfVARIANTS > -SfOBJECTS > -SfCOMMANDARGS > -SfRANDOM > -SfRESOURCES > #endif > #endif > > > to your config. I am not sure how we can handle this, maybe the features should be stored in > the > system.ppu. I got the cross compiler working by explicitly disabling the VARIANTS feature by setting  -SfnoVARIANTS.  Not ideal, but works for now.

Sorry, I forget that I have a -Sf- at the beginning. But regardless of this, I'll fix the initial issue asap.

Reply by email

Christo
to Florian Klämpfl
Florian Klämpfl wrote 9 lines
Am 04.12.2017 um 20:19 schrieb Christo: > > > > > > > I guess I'm missing something? > OK, missed a comment marker in the config file which is now fixed. Now I get the origninal > error > - Cannot find system type "variant" It should be fixed meanwhile.

Thanks Florian, I confirm that it is fixed in current trunk.

Reply by email