[fpc-devel] Lazarus IDE / Packages - SetAlternativeCompile for Before and After

2018-09-09 Thread Mathias

Hello Lazarus team,

i build an AVR package for the Lazarus IDE.
It is absolutely necessary, that I can enter something with compiler 
commands, with "afterwards". There comes in an avrdude call.


This works, I made the following changes in Lazarus.
It would be nice who the Lazarus team could put this firmly in place.

Even more ingenious would be who you could even read it out, eg. with 
"GetAlternativeCompile"


The current state of my AVR package I have on GitHub. 
https://github.com/sechshelme/AVR-Lazarus/tree/master/AVR_Package




// === Lazarus 1.9.0 r58920M ===

   


  // components/ideintf/compoptsintf.pas: Zeile 454

  // old

 procedureSetAlternativeCompile(constCommand:string;
  ScanFPCMsgs:boolean); virtual; abstract;// disable normal compile and 
call this instead

  // new

 procedureSetAlternativeCompile(constCommand:string;
  ScanFPCMsgs:boolean; After:Boolean=False); virtual; abstract;// disable 
normal compile and call this instead

   

   


  // ide/compileroptions.pp: Zeile 499 + 3695

   


  // old
  


 procedureSetAlternativeCompile(constCommand:string;
  ScanFPCMsgs:boolean); override;

  .

  procedureTBaseCompilerOptions.SetAlternativeCompile(constCommand:string;

    ScanFPCMsgs:boolean);

  begin

    CompilerPath:='';

    ExecuteBefore.Command:=Command;

   ifScanFPCMsgsthen

      ExecuteBefore.Parsers.Text:=SubToolFPC+LineEnding+SubToolMake

   else

      ExecuteBefore.Parsers.Clear;

  end;

   


  // new

 procedureSetAlternativeCompile(constCommand:string;
  ScanFPCMsgs:boolean; After:Boolen); override;

  .

  procedureTBaseCompilerOptions.SetAlternativeCompile(constCommand:string;

    ScanFPCMsgs:boolean; After:Boolen);

  begin

    CompilerPath:='';

   


   ifAfterthenbegin

      ExecuteAfter.Command:=Command;

 ifScanFPCMsgsthen

        ExecuteAfter.Parsers.Text:=SubToolFPC+LineEnding+SubToolMake

 else

        ExecuteAfter.Parsers.Clear;

   endelsebegin

      ExecuteBefore.Command:=Command;

 ifScanFPCMsgsthen

        ExecuteBefore.Parsers.Text:=SubToolFPC+LineEnding+SubToolMake

 else

        ExecuteBefore.Parsers.Clear;

   end;

  end;

   


  // ide/project.pp: Zeile 551 + 6255

   


  // old

 procedureSetAlternativeCompile(constCommand:string;
  ScanFPCMsgs:boolean); override;

  .

  
procedureTProjectCompilerOptions.SetAlternativeCompile(constCommand:string;

    ScanFPCMsgs:boolean);

  begin

   inheritedSetAlternativeCompile(Command,ScanFPCMsgs);

    CompileReasons:=[];

  end;

   


  // new

 procedureSetAlternativeCompile(constCommand:string;
  ScanFPCMsgs:boolean; After:Boolean); override;

  .

  
procedureTProjectCompilerOptions.SetAlternativeCompile(constCommand:string;

    ScanFPCMsgs:boolean; After:Boolean);

  begin

   inheritedSetAlternativeCompile(Command,ScanFPCMsgs,After);

    CompileReasons:=[];

  end;

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


Re: [fpc-devel] Soft Float for AVR

2018-07-18 Thread Mathias

Hello

The AVR does not support floating-point numbers on the hardware side.
The ATtiny does not even support multiplications of Interger.
The ATMega supports least multiplications of integers.
Divisions do not support everyone.

This refers to the 8-bit AVR, as it looks with the others, I do not know.

mfg Mathias



Am 18.07.2018 um 14:33 schrieb Dimitrios Chr. Ioannidis via fpc-devel:

Hi,

  AFAIU, the AVR architecture doesn't support floating point variables.

  I want to ask if soft float support ( like ARM ) is planned. Does 
anyone work or plan to work on this ?


regards,



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


[fpc-devel] OpenGL 3.3 Core

2017-05-21 Thread Mathias
Is there an option with Lazarus own board means to activate the OpenGL 
3.3 core mode. Or is it enough for me to do the following?


  OpenGLControl.OpenGLMajorVersion := 3;
  OpenGLControl.OpenGLMinorVersion := 3;

Mfg Mathias


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


Re: [fpc-devel] Program too long ?

2016-01-14 Thread Mathias

The code is machine generated.
I wanted to test which compiler is faster, the. Of FPC or C ++
C ++ could compile the code without errors.

int main(){
  std::cout << 0 << std::endl;
  std::cout << 1 << std::endl;



mfg Mathias

Am 13.01.2016 um 23:19 schrieb Jonas Maebe:

On 13/01/16 23:01, Mathias wrote:

I wanted a test following compile 1'000'000x WriteLn.


It's not the program that's too long, but a single procedure that's 
too long. If you split it up in a 1000 (or maybe even a 100) 
procedures, it should compile fine.



Jonas

___
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


Re: [fpc-devel] Program too long ?

2016-01-14 Thread Mathias

I've split the code, as you said.
With the factor 1000, it did not err in within about 75s compiled.
The source had it about 1,000,000 rows. rows.

program test;

procedure p0;
begin
  WriteLn(0);
  WriteLn(1);
  WriteLn(2);
end;

procedure p1;
begin
  WriteLn(2);
  WriteLn(3);
  WriteLn(4);
end;

procedure p2;
begin
  WriteLn(4);
  WriteLn(5);
  WriteLn(6);
end;

begin
  p0;
  p1;
  p2;
end.

mfg Mathias


Am 14.01.2016 um 19:07 schrieb Jonas Maebe:


Whether or not it can be compiled is unrelated to the language of 
course, but to the compiler. We indeed only develop FPC for use with 
procedures that don't have an extreme size, because that way the 
compiler uses less memory and is faster. Since such massive routines 
are often indeed only present in case of machine-generated code, and 
since in that case you can usually easily adapt your generation to 
split up the code in multiple routines, there's not much incentive to 
change this (other than being able to say "yes, we can handle this"). 


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


[fpc-devel] Program too long ?

2016-01-13 Thread Mathias

I wanted a test following compile 1'000'000x WriteLn.

programProject1;

  begin

WriteLn(1);

WriteLn(2);

   // ...

WriteLn(100);

  end.

Then breaks the compiler from the following error.

$ fpc pascaltest.pas Free Pascal Compiler version 3.1.1 [2016/01/07] for 
x86_64 Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: 
Linux for x86-64 Compiling pascaltest.pas pascaltest.pas(7282,3) Fatal: 
Procedure too complex, it requires too many registers Fatal: Compilation 
aborted Error: /usr/bin/ppcx64 returned an error exitcode


WinXP:


fpc pascaltest.pas


Free Pascal Compiler version 3.0.0 [2015/12/07] for i386

Copyright (c) 1993-2015 by Florian Klaempfl and others

Target OS: Win32 for i386

Compiling pascaltest.pas

Fatal: No memory left

Error: c:\lazarus\fpc\3.0.0\bin\i386-win32\ppc386.exe returned an error 
exitcode





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


[fpc-devel] Type Helper and Array

2016-01-03 Thread Mathias

Does "Type Helper" only with standard types?
The class itself it compiles without errors.
But when you call, there is an error message.

See link, there the code and the problem is described. ("Illegal qualifier")

http://www.lazarusforum.de/viewtopic.php?f=10=9286

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


Re: [fpc-devel] Type Helper and Array

2016-01-03 Thread Mathias

Hello,

I have created a bug report.

http://mantis.freepascal.org/view.php?id=29321

mfg Mathias

Am 03.01.2016 um 14:46 schrieb Ondrej Pokorny:

On 03.01.2016 14:13, Sven Barth wrote:


Please report a bug with a simple example that should compile with 
the error message you get at http://bugs.freepascal.org as I don't 
see any difference between dynamic and static arrays in relation to 
type helpers (so probably merely an oversight of mine in the parser ^^).




In that case please write about it also here so that I can update 
CodeTools - they now work as FPC, i.e. they find helpers for dynamic 
arrays but not for static ones.


Ondrej
___
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