Re: [fpc-devel] Fix CamelCase in unit and method names

2018-03-22 Thread Paul Michell


On 22/03/18 15:53, Anthony Walter wrote:
Yes, I agree, both for unit names, but also for methods and arguments. 
The exceptions should be for code related that are imports or 
extensions of existing APIs, for example:


cairo_create should remain the same
glGenBuffersshould remain the same
gtk_window_newshould remain the same
dlopenshould remain the same

But in the RTL or LCL here are some of many pure pascal functions or 
procedures that could have their case changed:


abs should be Abs
arctanshould be ArcTan
getdirshould be GetDir
intpower should be IntPower
hexstr should be HexStr
strcan should be StrScan

And with RTL or LCL unit names:

keyboard should be Keyboard
math should be Math
strutils should be StrUtils
cthreads should be CThreads

Same applies to function/procedure/method arguments. If they're a pure 
pascal original, then arguments should be CamelCase. If they are part 
of an API imported, then they should remain the way the original API 
declares them.


IMO

I agree, pure Pascal should use CamelCase, otherwise we should follow 
the published API.  In all cases usage should follow the declaration.

I must have the same OCD variant too!
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] new features and facilities

2015-10-08 Thread Paul Michell

I'm in tomorrow, we can take a look then.

Kind regards,

Paul


On 08/10/15 14:33, Mohsen wrote:

Hi!
I wanna add new features and facilities to pascal like while - else, 
for - else and inline if statement like python.


examples

ex1:

I:=5;
while(I>0) do
  begin
 Write(I);
 I:=I-1;
 end else Write(' While Else ');

ex1-output:54321 While Else

ex2:

I:=5;
  while(I>0) do
  begin
 Write(I);
 Break;
  end else Write(' While Else ');

ex2-output:5


so i want you to help me how to implement  it.

thanks a million.
___
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] Embedded Strings on nRF51-DK

2015-04-29 Thread Paul Michell
On Wednesday 29 Apr 2015 09:15:12 Michael Ring wrote:
 One question, why do you enable flow control? Afaik the serial interface
 only uses rx/tx.

Due to ignorance!  I'm completely new to this type of work, so I am very much 
learning the subtleties of bare metal programming.  Any settings choices are 
simply reflections of the original C samples I am working from. I'll see if 
switching off flow control sorts out the corruption issue.

 It looks like you are on Linux, can you please install cgdb and make
 sure that you also have arm-none-eabi-gdb ?

Ok, I'll give gdb a try this afternoon.

Thanks,

Paul 

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


Re: [fpc-devel] Embedded Strings on nRF51-DK

2015-04-29 Thread Paul Michell
On Wednesday 29 Apr 2015 09:15:12 Michael Ring wrote:
 One question, why do you enable flow control? Afaik the serial interface
 only uses rx/tx.

That was it!  Removing flow control makes it work perfectly.

Thanks again,

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


Re: [fpc-devel] Embedded Strings on nRF51-DK

2015-04-28 Thread Paul Michell
 may switch to also try to do the project in fpc based
 on your results.
 
 
 Michael
 
 Am 18.04.15 um 11:16 schrieb Paul Michell:
  Michael
  
  Thanks for the offer of help.  I'm totally new to embedded work.  I am
  aware of the FPC embedded compiler target, but I don't yet understand 
  the nRF51 SDK enough to set up the required files.  I would like to move
  to this approach and I have read:
  
  http://wiki.freepascal.org/TARGET_Embedded
  
  What I am unsure about is how this would work with the RF/Bluetooth
  firmware of the nRF51.  I have deliberately been staying as close to the
  GCC method as possible so that I can use all of the SDK resources.  But
  if it is possible to use the target embedded approach that would be much
  better.
  
  I don't know what the chip's CMSIS data is.  I tried to google it and
  there is some mention of a 'SDK CMSIS pack' here:
  
  http://developer.nordicsemi.com/
  
  Does this tell you what needs to be known?  Would you need to produce a
  different controller definition for each SoftDevice configuration?
  
  If you think this is worth attempting I would be happy to help set this
  up.
  
  Kind regards,
  
  Paul
  
  On Friday 17 Apr 2015 08:44:55 Michael Ring wrote:
  I can generate the pascal unit for the nrf51 module from the CMSIS Data
  of this chip.
  
  Drop me a note if are you interested, this unit should make your life a
  lot easier.
  
  ___
  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

BuildFPC.3.1.1.Cross.Arm.Embedded.sh
Description: application/shellscript
Program test2;

Procedure MicrosecondsDelay(Count: LongWord); Inline; Assembler; NoStackFrame;
Asm
.Loop:
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  sub r0,r0,#1
  cmp r0, #0
  bne .Loop
End;

Procedure MillisecondsDelay(Count: LongWord); Inline;
Begin
  While Count0 Do
Begin
  MicrosecondsDelay(999);
  Dec(Count);
End;
End;

Procedure GPIOTogglePin(PinNumber: LongWord); Inline;
Var
  PinBit: LongWord;
Begin
  PinBit := LongWord(1) ShL PinNumber;
  If (GPIO.OUT And PinBit)=0 Then
GPIO.OUTSET := PinBit
  Else
GPIO.OUTCLR := PinBit;
End;

Const
  LED1 = 21;

Begin
  GPIO.PIN_CNF21_bits.SENSE := 0;
  GPIO.PIN_CNF21_bits.DRIVE := 0;
  GPIO.PIN_CNF21_bits.PULL := 0;
  GPIO.PIN_CNF21_bits.clearINPUT;
  GPIO.PIN_CNF21_bits.setDIR;
  While True Do
Begin
  GPIOTogglePin(LED1);
  MillisecondsDelay(1000);
End;
End.
Program test3;

Uses nRF51Utils;

Const
  LED1 = 21;

Begin
  GPIO.PIN_CNF21_bits.SENSE := 0;
  GPIO.PIN_CNF21_bits.DRIVE := 0;
  GPIO.PIN_CNF21_bits.PULL := 0;
  GPIO.PIN_CNF21_bits.clearINPUT;
  GPIO.PIN_CNF21_bits.setDIR;
  While True Do
Begin
  GPIOTogglePin(LED1);
  MillisecondsDelay(1000);
End;
End.
Unit nRF51Utils;

Interface

Procedure MicrosecondsDelay(Count: LongWord);
Procedure MillisecondsDelay(Count: LongWord);
Procedure GPIOTogglePin(PinNumber: LongWord);

Implementation

Procedure MicrosecondsDelay(Count: LongWord); Inline; Assembler; NoStackFrame;
Asm
.Loop:
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  nop
  sub r0,r0,#1
  cmp r0, #0
  bne .Loop
End;

Procedure MillisecondsDelay(Count: LongWord); Inline;
Begin
  While Count0 Do
Begin
  MicrosecondsDelay(999);
  Dec(Count);
End;
End;

Procedure GPIOTogglePin(PinNumber: LongWord); Inline;
Var
  PinBit: LongWord;
Begin
  PinBit := LongWord(1) ShL PinNumber;
  If (GPIO.OUT And PinBit)=0 Then
GPIO.OUTSET := PinBit
  Else
GPIO.OUTCLR := PinBit;
End;


End.

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


Re: [fpc-devel] Embedded Strings on nRF51-DK

2015-04-28 Thread Paul Michell
Apologies, my last email is a draft that I pressed send on by mistake!
I'll re-send it when I've completed my testing.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Embedded Strings on nRF51-DK

2015-04-28 Thread Paul Michell
Micheal,

I have started to encounter problems with the UART handling.  Test4 starts to 
add some program logic and construct debugging messages back through the UART 
functions.

The first problem is a corrupting of the system start message, although 
subsequent message output is fine?  This can be seen in the attached image.
Strangely, I have found by trial and error, that removing:

  GPIOOutputPin(TXDPinNumber);

from the UARTConfigure procedure (which is a line-for-line translation of the 
original GCC function) makes this issue go away!  I don't understand why this 
happens, nor if it is safe for me to leave out this line permanently from the 
procedure? 

Secondly, the run counter should be formatted by the string expression:

  MessageText := 'Run: '+IntToStr(RunCount)+#13#10;
  UARTSendString(MessageText);

All that is actually printed is the RunCount number.  This can also be seen in 
the screen shot.  I wonder if there is some aspect of the string handling that 
is still not being linked?  If so, would it be possible to fix this, as this 
sort of trivial text construction is a major benefit of Pascal over C.

I have also managed to get button input working and some initial success with 
using timer interrupts rather than the rather clumsy wait loops included in 
these tests.  At the moment this code still uses my old nRF51 header 
translation.  I will next work on converting these to use your header layout.  
I would be happy to post these here if anyone would like them?

After this I want to start looking at how to use the RF/Bluetooth softdevice, 
has anyone else tried this yet?

Thanks,

Paul 
 Program test4;

Uses Strings, SysUtils, nRF51Utils;

Const
  RXDPIN = 11;
  TXDPIN = 9;
  CTSPIN = 10;
  RTSPIN = 8;

Const
  LED1 = 21;
  LED2 = 22;
  LED3 = 23;
  LED4 = 24;

Var
  LEDsList: Array [1..4] Of LongWord = (LED1, LED2, LED4, LED3);
  Index: Integer;

Var
  MessageText: String;
  RunCount: Integer;

Begin
  UARTConfigure(UARTBaud38400, RTSPIN, TXDPIN, CTSPIN, RXDPIN, True);
  UARTSendString('System Started'#13#10);
  GPIOOutputPin(LED1);
  GPIOOutputPin(LED2);
  GPIOOutputPin(LED3);
  GPIOOutputPin(LED4);
  RunCount := 1;
  While True Do
Begin
  For Index := 1 To 4 Do
Begin
  GPIOTogglePin(LEDsList[Index]);
  GPIOTogglePin(LEDsList[1+(Index+1) Mod 4]);
  MillisecondsDelay(250);
End;
  MessageText := 'Run: '+IntToStr(RunCount)+#13#10;
  UARTSendString(MessageText);
  Inc(RunCount);
End;
End.
Unit nRF51Utils;

Interface

Type
  TGPIOPinPull = (NoPull := $00, PullDown := $01, PullUp := $03);

Function GPIOScanPin(PinNumber: LongWord): LongWord;
Procedure GPIOClearPin(PinNumber: LongWord);
Procedure GPIOInputPin(PinNumber: LongWord; PinPull: TGPIOPinPull);
Procedure GPIOOutputPin(PinNumber: LongWord);
Procedure GPIOSetPin(PinNumber: LongWord);
Procedure GPIOTogglePin(PinNumber: LongWord);
Procedure MicrosecondsDelay(Count: LongWord);
Procedure MillisecondsDelay(Count: LongWord);
Procedure UARTConfigure(BaudRate: LongWord; RTSPinNumber, TXDPinNumber, CTSPinNumber, RXDPinNumber: Byte; FlowControl: Boolean);
Procedure UARTSend(Value: Byte);
Procedure UARTSendChar(Value: Char);
Procedure UARTSendString(Const Text: String);
Procedure WaitForEvent;

Const
  UARTBaud1200 = $0004F000;
  UARTBaud2400 = $0009D000;
  UARTBaud4800 = $0013B000;
  UARTBaud9600 = $00275000;
  UARTBaud14400 = $003B;
  UARTBaud19200 = $004EA000;
  UARTBaud28800 = $0075F000;
  UARTBaud38400 = $009D5000;
  UARTBaud57600 = $00EBF000;
  UARTBaud76800 = $013A9000;
  UARTBaud115200 = $01D7E000;
  UARTBaud230400 = $03AFB000;
  UARTBaud25 = $0400;
  UARTBaud460800 = $075F7000;
  UARTBaud921600 = $0EBEDFA4;
  UARTBaud1M = $1000;

Implementation

Type
  TLongWordArray = Packed Array[0..32] Of LongWord;
  TLongWordArrayPointer = ^TLongWordArray;

Function GPIOScanPin(PinNumber: LongWord): LongWord; Inline;
Var
  PinBit: LongWord;
Begin
  PinBit := LongWord(1) ShL PinNumber;
  If (GPIO.IN And PinBit)=0 Then
Result := 0
  Else
Result := 1;
End;

Procedure GPIOClearPin(PinNumber: LongWord); Inline;
Var
  PinBit: LongWord;
Begin
  PinBit := LongWord(1) ShL PinNumber;
  GPIO.OUTCLR := PinBit;
End;

Procedure GPIOInputPin(PinNumber: LongWord; PinPull: TGPIOPinPull); Inline;
Var
  GPIO_PIN_CNF_bitsPointer: ^TGPIO_PIN_CNF_bits;
Begin
  GPIO_PIN_CNF_bitsPointer := Pointer(@TLongWordArrayPointer(@GPIO.PIN_CNF0)^[PinNumber]);
  With GPIO_PIN_CNF_bitsPointer^ Do
Begin
  SENSE := 0;
  DRIVE := 0;
  PULL := TBits_2(PinPull);
  setINPUT;
  clearDIR;
End;
End;

Procedure GPIOOutputPin(PinNumber: LongWord); Inline;
Var
  GPIO_PIN_CNF_bitsPointer: ^TGPIO_PIN_CNF_bits;
Begin
  GPIO_PIN_CNF_bitsPointer := Pointer(@TLongWordArrayPointer(@GPIO.PIN_CNF0)^[PinNumber]);
  With GPIO_PIN_CNF_bitsPointer^ Do
Begin
  SENSE := 0;
  DRIVE := 0;
  PULL := 0;
  clearINPUT;
  setDIR;
End;
End;

Procedure 

Re: [fpc-devel] Embedded Strings on nRF51-DK

2015-04-18 Thread Paul Michell
On Thursday 16 Apr 2015 19:21:50 Sven Barth wrote:
 Oh, so you're not letting FPC do the linking? If you'd have said that in
 your first mail then I could have told you as well that you need to have
 the system.o included.

Sorry for not being clear about that.  This is my first step into the embedded
world and I was trying to stay as close to the documented GCC process
as possible until I understand enough to choose otherwise.  I much prefer the
FPC build mechanism to editing makefiles so I would prefer to use that if I 
can.

 Alternatively you could also use the option -sh which will generate a
 linker script for the host system and adjust that to your needs (though
 you'd need to do that every time you compile the units).

I didn't know about -sh, that would be very useful in this context!
 
 This also means that probably AnsiString will also work if you have the
 system.o (though maybe you'll also require a memory manager unit; AFAIK
 embedded needs an extra unit for that).

OK, I'll give that a try as well.

Thanks again,

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


Re: [fpc-devel] Embedded Strings on nRF51-DK

2015-04-18 Thread Paul Michell
Georg

Thank you so much for the detailed response.  Your points were very
helpful.  I've answered your questions in-line below:

On Thursday 16 Apr 2015 19:38:56 Georg Hieber wrote:
 1) you write somewhere that you ported things from c, and your examples
 start as
function main: integer ...
 which looks to me exactly like int main().

It is! I did a direct translation of the C example 'main.c'.

 8) does your program have a program, i.e. a main file that adheres to
 the syntax
 
 program myprog
 declarations...
 begin
 statements
 end.

Not at the moment. I would like to be able to do that, but I wasn't sure what 
would be involved in moving over to the full embedded compiler target. The 
Nordic Semiconductor platform has firmware to support its RF/Bluetooth 
hardware which has to be flashed independently and then I think the linker 
then targets a different address for the program depending upon configuration.  
Until I properly understand this process I did not want to step too far from 
the supported GCC mechanism.  

 I hope what I wrote helps a little and does not bore too much,

Not at all,  thank you for sharing your insights.

Kind regards,

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


Re: [fpc-devel] Embedded Strings on nRF51-DK

2015-04-18 Thread Paul Michell
Michael

Thanks for the offer of help.  I'm totally new to embedded work.  I am aware 
of the FPC embedded compiler target, but I don't yet understand  the nRF51 SDK 
enough to set up the required files.  I would like to move to this approach 
and I have read: 

http://wiki.freepascal.org/TARGET_Embedded

What I am unsure about is how this would work with the RF/Bluetooth firmware 
of the nRF51.  I have deliberately been staying as close to the GCC method as 
possible so that I can use all of the SDK resources.  But if it is possible to 
use the target embedded approach that would be much better.

I don't know what the chip's CMSIS data is.  I tried to google it and there is 
some mention of a 'SDK CMSIS pack' here:

http://developer.nordicsemi.com/

Does this tell you what needs to be known?  Would you need to produce a 
different controller definition for each SoftDevice configuration?

If you think this is worth attempting I would be happy to help set this up.

Kind regards,

Paul

On Friday 17 Apr 2015 08:44:55 Michael Ring wrote:
 I can generate the pascal unit for the nrf51 module from the CMSIS Data
 of this chip.
 
 Drop me a note if are you interested, this unit should make your life a
 lot easier.

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


Re: [fpc-devel] Embedded Strings on nRF51-DK

2015-04-18 Thread Paul Michell
Jeppe

Thanks for the offer of help.  Michael Ring also offered, perhaps we can 
coordinate our efforts.

Kind regards,

Paul

 On Thursday 16 Apr 2015 20:29:40 Jeppe Johansen wrote:
 On 04/16/2015 12:49 PM, Paul Michell wrote:
  I assume this is because string handling support is not included in the
  embedded RTL generated with the compiler, or that I am not linking the
  right object files if I need to do this by hand?  What would be the best
  way to enable string handling? Even short string handling would make FPC
  far more preferable to C for me for embedded work.
 
 You would make it a whole lot easier for yourself if you just used the
 Embedded target and added an actual controller type for that specific
 microcontroller. Then you wouldn't need to play around with linker
 scripts and manually including and trimming RTL files.
 
 Adding the controller type is about 5-10 lines of code. Then the RTL
 unit can be a stub for now which basically just initializes .data and .bss.
 
 If you have the name of the controller I can add it?
 ___
 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


[fpc-devel] Embedded Strings on nRF51-DK

2015-04-16 Thread Paul Michell
Hello,

I'm using FPC to build embedded binaries for the Nordic Semiconductor nRF51-DK 
development board:

http://www.nordicsemi.com/eng/Products/nRF51-DK

I have been able to adapt the sample gcc make scripts to replace C units with 
equivalent pascal units after partially translating the header files from the 
SDK.  This has enabled me to build test applications to use the board's 
buttons, LEDs, UART and timers.

However, when I try to use pascal string variables (short or long) the 
compiler fails.  For example the following works:

Function Main: Integer; Cdecl; Alias: 'main';
Begin
  UARTConfigure(11, 9, 10, 8, True);
  UARTPutString('Hello World');
End;

But this fails:

Function Main: Integer; Cdecl; Alias: 'main';
Var
  Text: String;
Begin
  Text := 'Hello World';
  UARTConfigure(11, 9, 10, 8, True);
  UARTPutString(Text);
End;

With the following errors:

Main.pas:(.text.n_main_$$_main$$smallint+0xe): undefined reference to 
`fpc_pushexceptaddr'
Main.pas:(.text.n_main_$$_main$$smallint+0x12): undefined reference to 
`fpc_setjmp'
Main.pas:(.text.n_main_$$_main$$smallint+0x26): undefined reference to 
`fpc_shortstr_to_shortstr'
Main.pas:(.text.n_main_$$_main$$smallint+0x42): undefined reference to 
`fpc_shortstr_to_ansistr'
Main.pas:(.text.n_main_$$_main$$smallint+0x4e): undefined reference to 
`fpc_popaddrstack'
Main.pas:(.text.n_main_$$_main$$smallint+0x54): undefined reference to 
`fpc_ansistr_decr_ref'
Main.pas:(.text.n_main_$$_main$$smallint+0x64): undefined reference to 
`fpc_reraise'

I assume this is because string handling support is not included in the 
embedded RTL generated with the compiler, or that I am not linking the right 
object files if I need to do this by hand?  What would be the best way to 
enable string handling? Even short string handling would make FPC far more 
preferable to C for me for embedded work.

Thanks,

Paul Michell

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


Re: [fpc-devel] Embedded Strings on nRF51-DK

2015-04-16 Thread Paul Michell
On Thursday 16 Apr 2015 14:19:38 Sven Barth wrote:
 First of: I don't know whether non-Shortstrings are supported on embedded
 (I haven't played with that target yet). So my following tips are geared
 towards ShortString usage.
 
 Which compiler mode are you using? You should use either mode FPC or at
 most ObjFPC. Mode Delphi will switch on AnsiString. In any case you should
 ensure that you haven't enabled AnsiStrings using $H+ (simply disable the
 directive in that case).
 Additionally you could declare your String variables explicitly as
 ShortString instead of String.
 
 Regards,
 Sven

I've tried mode FPC and ObjFPC with both long and short strings.  I have just 
tried again with the ShortString type as well (I've included the whole main 
unit code below for reference).  

I suspect that I need to link additional object files that support the string 
handling, but I don't know which ones, nor if this is possible with the 
embedded compiler?

Thanks,

Paul


Unit Main;

{$Mode FPC}
{$LongStrings OFF}

Interface

Uses 
  NRF51, UART; 

Function Main: Integer; Cdecl;

Implementation

Function Main: Integer; Cdecl; Alias: 'main';
Const
  RXDPIN = 11;
  TXDPIN = 9;
  CTSPIN = 10;
  RTSPIN = 8;
Var
  Text: ShortString;
Begin
  Text := 'Hello World';
  UARTConfigure(RTSPIN, TXDPIN, CTSPIN, RXDPIN, True);
  UARTPutString(Text);
End;

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


Re: [fpc-devel] Embedded Strings on nRF51-DK

2015-04-16 Thread Paul Michell
On Thursday 16 Apr 2015 17:18:21 Sven Barth wrote:
 How about the unit UARTPutString is defined in? From the missing symbols
 you quoted earlier the compiler somewhere thinks that it needs to use an
 AnsiString and thus uses the corresponding functions which the linker the
 complains about.

Yes that helped; LongStrings were ON in the UART module.  When I  changed that 
to OFF, the error report changed to:

Main.pas:(.text.n_main_$$_main$$longint+0xa): undefined reference to 
`fpc_shortstr_to_shortstr'

Which suggested to me I needed to link the object containing 
fpc_shortstr_to_shortstr explicitly as I am using the gcc make file.
After a bit for searching I found the export in system.o which had been 
generated by the embedded compiler.  Adding this to the make file resolved the 
the remaining error.

Sven, thank you for pointing me in the right direction!

Kind regards,

Paul

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


Re: [fpc-devel] Has anyone tried building FPC on an Arietta G25?

2014-11-14 Thread Paul Michell
For anyone else looking at FPC on an Arietta G25 I have found the cause of my 
problems!

It turns out that although there is a swap partition in the standard SD image, 
it was not mounted
in fstab.  Once enabled, the standard build processes complete without issue.

I had hoped this might also explain the other issue with subversion but that 
problem still persists:

root@arietta:/media/data/freepascal/2.7.1# svn up
Ucompiler/globals.pas
Ucompiler/ogelf.pas
Ucompiler/i8086/cpuinfo.pas
Ucompiler/i386/cpuinfo.pas
Ucompiler/jvm/cpuinfo.pas
Ucompiler/x86_64/cpuinfo.pas
Ucompiler/ogbase.pas
Ucompiler/powerpc64/cpuinfo.pas
Ucompiler/utils/ppuutils/ppudump.pp
Ucompiler/pmodules.pas
Ucompiler/scanner.pas
Ucompiler/arm/cpuinfo.pas
Ucompiler/powerpc/cpuinfo.pas
Ucompiler/alpha/cpuinfo.pas
Ucompiler/nadd.pas
Ucompiler/sparc/cpuinfo.pas
Ucompiler/vis/cpuinfo.pas
Ucompiler/ia64/cpuinfo.pas
Ucompiler/options.pas
Ucompiler/m68k/cpuinfo.pas
Ucompiler/ninl.pas
Ucompiler/aarch64/cpuinfo.pas
Ucompiler/mips/cpuinfo.pas
Ucompiler/mips/cpuelf.pas
Ucompiler/generic/cpuinfo.pas
Ucompiler/avr/cpuinfo.pas
Ucompiler/ogcoff.pas
Upackages/ncurses/src/ncurses.pp
Upackages/fcl-db/examples/dbftool.lpr
Upackages/fcl-base/src/whtml.pp
Upackages/rtl-console/src/go32v2/mouse.pp
Urtl/netbsd/pmutext.inc
Urtl/netbsd/ptypes.inc
Urtl/netbsd/pthread.inc
Urtl/win/wininc/struct.inc
Urtl/linux/i386/syscall.inc
Urtl/unix/cthreads.pp
Urtl/unix/tthread.inc
svn: Can't open file 'packages/cocoaint/src/webkit/.svn/tmp/entries': Read-only 
file system
root@arietta:/media/data/freepascal/2.7.1# 
 
 
On Wednesday 12 Nov 2014 10:19:49 Paul Michell wrote:
 I have been trying to build FPC on an Arietta G25:
 
 http://www.acmesystems.it/arietta[1] 
 
 I have downloaded the stock arm 2.6.4 from here:
 
 ftp://gd.tuwien.ac.at/languages/pascal/fpc/dist/2.6.4/arm-linux/fpc-2.6.4.arm-linux.tar
 
 And the current source snapshot from here:
 
 ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/source/fpc.zip
 
 Incidentally, I have tried running subversion to fetch the current sources, 
 but subversion misbehaves on this platform
 and randomly crashes leaving the file system in an un-bootable state!  So to 
 work around this I have fallen back on
 using the snapshots for now.
 
 From the 2.6.4 files I have extracted the compiler and system files into a 
 seed folder and attempted to build FPC with:
 
 make clean all FPC=/media/data/freepascal/2.6.4-seed/ppcarm
 
 I have also tried cycling just the compiler with:
 
 make cycle FPC=/media/data/freepascal/2.6.4-seed/ppcarm
 
 However I start the build process, it always fails with an error 217, but not 
 always in the same place?  I have tried extending 
 the swap partition and also adding NO_UNIT_PROCESS OPT=-dNO_THREADING in case 
 there is a resource issue.
 
 The firsts iteration of the make cycle completes as I have a functional ppc1 
 in the compiler folder, so I assume that means I have all 
 of the right dependencies in place.  My last attempt fails at this point: 
 
 /bin/rm -f ppcarm
 /bin/mkdir -p arm/units/arm-linux
 /media/data/freepascal/fpc/compiler/ppc1 -Ur -Xs -O2 -n -Fuarm -Fusystems 
 -Fu/media/data/freepascal/fpc/rtl/units/arm-linux -Fiarm -FE. 
 -FUarm/units/arm-linux -dRELEASE -dNO_THREADING-darm -dGDB -dBROWSERLOG  
 -Sew pp.pas
 make[5]: *** [ppcarm] Error 217
 make[5]: Leaving directory `/media/data/freepascal/fpc/compiler'
 make[4]: *** [next] Error 2
 make[4]: Leaving directory `/media/data/freepascal/fpc/compiler'
 make[3]: *** [ppc2] Error 2
 make[3]: Leaving directory `/media/data/freepascal/fpc/compiler'
 make[2]: *** [cycle] Error 2
 make[2]: Leaving directory `/media/data/freepascal/fpc/compiler'
 make[1]: *** [compiler_cycle] Error 2
 make[1]: Leaving directory `/media/data/freepascal/fpc'
 make: *** [build-stamp.arm-linux] Error 2
 
 What does error 217 mean and does anyone have any suggestions as to how I can 
 move passed this?
 
 Thanks,
 
 Paul Michell
 
 
 
 [1] http://www.acmesystems.it/arietta

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


[fpc-devel] Has anyone tried building FPC on an Arietta G25?

2014-11-12 Thread Paul Michell
I have been trying to build FPC on an Arietta G25:

http://www.acmesystems.it/arietta[1] 

I have downloaded the stock arm 2.6.4 from here:

ftp://gd.tuwien.ac.at/languages/pascal/fpc/dist/2.6.4/arm-linux/fpc-2.6.4.arm-linux.tar

And the current source snapshot from here:

ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/source/fpc.zip

Incidentally, I have tried running subversion to fetch the current sources, but 
subversion misbehaves on this platform
and randomly crashes leaving the file system in an un-bootable state!  So to 
work around this I have fallen back on
using the snapshots for now.

From the 2.6.4 files I have extracted the compiler and system files into a 
seed folder and attempted to build FPC with:

make clean all FPC=/media/data/freepascal/2.6.4-seed/ppcarm

I have also tried cycling just the compiler with:

make cycle FPC=/media/data/freepascal/2.6.4-seed/ppcarm

However I start the build process, it always fails with an error 217, but not 
always in the same place?  I have tried extending 
the swap partition and also adding NO_UNIT_PROCESS OPT=-dNO_THREADING in case 
there is a resource issue.

The firsts iteration of the make cycle completes as I have a functional ppc1 in 
the compiler folder, so I assume that means I have all 
of the right dependencies in place.  My last attempt fails at this point: 

/bin/rm -f ppcarm
/bin/mkdir -p arm/units/arm-linux
/media/data/freepascal/fpc/compiler/ppc1 -Ur -Xs -O2 -n -Fuarm -Fusystems 
-Fu/media/data/freepascal/fpc/rtl/units/arm-linux -Fiarm -FE. 
-FUarm/units/arm-linux -dRELEASE -dNO_THREADING-darm -dGDB -dBROWSERLOG  
-Sew pp.pas
make[5]: *** [ppcarm] Error 217
make[5]: Leaving directory `/media/data/freepascal/fpc/compiler'
make[4]: *** [next] Error 2
make[4]: Leaving directory `/media/data/freepascal/fpc/compiler'
make[3]: *** [ppc2] Error 2
make[3]: Leaving directory `/media/data/freepascal/fpc/compiler'
make[2]: *** [cycle] Error 2
make[2]: Leaving directory `/media/data/freepascal/fpc/compiler'
make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory `/media/data/freepascal/fpc'
make: *** [build-stamp.arm-linux] Error 2

What does error 217 mean and does anyone have any suggestions as to how I can 
move passed this?

Thanks,

Paul Michell



[1] http://www.acmesystems.it/arietta
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-21 Thread Paul Michell
On Tuesday 21 Oct 2014 09:31:42 peter green wrote:
 Ok, i've just uploaded 2.6.4
 
 https://archive.raspbian.org/raspbian/pool/main/f/fpc/

Thank you, how am I best to install this?

I naively thought that would update the version installed
when you perform:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fpc

When I do this on a completely clean 2014-09-09-wheezy-raspbian I get:

Reading package lists... Done
Building dependency tree   
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 fpc : Depends: fpc-2.6.0 (= 2.6.0-9+rpi1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Do I need to upgrade to Jessie, or do the packages have to be 
installed by hand?

Thanks,

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-21 Thread Paul Michell
On Tuesday 21 Oct 2014 13:45:25 John Lee wrote:
 Don't know why you have this problem with wheezy, but can confirm I'm
 running rpi jessie, and the 'sudo' sequence above works for me ok ie does
 70Mbyte download  installs fpc with no errors. Haven't really tested it,
 but help says it is 2.6.2 -8 rpil+b2 2014/7/21 for arm.
 
 john

I have just done a dist-upgrade and tried again and as you say, I now
have an installed 2.6.2.  So it would seem FPC is currently broken on
stable Raspbian which is a pity.

I'll see if I have any better luck compiling trunk now!

Thanks John


 On 21 October 2014 12:58, Paul Michell p...@michellcomputing.co.uk wrote:
 
  On Tuesday 21 Oct 2014 09:31:42 peter green wrote:
   Ok, i've just uploaded 2.6.4
  
   https://archive.raspbian.org/raspbian/pool/main/f/fpc/
 
  Thank you, how am I best to install this?
 
  I naively thought that would update the version installed
  when you perform:
 
  sudo apt-get update
  sudo apt-get upgrade
  sudo apt-get install fpc
 
  When I do this on a completely clean 2014-09-09-wheezy-raspbian I get:
 
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  Some packages could not be installed. This may mean that you have
  requested an impossible situation or if you are using the unstable
  distribution that some required packages have not yet been created
  or been moved out of Incoming.
  The following information may help to resolve the situation:
 
  The following packages have unmet dependencies:
   fpc : Depends: fpc-2.6.0 (= 2.6.0-9+rpi1) but it is not going to be
  installed
  E: Unable to correct problems, you have held broken packages.
 
  Do I need to upgrade to Jessie, or do the packages have to be
  installed by hand?
 
  Thanks,
 
  Paul
  ___
  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] Building 2.7.1 on current Raspbian fails

2014-10-20 Thread Paul Michell
On Friday 17 Oct 2014 23:02:29 John Lee wrote:
 Looks as if you have a working fpc 2.7.1 snapshot for rpi. IAre you
 planning to make this available on your web site? If not, can you zip pls
 it, and put it on cloud or some ftp site - I'll then put it on fpc ftp site.

John

I was intending to publish the build process on my blog once I was confident it 
really was a properly working snapshot.  I would be happy to make a binary 
available
as well.  However, there is a lot more to getting this right than first meets 
the eye!

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-20 Thread Paul Michell
On Saturday 18 Oct 2014 12:12:26 Marco van de Voort wrote:
...
 (fpdoc requiring crt*)
 
 crt* files are part of build-essentials and are basically *nix binary
 startup code.
 
 Most binaries don't need them, since they use RTL supplied versions of these
 startup files for pascal-only programs. Only when a program links to libc
 this changes.
 
 Currently fpdoc can optionally use (c)threads (recommended for lcl.chm
 building, halving the time almost), and has some characterset support
 (cwstrings), both of which require libc.
 
 If this for any reason is not convenient, try to comment cwstring, in the
 uses list of fpdoc.

Thanks Marco,

Ideally, I would like to establish a build process that doesn't require any
changes to the FPC codebase.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-20 Thread Paul Michell
On Sunday 19 Oct 2014 02:32:49 peter green wrote:
 Paul Michell wrote:
  I'm currently trying to build 2.7.1 from SVN on the latest Raspbian 
  (2014-09-09).
  I've previously built this with either 2.6.0 from the repository, or with 
  Thaddy de Koning's build from March 2014.
 
  Currently, neither of these will build 2.7.1 on a Raspberry Pi.  So I have 
  also tried with the generic arm-linux
  release archive (fpc-2.6.4.arm-linux.tar).  This installed without error 
  and I can compile projects on the Pi with it.

 What errors are you getting when you try to build with the fpc from the 
 repository.

I'm sorry, I didn't record them at the time. I will need to re-run it later 
this week to find out.
 
 Have you tried the 2.6.2 version from raspbian jessie?

No, I thought 2.6.0 was the latest FPC on raspbian?

 I should probablly get arround to doing a raspbian version of 2.6.4.

Yes please :)

  However, when trying to build 2.7.1 (make all) it creates a compiler 
  binary, but fails whilst compiling fpmake.  
  This looks similar to the bug 0024056 which is flagged as resolved.  The 
  solution suggested there is to install 
  build-essential, but this is installed by default on Raspbian, so I think 
  there must be something else wrong? 
 Most likely you are trying to build an armel compiler rather than an 
 armhf one.

Yes you are right, it does produce armel by default

 It may be possible to bootstrap an armhf compiler off an armel one with 
 the right settings but it's something I haven't tried in a while.

That is what I was intending to try. 
Previously I have used Thaddy's armhf build as my seed compiler.


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


[fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Paul Michell
I'm currently trying to build 2.7.1 from SVN on the latest Raspbian 
(2014-09-09).
I've previously built this with either 2.6.0 from the repository, or with 
Thaddy de Koning's build from March 2014.

Currently, neither of these will build 2.7.1 on a Raspberry Pi.  So I have also 
tried with the generic arm-linux
release archive (fpc-2.6.4.arm-linux.tar).  This installed without error and I 
can compile projects on the Pi with it.

However, when trying to build 2.7.1 (make all) it creates a compiler binary, 
but fails whilst compiling fpmake.  
This looks similar to the bug 0024056 which is flagged as resolved.  The 
solution suggested there is to install 
build-essential, but this is installed by default on Raspbian, so I think there 
must be something else wrong? 

Could anyone suggest what I could try now?

Thanks,

Paul Michell



/home/pi/Projects/FreePascal/fpctmp/compiler/ppcarm fpmake.pp  
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fpmkunit/units_bs/arm-linux 
-Fu/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux  
Free Pascal Compiler version 2.7.1 [2014/10/17] for arm
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for ARMEL
Compiling fpmake.pp
fpmake.pp(16,3) Note: Local variable T is assigned but never used
Assembling fpmake
Linking fpmake
fpmake.pp(46) Warning: crti.o not found, this will probably cause a linking 
failure
fpmake.pp(46) Warning: crtbegin.o not found, this will probably cause a 
linking failure
fpmake.pp(46) Warning: crtend.o not found, this will probably cause a linking 
failure
fpmake.pp(46) Warning: crtn.o not found, this will probably cause a linking 
failure
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux/cprt0.o: In function 
`_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux/cprt0.o: In function 
`_haltproc_eabi':
(.text+0x90): undefined reference to `_init'
fpmake.pp(46) Error: Error while linking
fpmake.pp(46) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Makefile:1645: recipe for target 'fpmake' failed
make[2]: *** [fpmake] Error 1
make[2]: Leaving directory '/home/pi/Projects/FreePascal/fpctmp/packages'
Makefile:2599: recipe for target 'packages_smart' failed
make[1]: *** [packages_smart] Error 2
make[1]: Leaving directory '/home/pi/Projects/FreePascal/fpctmp'
Makefile:2795: recipe for target 'build-stamp.arm-linux' failed
make: *** [build-stamp.arm-linux] Error 2

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Paul Michell
On Friday 17 Oct 2014 11:35:30 Henry Vermaak wrote:
 
  fpmake.pp(46) Warning: crti.o not found, this will probably cause a 
  linking failure
  fpmake.pp(46) Warning: crtbegin.o not found, this will probably cause a 
  linking failure
  fpmake.pp(46) Warning: crtend.o not found, this will probably cause a 
  linking failure
  fpmake.pp(46) Warning: crtn.o not found, this will probably cause a 
  linking failure
 
 Where are these files on your system?  I remember after multiarch
 happened on debian I had to add some library paths to get fpc to link.
 This sounds like a similar issue.

They do not exist in my FP directory tree.  However there are copies in the 
Raspian /usr/lib
tree here:

/usr/lib/arm-linux-gnueabihf/crti.o
/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o
/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o
/usr/lib/arm-linux-gnueabihf/crtn.o 
 
Thanks,

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Paul Michell
On Friday 17 Oct 2014 12:40:58 Joost van der Sluis wrote:
 Did you try
 
 make clean all NO_UNIT_PROCESS OPT=-dNO_THREADING

I have now! ;)

It got passed the prior problem, but now halts with a similar issue in fpdoc.

Thanks Joost

--

Start compiling package fpdoc for target arm-linux.
Executing command /usr/bin/bin2obj -o fpdoc/plusimage.inc -c PlusImageData 
fpdoc/images/plus.png
Executing command /usr/bin/bin2obj -o fpdoc/minusimage.inc -c MinusImageData 
fpdoc/images/minus.png
   Compiling fpdoc/BuildUnit_fpdoc.pp
   Compiling fpdoc/dglobals.pp
   Compiling fpdoc/dwriter.pp
   Compiling fpdoc/fpdocxmlopts.pas
   Compiling fpdoc/fpdocproj.pas
   Compiling fpdoc/dw_xml.pp
   Compiling fpdoc/sh_pas.pp
   Compiling fpdoc/dw_html.pp
   Compiling fpdoc/fpdocclasstree.pp
   Compiling fpdoc/dw_latex.pp
   Compiling fpdoc/dwlinear.pp
   Compiling fpdoc/dw_txt.pp
   Compiling fpdoc/dw_man.pp
   Compiling fpdoc/dw_linrtf.pp
   Compiling fpdoc/dw_dxml.pp
   Compiling fpdoc/mkfpdoc.pp
   Compiling fpdoc/dw_ipflin.pas
   Compiling fpdoc/fpdoc.pp
   Linking fpdoc/bin/arm-linux/fpdoc
The installer encountered the following error:
External command /home/pi/Projects/FreePascal/fpctmp/compiler/ppcarm -Tlinux 
-FEfpdoc/bin/arm-linux -FUfpdoc/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-base/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-res/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/rtl-objpas/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-xml/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/iconvenc/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-passrc/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-process/units/arm-linux/ 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/chm/units/arm-linux/ -Ur -Xs 
-O2 -n -Fu/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/paszlib/units/arm-linux 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-process/units/arm-lin
 ux -Fu/home/pi/Projects/FreePascal/fpctmp/packages/hash/units/arm-linux 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/libtar/units/arm-linux 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fpmkunit/units/arm-linux 
-Fu/home/pi/Projects/FreePascal/fpctmp/packages/fcl-json/units/arm-linux 
-dNO_THREADING -darm -dRELEASE -S2h -viq fpdoc/fpdoc.pp failed with exit code 
256. Console output:
Target OS: Linux for ARMEL
Compiling fpdoc/fpdoc.pp
Assembling fpdoc
Linking fpdoc/bin/arm-linux/fpdoc
fpdoc.pp(410) Error: Error while linking
fpdoc.pp(410) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
/usr/bin/ld: warning: fpdoc/bin/arm-linux/link.res contains output sections; 
did you forget -T?
/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux/cprt0.o: In function 
`_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
/home/pi/Projects/FreePascal/fpctmp/rtl/units/arm-linux/cprt0.o: In function 
`_haltproc_eabi':
(.text+0x90): undefined reference to `_init'

Makefile:2314: recipe for target 'all' failed
make[2]: *** [all] Error 1
make[2]: Leaving directory '/home/pi/Projects/FreePascal/fpctmp/utils'
Makefile:2550: recipe for target 'utils_all' failed
make[1]: *** [utils_all] Error 2
make[1]: Leaving directory '/home/pi/Projects/FreePascal/fpctmp'
Makefile:2795: recipe for target 'build-stamp.arm-linux' failed
make: *** [build-stamp.arm-linux] Error 2



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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Paul Michell
On Friday 17 Oct 2014 13:06:21 Thaddy de Koning wrote:
 This is known. I forgot a bit about my rasp, but I will try to make a 
 new build + build instructions within a week.
 The warnings can be -partially - ignored though...
 
 Tnx Paul, maybe we can coordinate this?

Yes, of course, feel free to email me off-list about this.

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


Re: [fpc-devel] Building 2.7.1 on current Raspbian fails

2014-10-17 Thread Paul Michell
On Friday 17 Oct 2014 12:02:23 Paul Michell wrote:
 On Friday 17 Oct 2014 11:35:30 Henry Vermaak wrote:
   ...
  Where are these files on your system?  I remember after multiarch
  happened on debian I had to add some library paths to get fpc to link.
  This sounds like a similar issue.
 
 They do not exist in my FP directory tree.  However there are copies in the 
 Raspian /usr/lib
 tree here:
 
 /usr/lib/arm-linux-gnueabihf/crti.o
 /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o
 /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o
 /usr/lib/arm-linux-gnueabihf/crtn.o 
  

Henry was correct about the paths.  I managed to complete the build with:

make all OPT=-dNO_THREADING -Fl/usr/lib/arm-linux-gnueabihf 
-Fl/usr/lib/gcc/arm-linux-gnueabihf/4.6

I'm not sure I need the -dNO_THREADING, but I left it in from Joost's 
suggestion.

The new build was then installed with:

sudo make install PREFIX=/usr
sudo make install sourceinstall PREFIX=/usr  [Not sure if I need this as well?]

Recreated the symlink with:

sudo rm -f /usr/bin/ppcarm
sudo ln -s /usr/lib/fpc/2.7.1/ppcarm /usr/bin/ppcarm

Then created the new config with:

sudo /usr/lib/fpc/2.7.1/samplecfg /usr/lib/fpc/2.7.1 /etc

This seems to do the trick, I could compile my Pi projects again, although I 
had to add the two paths
to my build commands.

What are the files crti.o, crtn.o, crtbegin.o, crtend.o used for by Free Pascal?
Is this dependency something new, or has it always been there?

Thanks for all of your suggestions,

Kind regards,

Paul Michell


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


[fpc-devel] Unable to build FPC from source, any ideas?

2008-01-22 Thread Paul Michell
I've been updating my FPC 2.2.1 from SVN for some time, but my batch file has 
started failing (since last Sunday I think?) It appears to be nolonger able 
to build the initial compiler? I'm working on Windows XP and using 2.2.0 as a 
seed compiler.

make cycle from the compiler folder gives:



Compiling nflw.pas
Compiling optunrol.pas
Compiling nflw.pas
nflw.pas(1248,44) Error: Can't take the address of constant expressions
nflw.pas(1249,45) Error: Can't take the address of constant expressions
nflw.pas(1272,38) Error: Can't take the address of constant expressions
nflw.pas(1501) Fatal: There were 3 errors compiling module, stopping
Fatal: Compilation aborted
make[3]: *** [ppc386.exe] Error 1
make[3]: Leaving directory `C:/Applications/FreePascal/Source/compiler'
make[2]: *** [next] Error 2
make[2]: Leaving directory `C:/Applications/FreePascal/Source/compiler'
make[1]: *** [ppc1.exe] Error 2
make[1]: Leaving directory `C:/Applications/FreePascal/Source/compiler'
make: *** [cycle] Error 2

If anyone could point me in the right direction I would appreciate it?

Thanks,

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