Recent

Author Topic: Compiling for Raspberry from Windows -- Link death  (Read 6511 times)

Tommi

  • Full Member
  • ***
  • Posts: 213
Compiling for Raspberry from Windows -- Link death
« on: October 20, 2016, 02:33:40 pm »
I am following this guide:
http://wiki.freepascal.org/fpcup#Linux_ARM_cross_compiler

I should download files from this link : http://wiki.freepascal.org/fpcup#Linux_ARM_cross_compiler but the link is no more working.

Where could I find files ? Thank you

Tommi

  • Full Member
  • ***
  • Posts: 213
Re: Compiling for Raspberry from Windows -- Link death
« Reply #1 on: October 20, 2016, 04:07:13 pm »
I found this link: http://svn.freepascal.org/svn/fpcbuild/binaries/i386-win32/ but some file are missing... :(


Why not to do a ready to install Lazarus4Raspberry_Win32 distribution  ?
« Last Edit: October 20, 2016, 04:09:53 pm by Tommi »

Thaddy

  • Hero Member
  • *****
  • Posts: 14384
  • Sensorship about opinions does not belong here.
Re: Compiling for Raspberry from Windows -- Link death
« Reply #2 on: October 20, 2016, 04:26:50 pm »
Why not start with apt-get install fpc lazarus on the raspberrypi itself?
Then download and run fpcup.

There is a working - 4 months old , but stable - cross-compiler on e.g. my website freepascal.thaddy.com.
You still need to know how to set it up. And download the binutils for it from linaro.org.

The easy way is simply: apt-get install fpc lazarus on the RPi itself. The RPi is capable enough.

« Last Edit: October 20, 2016, 04:38:13 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Tommi

  • Full Member
  • ***
  • Posts: 213
Re: Compiling for Raspberry from Windows -- Link death
« Reply #3 on: October 20, 2016, 05:37:39 pm »
I have to build an embedded system: In raspberry I installed a minimal linux version without GUI.

It neither have a display and I connect to it with SSH.

I just need to compile my software and send it to the raspberry. So I would need to compile for Raspberry from WIndows.

Thaddy

  • Hero Member
  • *****
  • Posts: 14384
  • Sensorship about opinions does not belong here.
Re: Compiling for Raspberry from Windows -- Link death
« Reply #4 on: October 20, 2016, 06:01:37 pm »
Then you can use e.g. my cross-compiler (optimized for armhf/pi) . Just you make sure that the linaro binutils are installed and correctly set up all the paths.
But I trust that if you want to create an embedded system, you know how to do that? (Why do I not believe you?,that's a pretty hard thing .... O:-))
I will give pointers when you can not solve it yourself, though..... Which I suppose must do anyway.
« Last Edit: October 20, 2016, 06:11:36 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Tommi

  • Full Member
  • ***
  • Posts: 213
Re: Compiling for Raspberry from Windows -- Link death
« Reply #5 on: October 20, 2016, 06:02:58 pm »
Where may I download it ?

Thank you

Thaddy

  • Hero Member
  • *****
  • Posts: 14384
  • Sensorship about opinions does not belong here.
Re: Compiling for Raspberry from Windows -- Link death
« Reply #6 on: October 20, 2016, 06:07:45 pm »
Where may I download it ?

Thank you

Ahum... can you read?
Anyway, this should start a download. http://freepascal.thaddy.com/fpctrunk-r34008.zip

I will update it, but that version is a stable trunk from about four months ago and a good starting point.
It contains more than one cross-compiler....
« Last Edit: October 20, 2016, 06:13:48 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Tommi

  • Full Member
  • ***
  • Posts: 213
Re: Compiling for Raspberry from Windows -- Link death
« Reply #7 on: October 20, 2016, 06:35:43 pm »
Ahum... can you read?

I don't understand, why ?

Anyway I downloaded the file, but how I use it ? Should I copy the content in some lazarus folder ?
« Last Edit: October 20, 2016, 06:37:23 pm by Tommi »

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Compiling for Raspberry from Windows -- Link death
« Reply #8 on: October 20, 2016, 07:13:54 pm »
You could try NewPascal.
Especially its newest release:
https://github.com/newpascal/newpascal/releases/tag/np_sc-v1.0.31

So, in your case, you need base and linuxarm !
« Last Edit: October 20, 2016, 07:15:52 pm by DonAlfredo »

Tommi

  • Full Member
  • ***
  • Posts: 213
Re: Compiling for Raspberry from Windows -- Link death
« Reply #9 on: October 20, 2016, 08:15:13 pm »
You could try NewPascal.
Especially its newest release:
https://github.com/newpascal/newpascal/releases/tag/np_sc-v1.0.31

So, in your case, you need base and linuxarm !

OK, I expanded NPLazBaseWin32 and CrossLinuxArm in c:\newPascal. I opened the link Lazarus_NewPascal and selected Project->Options->Config and Target, Target OS=Linux,  Target CPU Family=ARM, Target Processor=ARM V6. I also removed Win32 Gui Application option.
If I try to compile I obtain this error:
Quote
Fatal: Cannot find system used by fcllaz of package FCL.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Compiling for Raspberry from Windows -- Link death
« Reply #10 on: October 20, 2016, 09:10:18 pm »
Armv7a ?

edit:
This release it optimized for RPi2 ... armv7a or default will work ... just use default.
« Last Edit: October 20, 2016, 09:13:26 pm by DonAlfredo »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Compiling for Raspberry from Windows -- Link death
« Reply #11 on: October 20, 2016, 09:16:58 pm »
Why not to do a ready to install Lazarus4Raspberry_Win32 distribution  ?
No maintainer, just like other (mostly mobile, some embedded) targets that some people asked.
I have to build an embedded system: In raspberry I installed a minimal linux version without GUI.

It neither have a display and I connect to it with SSH.

I just need to compile my software and send it to the raspberry. So I would need to compile for Raspberry from WIndows.
Perfect. You don't need to cross compile as fpc needs no GUI, simply install fpc and run it directly on Pi from a SSH session. fpIDE works through SSH if you ever need a terminal based IDE.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Compiling for Raspberry from Windows -- Link death
« Reply #12 on: October 20, 2016, 10:57:28 pm »
If you are about to give up cross compiling because of the complexity, there is one more alternative you could try - CodeTyphon with step by Raspberry Pi cross compiling tutorial:
http://www.pilotlogic.com/sitejoom/index.php/wiki?id=499
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Tommi

  • Full Member
  • ***
  • Posts: 213
Re: Compiling for Raspberry from Windows -- Link death
« Reply #13 on: October 21, 2016, 07:26:58 am »
Armv7a ?

edit:
This release it optimized for RPi2 ... armv7a or default will work ... just use default.

Quote
Fatal: Cannot find system used by fcllaz of package FCL.
I have the same problem qith ARMV7A also, and also if select Linux and I leave Cpu=ARM, Familiy=Default.
Selecting just Linux and CPU=Default, Familiy=Default  give error also.
Just if I put OS=Win32, CPU=Default, Familiy=Default it runs.
Why not to do a ready to install Lazarus4Raspberry_Win32 distribution  ?
No maintainer, just like other (mostly mobile, some embedded) targets that some people asked.
I have to build an embedded system: In raspberry I installed a minimal linux version without GUI.

It neither have a display and I connect to it with SSH.

I just need to compile my software and send it to the raspberry. So I would need to compile for Raspberry from WIndows.
Perfect. You don't need to cross compile as fpc needs no GUI, simply install fpc and run it directly on Pi from a SSH session. fpIDE works through SSH if you ever need a terminal based IDE.

Yes, it will be the solution if I cannot cross-compile but it is unconfortable for me. I would prefere to use Windows GUI to develope and raspberry just to execute.

If you are about to give up cross compiling because of the complexity, there is one more alternative you could try - CodeTyphon with step by Raspberry Pi cross compiling tutorial:
http://www.pilotlogic.com/sitejoom/index.php/wiki?id=499

I am going to try, thank you.

Tommi

  • Full Member
  • ***
  • Posts: 213
Re: Compiling for Raspberry from Windows -- Link death
« Reply #14 on: October 21, 2016, 10:32:22 am »
@ Alfred

I solved, it now compiles, I did a mistake compying the folders. I copied the content of cross folder in c:\NewPascal and instead I had to copy directly cross folder into c:\NewPascal.

Anyway I needed to create the folder C:\Users\Alfred\AppData\Local\Temp and allow the writing rights to Everyone.

In some way your distribuition remained linked to "Alfred" user name. I checked into fpc.cfg but it isn't there.

Do you know where may I change that folder ?

Now it compiles for ARMV6 also :)

Thank you

 

TinyPortal © 2005-2018