Re: [fpc-pascal] Re: Namespaces Support

2013-10-23 Thread Fabrício Srdic
Thanks a lot!


2013/10/23 leledumbo 

> > When the fpc 2.7.1 will be released?
>
> Since you ask this, obviously you don't understand fpc release engineering.
> This will enlighten you: http://www.freepascal.org/faq.var#versions
>
> And as an answer to your question: it will NEVER be released, not as 2.7.1,
> but probably as 2.8.0 or 3.0.0.
>
>
>
> --
> View this message in context:
> http://free-pascal-general.1045716.n5.nabble.com/Namespaces-Support-tp5717153p5717173.html
> Sent from the Free Pascal - General mailing list archive at Nabble.com.
> ___
> 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] Using arm-embedded-fpc

2013-10-23 Thread Florian Klämpfl
Am 23.10.2013 20:01, schrieb Michael Ring:
> This article describes what build-id does:
> 
> https://fedoraproject.org/wiki/Releases/FeatureBuildId
> 
> your fix should get applied to trunk, the gnu-build section should end
> up somewhere, best place is flash, it will not get used anyway.

Well, the best would be if it ended up nowhere because it eats only
flash memory.

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


Re: [fpc-pascal] Using arm-embedded-fpc

2013-10-23 Thread Koenraad Lelong

op 23-10-13 19:33, Michael Ring schreef:

I think I remember that we had a discussion on build-id before, it did
not work on linux but I thought that Florian has created a fix and I
think I have verified that it works after that on my linux system.

Are you on Linux? And using trunk compiler? If you do not use trunk then
please try to use it, hopefully the fix is in there.

Michael


Michael,

I downloaded it this morning, svn trunk. And I'm working on linux.
There was indeed a discussion (started jan 23, by me), but I never could 
compile an application, actually link the application, it was the same 
error. Today I looked into it again, and I hope I found a solution.


Regards,

Koenraad.

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


Re: [fpc-pascal] Using arm-embedded-fpc

2013-10-23 Thread Michael Ring

This article describes what build-id does:

https://fedoraproject.org/wiki/Releases/FeatureBuildId

your fix should get applied to trunk, the gnu-build section should end 
up somewhere, best place is flash, it will not get used anyway.


Michael


Am 23.10.13 19:33, schrieb Michael Ring:
I think I remember that we had a discussion on build-id before, it did 
not work on linux but I thought that Florian has created a fix and I 
think I have verified that it works after that on my linux system.


Are you on Linux? And using trunk compiler? If you do not use trunk 
then please try to use it, hopefully the fix is in there.


Michael


Am 23.10.13 17:58, schrieb Koenraad Lelong:

op 23-10-13 13:54, Jonas Maebe schreef:


On 23 Oct 2013, at 12:05, Koenraad Lelong wrote:


fpc@linux:~/src-arm-fpc> fpc -Parm -Tembedded -Wplpc2124 -sh tled1.pp
Free Pascal Compiler version 2.7.1 [2013/10/23] for arm
Copyright (c) 1993-2013 by Florian Klaempfl and others
Target OS: Embedded
Compiling tled1.pp
tled1.pp(54,4) Fatal: Can't open executable tled1.elf
Fatal: Compilation aborted
Error: /usr/bin/ppcrossarm returned an error exitcode (normal if you
did not specify a source file to be compiled)


Can you try again after applying the attached patch?


Jonas


Thanks Jonas,

Now I can use -sh. The resulting ppas.sh :

#!/bin/sh
DoExitAsm ()
{ echo "An error occurred while assembling $1"; exit 1; }
DoExitLink ()
{ echo "An error occurred while linking $1"; exit 1; }
echo Assembling program
/usr/bin/arm-embedded-as -mfpu=softvfp -o tled1.o tled1.s
if [ $? != 0 ]; then DoExitAsm program; fi
rm tled1.s
echo Linking tled1
OFS=$IFS
IFS="
"
/usr/bin/arm-embedded-ld -g  --build-id   --gc-sections  -L. -o 
tled1.elf -T link.res

if [ $? != 0 ]; then DoExitLink tled1; fi
IFS=$OFS
echo Linking tled1
OFS=$IFS
IFS="
"
/usr/bin/arm-embedded-objcopy -O ihex tled1.elf tled1.hex
if [ $? != 0 ]; then DoExitLink tled1; fi
IFS=$OFS

Tinkering with it I found --build-id gives my problem. If that is 
removed, there are no errors.

But I also analyzed link.res :
SEARCH_DIR("/usr/lib/fpc/2.7.1/units/arm-embedded/rtl/")
SEARCH_DIR("/usr/lib/fpc/2.7.1/")
INPUT (
tled1.o
/usr/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o
/usr/lib/fpc/2.7.1/units/arm-embedded/rtl/lpc21x4.o
)
ENTRY(_START)
MEMORY
{
flash : ORIGIN = 0x, LENGTH = 0x0004
ram : ORIGIN = 0x4000, LENGTH = 0x4000
}
_stack_top = 0x40004000;
SECTIONS
{
 .text :
{
_text_start = .;
KEEP(*(.init, .init.*))
*(.text, .text.*)
*(.strings)
*(.rodata, .rodata.*)
*(.comment)
_etext = .;
} >flash
.note.gnu.build-id : { *(.note.gnu.build-id) }
.data :
{
_data = .;
*(.data, .data.*)
KEEP (*(.fpc .fpc.n_version .fpc.n_links))
_edata = .;
} >ram AT >flash
.bss :
{
_bss_start = .;
*(.bss, .bss.*)
*(COMMON)
} >ram
. = ALIGN(4);
_bss_end = . ;
}
_end = .;


Deducing from the error-message :
/usr/bin/arm-embedded-ld: error: no memory region specified for 
loadable section `.note.gnu.build-id'


in ppas.sh I modified the line
.note.gnu.build-id : { *(.note.gnu.build-id) }
to
.note.gnu.build-id : { *(.note.gnu.build-id) } >flash

Then ppas.sh reports no errors.

I modified compiler/systems/t_embed.pas to have that line, and then 
the compilation of tled1 without -sh produces a tled1.elf. And the 
disassembled tled1.elf seems to be the program when comparing with a 
saved tled1.s.


So, is it safe to include that '>flash' to the linking script via the 
compiler ? Did I find a bug, or am I doing something wrong ?


Thanks for your support.

Koenraad

___
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] Using arm-embedded-fpc

2013-10-23 Thread Michael Ring
I think I remember that we had a discussion on build-id before, it did 
not work on linux but I thought that Florian has created a fix and I 
think I have verified that it works after that on my linux system.


Are you on Linux? And using trunk compiler? If you do not use trunk then 
please try to use it, hopefully the fix is in there.


Michael


Am 23.10.13 17:58, schrieb Koenraad Lelong:

op 23-10-13 13:54, Jonas Maebe schreef:


On 23 Oct 2013, at 12:05, Koenraad Lelong wrote:


fpc@linux:~/src-arm-fpc> fpc -Parm -Tembedded -Wplpc2124 -sh tled1.pp
Free Pascal Compiler version 2.7.1 [2013/10/23] for arm
Copyright (c) 1993-2013 by Florian Klaempfl and others
Target OS: Embedded
Compiling tled1.pp
tled1.pp(54,4) Fatal: Can't open executable tled1.elf
Fatal: Compilation aborted
Error: /usr/bin/ppcrossarm returned an error exitcode (normal if you
did not specify a source file to be compiled)


Can you try again after applying the attached patch?


Jonas


Thanks Jonas,

Now I can use -sh. The resulting ppas.sh :

#!/bin/sh
DoExitAsm ()
{ echo "An error occurred while assembling $1"; exit 1; }
DoExitLink ()
{ echo "An error occurred while linking $1"; exit 1; }
echo Assembling program
/usr/bin/arm-embedded-as -mfpu=softvfp -o tled1.o tled1.s
if [ $? != 0 ]; then DoExitAsm program; fi
rm tled1.s
echo Linking tled1
OFS=$IFS
IFS="
"
/usr/bin/arm-embedded-ld -g  --build-id   --gc-sections  -L. -o 
tled1.elf -T link.res

if [ $? != 0 ]; then DoExitLink tled1; fi
IFS=$OFS
echo Linking tled1
OFS=$IFS
IFS="
"
/usr/bin/arm-embedded-objcopy -O ihex tled1.elf tled1.hex
if [ $? != 0 ]; then DoExitLink tled1; fi
IFS=$OFS

Tinkering with it I found --build-id gives my problem. If that is 
removed, there are no errors.

But I also analyzed link.res :
SEARCH_DIR("/usr/lib/fpc/2.7.1/units/arm-embedded/rtl/")
SEARCH_DIR("/usr/lib/fpc/2.7.1/")
INPUT (
tled1.o
/usr/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o
/usr/lib/fpc/2.7.1/units/arm-embedded/rtl/lpc21x4.o
)
ENTRY(_START)
MEMORY
{
flash : ORIGIN = 0x, LENGTH = 0x0004
ram : ORIGIN = 0x4000, LENGTH = 0x4000
}
_stack_top = 0x40004000;
SECTIONS
{
 .text :
{
_text_start = .;
KEEP(*(.init, .init.*))
*(.text, .text.*)
*(.strings)
*(.rodata, .rodata.*)
*(.comment)
_etext = .;
} >flash
.note.gnu.build-id : { *(.note.gnu.build-id) }
.data :
{
_data = .;
*(.data, .data.*)
KEEP (*(.fpc .fpc.n_version .fpc.n_links))
_edata = .;
} >ram AT >flash
.bss :
{
_bss_start = .;
*(.bss, .bss.*)
*(COMMON)
} >ram
. = ALIGN(4);
_bss_end = . ;
}
_end = .;


Deducing from the error-message :
/usr/bin/arm-embedded-ld: error: no memory region specified for 
loadable section `.note.gnu.build-id'


in ppas.sh I modified the line
.note.gnu.build-id : { *(.note.gnu.build-id) }
to
.note.gnu.build-id : { *(.note.gnu.build-id) } >flash

Then ppas.sh reports no errors.

I modified compiler/systems/t_embed.pas to have that line, and then 
the compilation of tled1 without -sh produces a tled1.elf. And the 
disassembled tled1.elf seems to be the program when comparing with a 
saved tled1.s.


So, is it safe to include that '>flash' to the linking script via the 
compiler ? Did I find a bug, or am I doing something wrong ?


Thanks for your support.

Koenraad

___
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] Using arm-embedded-fpc

2013-10-23 Thread Jeppe Græsdal Johansen

Den 23-10-2013 13:15, Carsten Bager skrev:

Hi Carsten,

Unfortunately, my target will be STM32. I used the lpc to follow the
wiki. Once I get that working I hope the STM32 will be working also. And
I would like to use fpc 2.7.1 because I know that this version has
enhanced interrupt-handling. I mean, it's easy to use interrupts, at
least, I think, reading the sources of the cross-compiler. I once had a
working STM32 cross-compiler but there you had to be very carefull when
you defined interrupt-routines.

Thanks anyway.

Hi Koenraad
I always write interrupt handling in assembler and then (if necessary) call an 
normal pascal
procedure. This way I can controle how stack and memory issues are handled.
I find i hard to believe that the compiler 2.71 can fulfil all your needs in 
that area.
Regards
Carsten

It can. And quite elegantly if I should say so :)

It now uses weak linking. Try to take a look at some of the Cortex-M* 
targets. The ARM RTL's haven't been converted yet, but I see no reason 
why they shouldn't be upgraded either. The new solution saves space and 
basically can't get any more efficient.

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


[fpc-pascal] Re: Namespaces Support

2013-10-23 Thread leledumbo
> When the fpc 2.7.1 will be released?

Since you ask this, obviously you don't understand fpc release engineering.
This will enlighten you: http://www.freepascal.org/faq.var#versions

And as an answer to your question: it will NEVER be released, not as 2.7.1,
but probably as 2.8.0 or 3.0.0.



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Namespaces-Support-tp5717153p5717173.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Using arm-embedded-fpc

2013-10-23 Thread Koenraad Lelong

op 23-10-13 13:54, Jonas Maebe schreef:


On 23 Oct 2013, at 12:05, Koenraad Lelong wrote:


fpc@linux:~/src-arm-fpc> fpc -Parm -Tembedded -Wplpc2124 -sh tled1.pp
Free Pascal Compiler version 2.7.1 [2013/10/23] for arm
Copyright (c) 1993-2013 by Florian Klaempfl and others
Target OS: Embedded
Compiling tled1.pp
tled1.pp(54,4) Fatal: Can't open executable tled1.elf
Fatal: Compilation aborted
Error: /usr/bin/ppcrossarm returned an error exitcode (normal if you
did not specify a source file to be compiled)


Can you try again after applying the attached patch?


Jonas


Thanks Jonas,

Now I can use -sh. The resulting ppas.sh :

#!/bin/sh
DoExitAsm ()
{ echo "An error occurred while assembling $1"; exit 1; }
DoExitLink ()
{ echo "An error occurred while linking $1"; exit 1; }
echo Assembling program
/usr/bin/arm-embedded-as -mfpu=softvfp -o tled1.o tled1.s
if [ $? != 0 ]; then DoExitAsm program; fi
rm tled1.s
echo Linking tled1
OFS=$IFS
IFS="
"
/usr/bin/arm-embedded-ld -g  --build-id   --gc-sections  -L. -o 
tled1.elf -T link.res

if [ $? != 0 ]; then DoExitLink tled1; fi
IFS=$OFS
echo Linking tled1
OFS=$IFS
IFS="
"
/usr/bin/arm-embedded-objcopy -O ihex tled1.elf tled1.hex
if [ $? != 0 ]; then DoExitLink tled1; fi
IFS=$OFS

Tinkering with it I found --build-id gives my problem. If that is 
removed, there are no errors.

But I also analyzed link.res :
SEARCH_DIR("/usr/lib/fpc/2.7.1/units/arm-embedded/rtl/")
SEARCH_DIR("/usr/lib/fpc/2.7.1/")
INPUT (
tled1.o
/usr/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o
/usr/lib/fpc/2.7.1/units/arm-embedded/rtl/lpc21x4.o
)
ENTRY(_START)
MEMORY
{
flash : ORIGIN = 0x, LENGTH = 0x0004
ram : ORIGIN = 0x4000, LENGTH = 0x4000
}
_stack_top = 0x40004000;
SECTIONS
{
 .text :
{
_text_start = .;
KEEP(*(.init, .init.*))
*(.text, .text.*)
*(.strings)
*(.rodata, .rodata.*)
*(.comment)
_etext = .;
} >flash
.note.gnu.build-id : { *(.note.gnu.build-id) }
.data :
{
_data = .;
*(.data, .data.*)
KEEP (*(.fpc .fpc.n_version .fpc.n_links))
_edata = .;
} >ram AT >flash
.bss :
{
_bss_start = .;
*(.bss, .bss.*)
*(COMMON)
} >ram
. = ALIGN(4);
_bss_end = . ;
}
_end = .;


Deducing from the error-message :
/usr/bin/arm-embedded-ld: error: no memory region specified for loadable 
section `.note.gnu.build-id'


in ppas.sh I modified the line
.note.gnu.build-id : { *(.note.gnu.build-id) }
to
.note.gnu.build-id : { *(.note.gnu.build-id) } >flash

Then ppas.sh reports no errors.

I modified compiler/systems/t_embed.pas to have that line, and then the 
compilation of tled1 without -sh produces a tled1.elf. And the 
disassembled tled1.elf seems to be the program when comparing with a 
saved tled1.s.


So, is it safe to include that '>flash' to the linking script via the 
compiler ? Did I find a bug, or am I doing something wrong ?


Thanks for your support.

Koenraad

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


Re: [fpc-pascal] Namespaces Support

2013-10-23 Thread silvioprog
2013/10/23 Tomas Hajny 

>  On Wed, October 23, 2013 14:01, Michael Van Canneyt wrote:
>> > On Wed, 23 Oct 2013, Fabrício Srdic wrote:
>> >
>> >>
>> >> Thanks!
>> >>
>> >> When the fpc 2.7.1 will be released?
>> >
>> > Not in the near future. At least one more year, I suspect.
>>
>> Just for completeness sake (since you mentioned to be new with FPC) - you
>> may be able to use it earlier in the form of snapshots (see link
>> "Development" on our WWW page). Once the current trunk version (2.7.x)
>> will be released, it will have version 2.8.0 (releases have even numbers,
>> odd numbers are interim versions / snapshots).
>>
>> Tomas
>
>
Any sample showing how to use this feature?

-- 
Silvio Clécio
My public projects - github.com/silvioprog
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Namespaces Support

2013-10-23 Thread silvioprog
2013/10/23 Paul Ishenin 

>
> 23.10.2013 21:45, silvioprog пишет:
>
>>
>> Any sample showing how to use this feature?
>>
>>
> Either look at fpc tests:
>
> http://svn.freepascal.org/svn/**fpc/trunk/tests/test/**tdotunits1.pp
> http://svn.freepascal.org/svn/**fpc/trunk/tests/test/**tdotunits2.pp
> http://svn.freepascal.org/svn/**fpc/trunk/tests/test/**tdotunits3.pp
> http://svn.freepascal.org/svn/**fpc/trunk/tests/test/**tdotunits4.pp
>
> Or use google/yahoo/bing/yandex.
>
> Best regards,
> Paul Ishenin


Thank you very much!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Namespaces Support

2013-10-23 Thread Paul Ishenin

23.10.2013 11:12, Fabrício Srdic wrote:

Hello guys,

I'm new to free-pascal.

Will fpc 2.7.x have some namespace implementation/support?


Although you already got an answer please note that you can read about 
comming features on the following page:

http://wiki.lazarus.freepascal.org/FPC_New_Features_Trunk

Best regards,
Paul Ishenin
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Namespaces Support

2013-10-23 Thread Paul Ishenin


23.10.2013 21:45, silvioprog пишет:


Any sample showing how to use this feature?



Either look at fpc tests:

http://svn.freepascal.org/svn/fpc/trunk/tests/test/tdotunits1.pp
http://svn.freepascal.org/svn/fpc/trunk/tests/test/tdotunits2.pp
http://svn.freepascal.org/svn/fpc/trunk/tests/test/tdotunits3.pp
http://svn.freepascal.org/svn/fpc/trunk/tests/test/tdotunits4.pp

Or use google/yahoo/bing/yandex.

Best regards,
Paul Ishenin
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Namespaces Support

2013-10-23 Thread silvioprog
2013/10/23 Tomas Hajny 

> On Wed, October 23, 2013 14:01, Michael Van Canneyt wrote:
> > On Wed, 23 Oct 2013, Fabrício Srdic wrote:
> >
> >>
> >> Thanks!
> >>
> >> When the fpc 2.7.1 will be released?
> >
> > Not in the near future. At least one more year, I suspect.
>
> Just for completeness sake (since you mentioned to be new with FPC) - you
> may be able to use it earlier in the form of snapshots (see link
> "Development" on our WWW page). Once the current trunk version (2.7.x)
> will be released, it will have version 2.8.0 (releases have even numbers,
> odd numbers are interim versions / snapshots).
>
> Tomas
>

Any sample showing how to use it?

-- 
Silvio Clécio
My public projects - github.com/silvioprog
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Namespaces Support

2013-10-23 Thread Tomas Hajny
On Wed, October 23, 2013 14:01, Michael Van Canneyt wrote:
> On Wed, 23 Oct 2013, Fabrício Srdic wrote:
>
>>
>> Thanks!
>>
>> When the fpc 2.7.1 will be released?
>
> Not in the near future. At least one more year, I suspect.

Just for completeness sake (since you mentioned to be new with FPC) - you
may be able to use it earlier in the form of snapshots (see link
"Development" on our WWW page). Once the current trunk version (2.7.x)
will be released, it will have version 2.8.0 (releases have even numbers,
odd numbers are interim versions / snapshots).

Tomas


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


Re: [fpc-pascal] Namespaces Support

2013-10-23 Thread Michael Van Canneyt



On Wed, 23 Oct 2013, Fabrício Srdic wrote:



Thanks!

When the fpc 2.7.1 will be released?


Not in the near future. At least one more year, I suspect.

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

Re: [fpc-pascal] Using arm-embedded-fpc

2013-10-23 Thread Jonas Maebe


On 23 Oct 2013, at 12:05, Koenraad Lelong wrote:


fpc@linux:~/src-arm-fpc> fpc -Parm -Tembedded -Wplpc2124 -sh tled1.pp
Free Pascal Compiler version 2.7.1 [2013/10/23] for arm
Copyright (c) 1993-2013 by Florian Klaempfl and others
Target OS: Embedded
Compiling tled1.pp
tled1.pp(54,4) Fatal: Can't open executable tled1.elf
Fatal: Compilation aborted
Error: /usr/bin/ppcrossarm returned an error exitcode (normal if you  
did not specify a source file to be compiled)


Can you try again after applying the attached patch?


Jonas


embedded_nolink.patch
Description: Binary data


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

Re: [fpc-pascal] Namespaces Support

2013-10-23 Thread Fabrício Srdic
Thanks!

When the fpc 2.7.1 will be released?
Em 23/10/2013 09:34, "Michael Van Canneyt" 
escreveu:

>
>
> On Wed, 23 Oct 2013, Fabrício Srdic wrote:
>
>
>> But I have asked "will fpc 2.7.x have... "  ^^...
>>
>
> Yes, and I said: it is already implemented. Obviously, that means it is in
> 2.7.1.
>
>
>> It uses the Delphi style notation?
>>
>
> It does.
>
> Michael.
> ___
> 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] Namespaces Support

2013-10-23 Thread Michael Van Canneyt



On Wed, 23 Oct 2013, Fabrício Srdic wrote:



But I have asked "will fpc 2.7.x have... "  ^^...


Yes, and I said: it is already implemented. 
Obviously, that means it is in 2.7.1.




It uses the Delphi style notation?


It does.

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

Re: [fpc-pascal] Namespaces Support

2013-10-23 Thread Fabrício Srdic
But I have asked "will fpc 2.7.x have... "  ^^...

It uses the Delphi style notation?
 Em 23/10/2013 09:04, "Michael Van Canneyt" 
escreveu:

>
>
> On Wed, 23 Oct 2013, Fabrício Srdic wrote:
>
>
>> How it works?
>>
>> I have tried to use the Delphi style dotted unit notation but doesn't
>> work.
>> I'm using Lazarus 1.0.12 - fpc 2.6.2.
>>
>
> Aha: 2.6.2 - You write it :-)
>
> Support is in 2.7.1
>
> Michael.
> ___
> 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] Using arm-embedded-fpc

2013-10-23 Thread Carsten Bager
> Hi Carsten,
>
> Unfortunately, my target will be STM32. I used the lpc to follow the
> wiki. Once I get that working I hope the STM32 will be working also. And
> I would like to use fpc 2.7.1 because I know that this version has
> enhanced interrupt-handling. I mean, it's easy to use interrupts, at
> least, I think, reading the sources of the cross-compiler. I once had a
> working STM32 cross-compiler but there you had to be very carefull when
> you defined interrupt-routines.
>
> Thanks anyway.

Hi Koenraad
I always write interrupt handling in assembler and then (if necessary) call an 
normal pascal
procedure. This way I can controle how stack and memory issues are handled.
I find i hard to believe that the compiler 2.71 can fulfil all your needs in 
that area.
Regards
Carsten

Med venlig hilsen
Carsten Bager

BEAS A/S
Brørupvænget 10
DK-7650 Bøvlingbjerg
Tlf. : +45 9788 5222 Fax : +45 9788 5434
www.beas.dk


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


Re: [fpc-pascal] Namespaces Support

2013-10-23 Thread Michael Van Canneyt



On Wed, 23 Oct 2013, Fabrício Srdic wrote:



How it works?

I have tried to use the Delphi style dotted unit notation but doesn't work.
I'm using Lazarus 1.0.12 - fpc 2.6.2.


Aha: 2.6.2 - You write it :-)

Support is in 2.7.1

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

Re: [fpc-pascal] Namespaces Support

2013-10-23 Thread Fabrício Srdic
How it works?

I have tried to use the Delphi style dotted unit notation but doesn't work.
I'm using Lazarus 1.0.12 - fpc 2.6.2.

Thanks
 Em 23/10/2013 05:40, "Michael Van Canneyt" 
escreveu:

>
>
> On Wed, 23 Oct 2013, Fabrício Srdic wrote:
>
>  Hello guys,
>>
>> I'm new to free-pascal.
>>
>> Will fpc 2.7.x have some namespace implementation/support?
>>
>
> It already has.
>
> Michael.
> ___
> 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] Using arm-embedded-fpc

2013-10-23 Thread Koenraad Lelong

op 23-10-13 12:09, Carsten Bager schreef:

Have a look at this file
http://freepascal.dk/files/fpcarm7.tgz
This is a 2.05 compiler, but I am still using it in produktion.
This is an old package that uses LPC2138 as target.
Now a days we use LPC2368 and LPC 2387 as target.
The compiler produce good code.
Regards
Carsten


Hi Carsten,

Unfortunately, my target will be STM32. I used the lpc to follow the 
wiki. Once I get that working I hope the STM32 will be working also. And 
I would like to use fpc 2.7.1 because I know that this version has 
enhanced interrupt-handling. I mean, it's easy to use interrupts, at 
least, I think, reading the sources of the cross-compiler. I once had a 
working STM32 cross-compiler but there you had to be very carefull when 
you defined interrupt-routines.


Thanks anyway.

Koenraad Lelong.

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


Re: [fpc-pascal] Using arm-embedded-fpc

2013-10-23 Thread Carsten Bager
Have a look at this file
http://freepascal.dk/files/fpcarm7.tgz
This is a 2.05 compiler, but I am still using it in produktion.
This is an old package that uses LPC2138 as target.
Now a days we use LPC2368 and LPC 2387 as target.
The compiler produce good code.
Regards
Carsten


> On Wed, October 23, 2013 11:23, Koenraad Lelong wrote:
> > Hi,
> >
> > Searching the mail from this list it seems there are a number of people
> > that use fpc to compile for arm-embedded.
>  .
>  .
> > fpc@linux-npjb:~/src-arm-fpc> fpc -Parm -Tembedded -Wplpc2124 tled
> > Free Pascal Compiler version 2.7.1 [2013/10/23] for arm
> > Copyright (c) 1993-2013 by Florian Klaempfl and others
> > Target OS: Embedded
> > Compiling tled1.pp
> > Assembling program
> > Linking tled1
> > /usr/bin/arm-embedded-ld: error: no memory region specified for loadable
> > section `.note.gnu.build-id'
> > tled1.pp(54,4) Error: Error while linking
>  .
>  .
> > fpc@linux-npjb:~/src-arm-fpc> arm-embedded-ld link.res
> > fpc@linux-npjb:~/src-arm-fpc> ls -l
> > total 312
> > -rwxr-xr-x 1 fpc users 357294 okt 23 09:33 a.out
> > -rw-r--r-- 1 fpc users867 okt 23 09:31 link.res
> > -rw-r--r-- 1 fpc users   3164 okt 23 09:31 tled1.o
> > -rw-r--r-- 1 fpc users   1187 okt 23 08:55 tled1.pp
> >
> > That seems to work. Dissassembling a.out seems to produce a valid
> > assembly source. I also tried this with binutils-2.21.1 with the same
> > problem.
> > Is there a way to see what parameters fpc generates to invoke the linker ?
> 
> Are you aware of compiler option -s (or -sh, but that is the default for
> -s if I remember correctly)?
> 
> Tomas
> 
> 
> ___
> 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] Using arm-embedded-fpc

2013-10-23 Thread Koenraad Lelong

op 23-10-13 11:33, Tomas Hajny schreef:

On Wed, October 23, 2013 11:23, Koenraad Lelong wrote:

...


Are you aware of compiler option -s (or -sh, but that is the default for
-s if I remember correctly)?

Tomas


Hi Tomas,

fpc@linux:~/src-arm-fpc> fpc -Parm -Tembedded -Wplpc2124 -sh tled1.pp
Free Pascal Compiler version 2.7.1 [2013/10/23] for arm
Copyright (c) 1993-2013 by Florian Klaempfl and others
Target OS: Embedded
Compiling tled1.pp
tled1.pp(54,4) Fatal: Can't open executable tled1.elf
Fatal: Compilation aborted
Error: /usr/bin/ppcrossarm returned an error exitcode (normal if you did 
not specify a source file to be compiled)


fpc@linux:~/src-arm-fpc> ls -l
total 16
-rw-r--r-- 1 fpc users  867 okt 23 11:55 link.res
-rw-r--r-- 1 fpc users 1187 okt 23 10:33 tled1.pp
-rw-r--r-- 1 fpc users 4710 okt 23 11:55 tled1.s

tled1.s seems the assembly-file of the source. link.res is the same as 
the one I get when I don't use -sh.


Thanks anyway.

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


Re: [fpc-pascal] Using arm-embedded-fpc

2013-10-23 Thread Tomas Hajny
On Wed, October 23, 2013 11:23, Koenraad Lelong wrote:
> Hi,
>
> Searching the mail from this list it seems there are a number of people
> that use fpc to compile for arm-embedded.
 .
 .
> fpc@linux-npjb:~/src-arm-fpc> fpc -Parm -Tembedded -Wplpc2124 tled
> Free Pascal Compiler version 2.7.1 [2013/10/23] for arm
> Copyright (c) 1993-2013 by Florian Klaempfl and others
> Target OS: Embedded
> Compiling tled1.pp
> Assembling program
> Linking tled1
> /usr/bin/arm-embedded-ld: error: no memory region specified for loadable
> section `.note.gnu.build-id'
> tled1.pp(54,4) Error: Error while linking
 .
 .
> fpc@linux-npjb:~/src-arm-fpc> arm-embedded-ld link.res
> fpc@linux-npjb:~/src-arm-fpc> ls -l
> total 312
> -rwxr-xr-x 1 fpc users 357294 okt 23 09:33 a.out
> -rw-r--r-- 1 fpc users867 okt 23 09:31 link.res
> -rw-r--r-- 1 fpc users   3164 okt 23 09:31 tled1.o
> -rw-r--r-- 1 fpc users   1187 okt 23 08:55 tled1.pp
>
> That seems to work. Dissassembling a.out seems to produce a valid
> assembly source. I also tried this with binutils-2.21.1 with the same
> problem.
> Is there a way to see what parameters fpc generates to invoke the linker ?

Are you aware of compiler option -s (or -sh, but that is the default for
-s if I remember correctly)?

Tomas


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


[fpc-pascal] Using arm-embedded-fpc

2013-10-23 Thread Koenraad Lelong

Hi,

Searching the mail from this list it seems there are a number of people 
that use fpc to compile for arm-embedded.
I would like to do also, but I never managed to get a clean compiler. 
With this I mean I can make a cross-compiler now, but when I use it to 
make a program I get an error at the linking stage.
It is very frustrating that I seem to be the only one experiencing this, 
so I must be doing something wrong. This is what I do :
I have a 'virgin' virtual linux machine, opensuse 12.3, with fpc 2.6.2 
installed. I'm following the wiki :

http://wiki.freepascal.org/TARGET_Embedded

I have the sources of binutils-2.23.1. There I do :
./configure --target=arm-none-eabi --prefix=/usr 
--program-prefix=arm-embedded- --disable-werror

make
sudo make install

fpc@linux-npjb:~/binutils-2.23.1> arm-embedded-as -v
GNU assembler version 2.23.1 (arm-none-eabi) using BFD version (GNU 
Binutils) 2.23.1


I have fpc svn 25843 (downloaded today). There I do :

make clean
make buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm 
SUBARCH=armv4 CROSSOPT="-CfSoft" PREFIX=/usr
sudo make installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm 
SUBARCH=armv4 CROSSOPT="-CfSoft" PREFIX=/usr


As root I do :

cd /usr/bin
ln -s ../lib/fpc/2.7.1/ppcrossarm ppcrossarm

fpc@linux-npjb:~/src-arm-fpc> fpc -Parm -Tembedded -Wplpc2124 tled
Free Pascal Compiler version 2.7.1 [2013/10/23] for arm
Copyright (c) 1993-2013 by Florian Klaempfl and others
Target OS: Embedded
Compiling tled1.pp
Assembling program
Linking tled1
/usr/bin/arm-embedded-ld: error: no memory region specified for loadable 
section `.note.gnu.build-id'

tled1.pp(54,4) Error: Error while linking
tled1.pp(54,4) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcrossarm returned an error exitcode (normal if you did 
not specify a source file to be compiled)


fpc@linux-npjb:~/src-arm-fpc> cat link.res
SEARCH_DIR("/usr/lib/fpc/2.7.1/units/arm-embedded/rtl/")
SEARCH_DIR("/usr/lib/fpc/2.7.1/")
INPUT (
tled1.o
/usr/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o
/usr/lib/fpc/2.7.1/units/arm-embedded/rtl/lpc21x4.o
)
ENTRY(_START)
MEMORY
{
flash : ORIGIN = 0x, LENGTH = 0x0004
ram : ORIGIN = 0x4000, LENGTH = 0x4000
}
_stack_top = 0x40004000;
SECTIONS
{
 .text :
{
_text_start = .;
KEEP(*(.init, .init.*))
*(.text, .text.*)
*(.strings)
*(.rodata, .rodata.*)
*(.comment)
_etext = .;
} >flash
.note.gnu.build-id : { *(.note.gnu.build-id) }
.data :
{
_data = .;
*(.data, .data.*)
KEEP (*(.fpc .fpc.n_version .fpc.n_links))
_edata = .;
} >ram AT >flash
.bss :
{
_bss_start = .;
*(.bss, .bss.*)
*(COMMON)
} >ram
. = ALIGN(4);
_bss_end = . ;
}
_end = .;

When I do :
fpc@linux-npjb:~/src-arm-fpc> arm-embedded-ld link.res
fpc@linux-npjb:~/src-arm-fpc> ls -l
total 312
-rwxr-xr-x 1 fpc users 357294 okt 23 09:33 a.out
-rw-r--r-- 1 fpc users867 okt 23 09:31 link.res
-rw-r--r-- 1 fpc users   3164 okt 23 09:31 tled1.o
-rw-r--r-- 1 fpc users   1187 okt 23 08:55 tled1.pp

That seems to work. Dissassembling a.out seems to produce a valid 
assembly source. I also tried this with binutils-2.21.1 with the same 
problem.

Is there a way to see what parameters fpc generates to invoke the linker ?

I would be very gratefull when someone can pinpoint my error.

Thanks,

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


Re: [fpc-pascal] Lazarus and fpc trunk

2013-10-23 Thread Jonas Maebe


On 23 Oct 2013, at 08:29, LacaK wrote:

Hm , I do not know reason, but Lazarus snapshots at ftp://wiki.freepascal.org/pub/lazarus/snapshots/ 
 for Win32,64 with FPC 2.6.3, 2.7.1

are not updated more than month.


At least for Linux, there's currently the problem that linking cairo  
has been broken for a while. That hasn't been the case for more than a  
month though. You'll have to ask the Lazarus developers in any case.



Jonas

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


Re: [fpc-pascal] Namespaces Support

2013-10-23 Thread Michael Van Canneyt



On Wed, 23 Oct 2013, Fabrício Srdic wrote:


Hello guys,

I'm new to free-pascal.

Will fpc 2.7.x have some namespace implementation/support?


It already has.

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

[fpc-pascal] Namespaces Support

2013-10-23 Thread Fabrício Srdic
Hello guys,

I'm new to free-pascal.

Will fpc 2.7.x have some namespace implementation/support?

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

Re: [fpc-pascal] synapse + ssl on linux ,how to use libc

2013-10-23 Thread Tony Whyman
Dennis,

If you are looking for the FPC unit called "libc", on my system it is
(source code)

/usr/share/fpcsrc/2.6.2/packages/libc/src/libc.pp

 and comes with the warning

unit libc deprecated 'Unportable Kylix legacy unit that only exists on
Linux/x86. see http://wiki.freepascal.org/libc_unit ';

If you are looking for the underlying C library of that name, on my
Ubuntu 12.04 X64 system, its in

/lib/x86_64-linux-gnu/libc.so.6

Regards

Tony Whyman
MWA Software

P.S. Personally, I prefer the Indy components for Internet access.


On 22/10/13 10:14, Dennis Poon wrote:
> I need to use synapse + ssl on linux and it requires libc but I cannot
> locate this unit.
> Can anyone help?
>
>
> Also, has anyone used it before? Is it stable?
> I have been using lnet + ssl but it was unstable , so wanted to try
> synapse.
>
> Any comments are appreciated.
>
> Dennis
>
>
> ___
> 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