Re: [fpc-pascal] FPC attributes / annotations support

2017-11-28 Thread Graeme Geldenhuys

On 2017-11-27 21:39, Mattias Gaertner wrote:

Lazarus now supports attributes.


Awesome, thanks for the update.

[dreaming]
Now only if Lazarus could support the Delphi dcc32 compiler. ;-) Boy oh 
boy... I've been using Delphi XE3 for a month now (new job) - it is 
SH*T. Constant IDE crashes, online help doesn't work, the bug reporting 
dialog that pops up after a IDE crash doesn't work (the irony), code 
syntax check is broken, can't customise the shortcuts etc. I so miss 
Lazarus and FPC!

[/dreaming]

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] MSEide+MSEgui 4.6 for FPC 3.0.4

2017-11-28 Thread Martin Schreiber
On Sunday 26 November 2017 15:19:22 Andreas wrote:
> > The architecture of MSEgui would allow to make widgets for Android in RAD
> > style development, either ownerdrawn or wrapper for native widgets
> > with 'ifi'-data- and event-connections to the business logic in the
> > application.
>
> Today much of the maintenance at the client is done using netbooks. We
> wish to use cell phone exclusively. We have a large program base with
> many programs all written in FPC and/or Delphi. The company is migrating
> all FPC to Rad Studio 10.2 so that the same code base can be used when
> we migrate some of these programs to android.

What Delphi technologies do you use on Android? Firemonkey? What is missing in 
Free Pascal? Can you be more specific?
I doubt that the codebase of a desktop application can be used unchanged on a 
cellphone.

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

Re: [fpc-pascal] Is this the correct way to configure fpc for multiple arm-embedded subarchs?

2017-11-28 Thread Christo
On Sun, 2017-11-26 at 17:19 +0100, Michael Ring wrote:
> I am looking for an easy way to have all cortex-m compilers available
> at the same time to be able to do automated building/testing

There is a similar problem with the AVR target having several
subarchitectures.  One option I think is to have a subarch defined by
the compiler, then it would be easy to lay out the compiled unit
structure in fpc.cfg according to subarch.  I've made an attempt at
adding a subarch define to my local compiler source for AVR, but
haven't developed the idea further.  I'm not a compiler dev so there
may be better options.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is there a way to execute code after 'initialization' and before 'main', i. e. AddExitProc complement?

2017-11-28 Thread Christo Crause
On 28 Nov 2017 9:04 PM, "Роман via fpc-pascal" <
fpc-pascal@lists.freepascal.org> wrote:
> Can I run SortAndInitialize before 'main' without additional user actions?

Maybe not exactly what you want but you could probably add the
SortAndInitialize procedure to the initialization section of a new unit and
add this unit as the last unit to your program.

This use case is probably a good candidate for using the "section" modifier
to specify initialization sequence. Unfortunately not available in the
compiler for code sections AFAIK.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is there a way to execute code after 'initialization' and before 'main', i. e. AddExitProc complement?

2017-11-28 Thread Sven Barth via fpc-pascal
Am 28.11.2017 20:04 schrieb "Роман via fpc-pascal" <
fpc-pascal@lists.freepascal.org>:

'Initialization' sections are executed in poorly predictable order, so I
want to partially order them according to some form of explicit
prioritization and execute before control flow enters main block (so I
won't need to run all that initialization by hand, neither I would be able
to forget to do that).


If unit A uses unit B in the interface section then unit B's initialization
section is always run before A's. For the implementation section the same
holds true if there isn't a cycle otherwise it depends on the unit load
order.

Like:

unit UnitA;
...
procedure Init;

initialization
  RegisterUnit('UnitA', @Init);
end;

unit UnitB;
...
procedure Init;

initialization
  RegisterUnit('UnitB', @Init, {priority} +1);
end;

...
procedure SortAndInitialize;
...

Can I run SortAndInitialize before 'main' without additional user actions?


No, you can't.

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC attributes / annotations support

2017-11-28 Thread Mattias Gaertner
On Wed, 11 Oct 2017 17:13:31 +0200
Sven Barth via fpc-pascal  wrote:

> Am 11.10.2017 14:45 schrieb "Graeme Geldenhuys" <
> mailingli...@geldenhuys.co.uk>:
> >
> > Bringing a discussion from the Lazarus mailing list to here.
> >
> >
> > On 2017-09-24 09:13, Michael Van Canneyt via Lazarus wrote:  
> > > It's called Attributes. FPC has it too, but it is not yet in trunk.  
> >
> > Is there a timeline when FPC might support attributes/annotations in  
> trunk?
> 
> I do hope to look at it soonish(TM), but no real timeline. Hopefully before
> 3.2.0 :D

Lazarus now supports attributes.

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

[fpc-pascal] Is there a way to execute code after 'initialization' and before 'main', i. e. AddExitProc complement?

2017-11-28 Thread Роман via fpc-pascal
'Initialization' sections are executed in poorly predictable order, so I 
want to partially order them according to some form of explicit 
prioritization and execute before control flow enters main block (so I 
won't need to run all that initialization by hand, neither I would be 
able to forget to do that). Like:


unit UnitA;
...
procedure Init;

initialization
  RegisterUnit('UnitA', @Init);
end;

unit UnitB;
...
procedure Init;

initialization
  RegisterUnit('UnitB', @Init, {priority} +1);
end;

...
procedure SortAndInitialize;
...

Can I run SortAndInitialize before 'main' without additional user actions?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Is this the correct way to configure fpc for multiple arm-embedded subarchs?

2017-11-28 Thread Michael Ring
I am looking for an easy way to have all cortex-m compilers available at 
the same time to be able to do automated building/testing


Inspired by the -V parameter of fpc I started my journey and ended up 
with something different.


My question is now did I go down the correct path or is there a better 
way to fulfill my requirements:


- I want to be able to switch between armv6m, armv7m and armv7em without 
the need to build the matching compiler/rtl


- I want lazarus to use fpc as start compiler, I want to be able to 
configure the whole compiler switching via Project settings.


- I want to be able to use lazbuild so that I can do automated builds of 
my lazarus projects.


I found this helpful page:

http://wiki.freepascal.org/FPC_Version_Switcher#Setting_the_fpc_frontend_executable_path

but in the end this approach did not work for me, FPC version switcher 
is not available in lazarus svn (or I am too blind to find it) and in 
the end I had some issues with using lazbuild when defining the -V 
switch in my project settings.



In the end I came up with the following approach:

Build ppcrossarm and make sure that the rtls do end up in those directories:

/usr/local/lib/fpc/3.1.1/units/arm-embedded/armv6m/rtl
/usr/local/lib/fpc/3.1.1/units/arm-embedded/armv7m/rtl
/usr/local/lib/fpc/3.1.1/units/arm-embedded/armv7em/rtl

created a softlink so that the crosscompiler can be caled via 
/usr/local/bin/fpc


ln -sf /usr/local/lib/fpc/3.1.1/ppcrossarm /usr/local/bin/ppcarm

added the following to my /etc/fpc.cfg:

#ifdef embedded
-Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/$fpcsubarch/rtl
#endif

and then I add the following lines to the user-defined project settings 
in Lazarus:


-Cparmv7em
-XP/usr/local/bin/arm-none-eabi-
-Wpnucleof411re
-dnucleof411re

I thought about putting

-Fu/usr/local/lib/fpc/3.1.1/units/arm-embedded/armv7em/rtl

in the project Settings so that I do not need to tweak /etc/fpc.cfg but 
I do not like the fact that I have to hardcode paths there, is there a 
better way? If yes then I'd prefer that a lot over tweaking /etc/fpc.cfg



Michael

--

Here's how I build the cross-compiler:

SUBARCH=armv6m

#SUBARCH=armv7m

#SUBARCH=armv7em

make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm 
SUBARCH=$SUBARCH CROSSOPT="$CROSSOPT" BINUTILSPREFIX=arm-none-eabi- || 
exit 1
make installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm 
SUBARCH=$SUBARCH CROSSOPT="$CROSSOPT" BINUTILSPREFIX=arm-none-eabi- 
INSTALL_UNITDIR=/usr/local/lib/fpc/3.1.1/units/arm-embedded/$SUBARCH/rtl 
|| exit 1
cp /usr/local/lib/fpc/3.1.1/ppcrossarm 
/usr/local/lib/fpc/3.1.1/ppcrossarm-$SUBARCH


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

Re: [fpc-pascal] MSEide+MSEgui 4.6 for FPC 3.0.4

2017-11-28 Thread Andreas



On 25/11/2017 14:43, Martin Schreiber wrote:

On Saturday 25 November 2017 15:04:05 Andreas Berger wrote:

On the Android side I actually only need a graphical app with access to
the Bluetooth and possibly be a TCP client.


And why Free Pascal to develop the android application? What would be the
advantages instead to use the tools of the platform?

The architecture of MSEgui would allow to make widgets for Android in RAD
style development, either ownerdrawn or wrapper for native widgets
with 'ifi'-data- and event-connections to the business logic in the
application.

Today much of the maintenance at the client is done using netbooks. We 
wish to use cell phone exclusively. We have a large program base with 
many programs all written in FPC and/or Delphi. The company is migrating 
all FPC to Rad Studio 10.2 so that the same code base can be used when 
we migrate some of these programs to android. I would rather migrate our 
last delphi programs to FPC.

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

Re: [fpc-pascal] MSEide+MSEgui 4.6 for FPC 3.0.4

2017-11-28 Thread Andreas Berger



On 25/11/2017 14:43, Martin Schreiber wrote:

On Saturday 25 November 2017 15:04:05 Andreas Berger wrote:

On the Android side I actually only need a graphical app with access to
the Bluetooth and possibly be a TCP client.


And why Free Pascal to develop the android application? What would be the
advantages instead to use the tools of the platform?

The architecture of MSEgui would allow to make widgets for Android in RAD
style development, either ownerdrawn or wrapper for native widgets
with 'ifi'-data- and event-connections to the business logic in the
application.

Today much of the maintenance at the client is done using netbooks. We 
wish to use cell phone exclusively. We have a large program base with 
many programs all written in FPC and/or Delphi. The company is migrating 
all FPC to Rad Studio 10.2 so that the same code base can be used when 
we migrate some of these programs to android. I would rather migrate our 
last delphi programs to FPC.

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

Re: [fpc-pascal] OT: what happened with the Lazarus mailing list?

2017-11-28 Thread Marc Weustink

On 25-11-2017 09:29, Lubos Pintes wrote:

Hello,
I don't know if the problem is somewhere on my side, but the latest 
message in Lazarus mailing list on gmane.org is from November 17.
I also looked into web archive and the situation is the same. And I am 
unable to find more information about what happened.

Also tried to subscribe, but no reply from the server. So what happened?


Somehow mailman refused to distribute the mails. After a reboot is 
picked up its task :)


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