Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-15 Thread Rainer Stratmann
Am Friday 15 March 2013 01:27:51 schrieb Roberto P.:
> Thanks a lot for your comments, very interesting indeed.
> Can you make a comparison against FPC target-embedded ?
FPC target-embedded is very complicated to install (Linux development 
computer).
> I routinely write in C for the microcontrollers I use, but now with ARM
> Cortex M3 I could try Pascal.
For 32 bit ARM I would try to use freepascal.
I got it work somehow.
> I'm just a little afraid of the potentially limited maturity of these.
What do you mean exactly with that?
> Thanks!
>
>   Roberto



Am Friday 15 March 2013 07:48:25 schrieb Michael Ring:
> I also like their products, especially the development boards are very
> well designed. The IDE+debugger is nice & complete and the support fo
> the software is also very good.
Yes, they are busy with that stuff. And have a relatively good marketing 
(important to earn money).
> The things I do not like are that you have to buy a license for each
> compiler family (PIC, PIC16, PIC 32, ARM),
...
> the compiler parser sometimes 
> is a little odd 
yes
> and, most important for me, they do not support objects 
> and have no plans to do so.
But for little projects (AVR 8 bit controllers) this is the best choice.
> When you can live without objects a good choice, when you need objects
> then freepascal is your choice.
In general for 32 bit ARM I would choose freepascal.
> Michael
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-15 Thread Roberto P.
2013/3/15 Rainer Stratmann 

> > Can you make a comparison against FPC target-embedded ?
> FPC target-embedded is very complicated to install (Linux development
> computer).
>

I'm on Win32 (or Win32 on Parallels on Max OS X); I'll have to dig more to
understand what is needed.


> For 32 bit ARM I would try to use freepascal.
> I got it work somehow.
>

any tip or guide would be appreciated, then.


> > I'm just a little afraid of the potentially limited maturity of these.
> What do you mean exactly with that?
>

I mean that (maybe) both FPC and mikroePascal are young products for the
embedded world, so that I might be facing compiler or  library propblems
during the devlopment, besides my own project problems.


> Am Friday 15 March 2013 07:48:25 schrieb Michael Ring:
> > I also like their products, especially the development boards are very
> > well designed. The IDE+debugger is nice & complete and the support fo
> > the software is also very good.
> Yes, they are busy with that stuff. And have a relatively good marketing
> (important to earn money).
>

That's a +1

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

Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-15 Thread Michael Ring
Lazarus & Freepascal work fine & native on both windows / mac, with 
retina display lazarus actually looks very good when you use a current 
snapshot.


mikropascal is windows only, when you only plan to use ARM then 
programming also works fine in a Parallels VM, when you plan to also 
target PIC/PIC32 you need a real windows computer because their 
pic-programmer does not work correctly atm in a Parallels VM.


Michael

Am 15.03.13 10:40, schrieb Roberto P.:
2013/3/15 Rainer Stratmann >


> Can you make a comparison against FPC target-embedded ?
FPC target-embedded is very complicated to install (Linux development
computer).


I'm on Win32 (or Win32 on Parallels on Max OS X); I'll have to dig 
more to understand what is needed.


For 32 bit ARM I would try to use freepascal.
I got it work somehow.


any tip or guide would be appreciated, then.

> I'm just a little afraid of the potentially limited maturity of
these.
What do you mean exactly with that?


I mean that (maybe) both FPC and mikroePascal are young products for 
the embedded world, so that I might be facing compiler or  library 
propblems during the devlopment, besides my own project problems.


Am Friday 15 March 2013 07:48:25 schrieb Michael Ring:
> I also like their products, especially the development boards
are very
> well designed. The IDE+debugger is nice & complete and the
support fo
> the software is also very good.
Yes, they are busy with that stuff. And have a relatively good
marketing
(important to earn money).


That's a +1
Roberto


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


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

Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-15 Thread Rainer Stratmann
Am Friday 15 March 2013 10:40:15 schrieb Roberto P.:
> 2013/3/15 Rainer Stratmann 
> > For 32 bit ARM I would try to use freepascal.
> > I got it work somehow.
>
> any tip or guide would be appreciated, then.

For me that is not easy. Most of the time I get it work somehow and shortly 
after I did not realize why ... :-)
I have suggestions to make something easier, but I am always facing excuses 
why it is good as it is, so I less take part of this type of discussions 
which are exhausting for me.

> > > I'm just a little afraid of the potentially limited maturity of these.
> >
> > What do you mean exactly with that?
>
> I mean that (maybe) both FPC and mikroePascal are young products for the
> embedded world, so that I might be facing compiler or  library propblems
> during the devlopment, besides my own project problems.

May be mikroe is not providing the sourcecode (I am not sure), but they have 
for nearly everything a solution. Ethernet, FAT, SPI, SD-Card, USB, HTTP, 
TCP, etc...
There were problems in the past, but because they are (heavily) busy with that 
stuff they solve most of the important problems. And I think they are honest.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FreeBSD failure compiling fpdoc 2.7.1

2013-03-15 Thread Graeme Geldenhuys
On 2013-03-04 18:20, Marco van de Voort wrote:
> 
> This is normal, pass  -Fl/usr/local/lib in opt (for releases, makepack from 
> fpcbuild does this)

Thanks, that worked. Now FPC 2.7.1 compiles without problems, and it
install fine [or so it appears].

Last night I wanted to test with FPC 2.7.1 again. So did the whole
"update from Trunk", rebuild and install. It all seems to have gone
well but I can't compile any of my projects with 2.7.1 (but I can
with 2.6.0).

In seems that the 'gmake install' doesn't install the *.a files that FPC
generates, so my apps fail to link. I did a comparison between my 2.7.1
and 2.6.0 (installed from official installer) directories. In 2.6.0 the
*.a files are found in the lib/fpc/2.6.0/... directories, but in 2.7.1
they are not (they only appear in the FPC 'src' directory tree).

Has the 'gmake install' changed in 2.7.1 compared to how it worked
before? Or is there again something special required for FreeBSD systems?

Here is my go.sh script I use to build and install FPC 2.7.1

8<-8<-8<-8<-8<
#!/usr/local/bin/bash

TARGET=x86_64-freebsd
COMPILER=/data/devel/fpc-2.6.0/$TARGET/bin/ppcx64

#gmake clean
gmake all -j 5 FPMAKEOPT="-T 8" FPC=$COMPILER
FPCOPT="-Fl/usr/local/lib/" OPT="-Fl/usr/local/lib/"
gmake install INSTALL_PREFIX=/data/devel/fpc-2.7.1/$TARGET/ FPC=$COMPILER

8<-8<-8<-8<-8<

Here is the compiler errors I get when trying to compile one of my apps
with 2.7.1

-
Free Pascal Compiler version 2.7.1 [2013/03/14] for x86_64
Copyright (c) 1993-2013 by Florian Klaempfl and others
Target OS: FreeBSD for x86-64
Compiling tiOPFUnitTestsFPGui.lpr
Compiling /data/devel/fpgui/src/corelib/fpg_base.pas
Compiling /data/devel/fpgui/src/corelib/x11/fpg_impl.pas
Compiling /data/devel/fpgui/src/corelib/fpg_main.pas
...snip...
Compiling /data/devel/tiopf/UnitTests/Tests/tiOPFAsqlite3_TST.pas
Compiling /data/devel/tiopf/UnitTests/Tests/tiOPFUIB_FB_TST.pas
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpsyncobjs.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpcontnrs.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpx.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpprocess.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpxlib.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpxutil.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpgettext.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdbugintf.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdbugmsg.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpsimpleipc.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libppipes.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpinifiles.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpzbase.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpzdeflate.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpzinflate.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libptrees.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpadler.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpinfblock.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpinfutil.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpinfcodes.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpinftrees.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpinffast.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpsqldb.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpibconnection.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdb.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpbufdataset.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpsqlscript.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpmaskutils.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdbconst.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpbufdataset_parser.a
not found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdbf_prscore.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdbf_prsdef.a not
found, Linking may fail !
tiOPFUnitTes

[fpc-pascal] Re: fcl-xml

2013-03-15 Thread Benito van der Zander
Hi, 

> What is the state of XPath?
> The readme says 'Should be fairly completed' - can I assume it works for 
> simple tasks?

If you need xpath, you might also want to look at my Internet Tools ( 
(http://benibela.de/sources_en.html#internettools), they contain a basically
complete XPath 2 implementation

Benito

  writes:

> 
> Hi,
> working with fcl-xml some questions came together. Every hint is appreciated.
> 
> 1.
> No matter what I do and which (short & valid) xml file I use - getElementById 
> is always nil (tested with trunk and latest stable 2.6.2) and the same 
> applies 
> to TXMLDocument.IDs.
> I tried with ReadXMLFile and TDOMParser with different options - but the 
> result is always the same.
> ...
> 
> Many thanks for any hint,
> d.l.i.w


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


Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-15 Thread Justin Smyth
I've tried to use mikropascal and not had any luck , i emailed them my board 
i was going to use with the product and they said they didnt support it.



I've now got a ST Link V2 for the debugging , if someone could give me an 
idea how to set it up  , i would be great full.


Kind Regards


Justin Smyth

-Original Message- 
From: Rainer Stratmann

Sent: Friday, March 15, 2013 9:30 PM
To: FPC-Pascal users discussions
Subject: Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

Am Friday 15 March 2013 10:40:15 schrieb Roberto P.:

2013/3/15 Rainer Stratmann 
> For 32 bit ARM I would try to use freepascal.
> I got it work somehow.

any tip or guide would be appreciated, then.


For me that is not easy. Most of the time I get it work somehow and shortly
after I did not realize why ... :-)
I have suggestions to make something easier, but I am always facing excuses
why it is good as it is, so I less take part of this type of discussions
which are exhausting for me.


> > I'm just a little afraid of the potentially limited maturity of these.
>
> What do you mean exactly with that?

I mean that (maybe) both FPC and mikroePascal are young products for the
embedded world, so that I might be facing compiler or  library propblems
during the devlopment, besides my own project problems.


May be mikroe is not providing the sourcecode (I am not sure), but they have
for nearly everything a solution. Ethernet, FAT, SPI, SD-Card, USB, HTTP,
TCP, etc...
There were problems in the past, but because they are (heavily) busy with 
that
stuff they solve most of the important problems. And I think they are 
honest.

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



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


RE: [fpc-pascal] FreeBSD failure compiling fpdoc 2.7.1

2013-03-15 Thread Pierre Free Pascal
> In seems that the 'gmake install' doesn't install the *.a files that FPC
> generates, so my apps fail to link. I did a comparison between my 2.7.1
> and 2.6.0 (installed from official installer) directories. In 2.6.0 the
> *.a files are found in the lib/fpc/2.6.0/... directories, but in 2.7.1
> they are not (they only appear in the FPC 'src' directory tree).
> 
> Has the 'gmake install' changed in 2.7.1 compared to how it worked
> before? Or is there again something special required for FreeBSD systems?

  Did you check what happens when you call
gmake install ?

 One of the problems I often get is that
I have a release compiler in the path.
In that case the outcome of 'fpc-iSOSP..'
is used to generated the sub-directory into which
the generated libraries will be stored...

So often I end up with
  BASE_271_DIR/lib/fpc/2.7.1
but also
  BASE_271_DIR/lib/fpc/2.6.0
which contains the newly installed linraries...

 I don't exactly know when, and when not,
this problem shows up.
  A good solution to avoid it is to put
your trunk compiler binary in the path before the release
compiler.

Pierre

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


Re: [fpc-pascal] FreeBSD failure compiling fpdoc 2.7.1

2013-03-15 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said:
> 
> #gmake clean
> gmake all -j 5 FPMAKEOPT="-T 8" FPC=$COMPILER
> FPCOPT="-Fl/usr/local/lib/" OPT="-Fl/usr/local/lib/"
> gmake install INSTALL_PREFIX=/data/devel/fpc-2.7.1/$TARGET/ FPC=$COMPILER

You install using the bootstrap compiler, not the generated one.

my script:

#!/usr/bin/env bash
# -dSHOWUSEDMEM  (this argument to the compiler)

ARCH=`uname -m`

echo ARCH is $ARCH

export ARGS="   -gl -viwn -Sg -Fl/usr/local/lib "

CPU_TARGET=i386
PP=ppcrel
NEWPP=ppc386
if [ $ARCH = "amd64" ] ; then
  CPU_TARGET=x86_64
  echo selecting 64 - bit
  PP=ppcrel_x64
  NEWPP=ppcx64 
  ARGS+=" -gw2"
fi

echo $CPU_TARGET

if [ $ARCH = "i386" ] ; then
  ARGS+="-Cppentium3 -gl  "
fi

cd ~/src/fpc
gmake -j 2 clean CPU_TARGET="$CPU_TARGET" PP=$PP OPT="$ARGS"  >& ~/cleanlog
gmake -j 2 all CPU_TARGET="$CPU_TARGET" PP=$PP OPT="$ARGS" >&  ~/buildlog
if [ ! $? = 0 ] ; then
 echo Build failed, again
else
 gmake install OPT="$ARGS" "CPU_TARGET=$CPU_TARGET" 
INSTALL_PREFIX=~/src/builded PP=~/src/fpc/compiler/$NEWPP >& ~/installog
 if [ ! $? = 0 ] ; then
  echo INSTALL failed | tee ~/outcome
 else
  echo Everything _should_ be fine.| tee ~/outcome
 fi
fi


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


Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-15 Thread Rainer Stratmann
What kind of controller? 
Atmel AVR 8 bit?
ARM 32 bit?

For AVR it works good.

Am Friday 15 March 2013 13:29:48 schrieb Justin Smyth:
> I've tried to use mikropascal and not had any luck , i emailed them my
> board i was going to use with the product and they said they didnt support
> it.
may be in the future...
>
>
> I've now got a ST Link V2 for the debugging , if someone could give me an
> idea how to set it up  , i would be great full.
>
> Kind Regards
>
>
> Justin Smyth
>
> -Original Message-
> From: Rainer Stratmann
> Sent: Friday, March 15, 2013 9:30 PM
> To: FPC-Pascal users discussions
> Subject: Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms
>
> Am Friday 15 March 2013 10:40:15 schrieb Roberto P.:
> > 2013/3/15 Rainer Stratmann 
> >
> > > For 32 bit ARM I would try to use freepascal.
> > > I got it work somehow.
> >
> > any tip or guide would be appreciated, then.
>
> For me that is not easy. Most of the time I get it work somehow and shortly
> after I did not realize why ... :-)
> I have suggestions to make something easier, but I am always facing excuses
> why it is good as it is, so I less take part of this type of discussions
> which are exhausting for me.
>
> > > > I'm just a little afraid of the potentially limited maturity of
> > > > these.
> > >
> > > What do you mean exactly with that?
> >
> > I mean that (maybe) both FPC and mikroePascal are young products for the
> > embedded world, so that I might be facing compiler or  library propblems
> > during the devlopment, besides my own project problems.
>
> May be mikroe is not providing the sourcecode (I am not sure), but they
> have for nearly everything a solution. Ethernet, FAT, SPI, SD-Card, USB,
> HTTP, TCP, etc...
> There were problems in the past, but because they are (heavily) busy with
> that
> stuff they solve most of the important problems. And I think they are
> honest.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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


Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-03-15 Thread Justin Smyth
I'm using a LPC 1343 Microcontroller unit from waveshare, basically its a 
Cortex M3.


the link for the board is - 
http://www.wvshare.com/product/Open1343-Package-A.htm


I've now got STLInk V2 debugging kit , i want to debug this board in lazarus


KInd Regards

Justin

-Original Message- 
From: Rainer Stratmann

Sent: Saturday, March 16, 2013 6:28 AM
To: FPC-Pascal users discussions
Subject: Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

What kind of controller?
Atmel AVR 8 bit?
ARM 32 bit?

For AVR it works good.

Am Friday 15 March 2013 13:29:48 schrieb Justin Smyth:

I've tried to use mikropascal and not had any luck , i emailed them my
board i was going to use with the product and they said they didnt support
it.

may be in the future...



I've now got a ST Link V2 for the debugging , if someone could give me an
idea how to set it up  , i would be great full.

Kind Regards


Justin Smyth

-Original Message-
From: Rainer Stratmann
Sent: Friday, March 15, 2013 9:30 PM
To: FPC-Pascal users discussions
Subject: Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

Am Friday 15 March 2013 10:40:15 schrieb Roberto P.:
> 2013/3/15 Rainer Stratmann 
>
> > For 32 bit ARM I would try to use freepascal.
> > I got it work somehow.
>
> any tip or guide would be appreciated, then.

For me that is not easy. Most of the time I get it work somehow and 
shortly

after I did not realize why ... :-)
I have suggestions to make something easier, but I am always facing 
excuses

why it is good as it is, so I less take part of this type of discussions
which are exhausting for me.

> > > I'm just a little afraid of the potentially limited maturity of
> > > these.
> >
> > What do you mean exactly with that?
>
> I mean that (maybe) both FPC and mikroePascal are young products for the
> embedded world, so that I might be facing compiler or  library propblems
> during the devlopment, besides my own project problems.

May be mikroe is not providing the sourcecode (I am not sure), but they
have for nearly everything a solution. Ethernet, FAT, SPI, SD-Card, USB,
HTTP, TCP, etc...
There were problems in the past, but because they are (heavily) busy with
that
stuff they solve most of the important problems. And I think they are
honest.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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



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



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


[fpc-pascal] a proposal about "with" syntax

2013-03-15 Thread Xiangrong Fang
Suppose I have the following class:

type
  TMyClass = class
  public
property Caption: string read FCaption write FCaption;
property Items[Index: Integer]: string read GetItem write SetItem;
default;
function Count: Integer;
  end;

I would like to do this:

with MyClassInstance as mci, SomethingElse do begin
  Caption := 'A new caption';
  for i := 0 to Count - 1 do
mci[i] := UpperCase(mci[i]);
end;

That is, to add an optional "as" clause to the with statement so that
access array element in a structure is made easier.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal