Recent

Author Topic: Cross compiling for Raspbian arm on Windows?  (Read 1874 times)

ASBzone

  • Sr. Member
  • ****
  • Posts: 292
  • Automation leads to relaxation...
    • BrainWaveCC Utilities
Re: Cross compiling for Raspbian arm on Windows?
« Reply #30 on: November 26, 2019, 06:09:50 am »
Can the fpcupdeluxe be used to install the cross compiler when I already have installed fpc 3.0.4 from sources (SVN) without using fpcupdeluxe?


You should ensure that you don't have an antivirus app eating your FPCupDeluxe files.  That's what it sounds like from here.


I use FPCupDeluxe for Windows 64/32 cross compiling (no Linux at present), and it takes about 15-20 min to completely install on all the systems I install it on.
-ASB: https://www.BrainWaveCC.com

Lazarus v2.0.7 r62558 / FPC v3.2.0-beta-r43958 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 1909 (Build 18363.592)
Other Systems: Windows 10 Pro x64, Version 1909 or greater

BosseB

  • Full Member
  • ***
  • Posts: 110
Re: Cross compiling for Raspbian arm on Windows?
« Reply #31 on: November 26, 2019, 09:15:21 am »
I use FPCupDeluxe for Windows 64/32 cross compiling (no Linux at present), and it takes about 15-20 min to completely install on all the systems I install it on.
OK, so what does the log window show during this time?
A single static line never changing or a stream of commands being executed?
I have never ever seen anything but a frozen log window with one and the same content for hours.
And the application is completely frozen, I cannot widen the window to see the right hand ends of what is written or even use the HALT button.

I have reverted to working on the RPi4 unit itself now (through VNC), losing too much time trying to get cross-compile working....
Starting Lazarus via gdb in order to catch the reason for any future crash, but so far it has been working. I do save every 2 minutes or so now.
--
Bo Berglund
Sweden

BosseB

  • Full Member
  • ***
  • Posts: 110
Re: Cross compiling for Raspbian arm on Windows?
« Reply #32 on: November 26, 2019, 09:19:41 am »
Confirm Thaddy about power supply.
Exactly how am I supposed to confirm?
I measure 5.2V across the 5V power pins on the 40-pin connector (pins 4 and 6).
This is while the RPi is running and it also has a relay board connected at this time.

Nothing strange apart from Lazarus crashing sometimes has been observed on this RPi4.
--
Bo Berglund
Sweden

krolikbest

  • Full Member
  • ***
  • Posts: 108
Re: Cross compiling for Raspbian arm on Windows?
« Reply #33 on: November 26, 2019, 10:06:11 am »
I did a little complex installation with few Arduinos and in this contex I confirm importance of power supply for RPi. Perhaps in your case in doesn't matter.
What happens when you run directly (so don't use vnc server/viewer) Lazarus on RPi? Is it frozen?

[Edit]
would try to install an older ver of Raspbian e.g. Stretch and then Lazazrus. You will see if still you have some issues...
« Last Edit: November 26, 2019, 10:11:23 am by krolikbest »

Thaddy

  • Hero Member
  • *****
  • Posts: 9425
Re: Cross compiling for Raspbian arm on Windows?
« Reply #34 on: November 26, 2019, 10:47:00 am »
If the amperage (not the voltage) of the power supply is OK, check your storage medium(s)
Along the years - and I have many Pi's - I have learned that those two are the bottlenecks on every single Pi release.
Just spend a bit more and don't use the really cheap ones. The sandisks (about half way between expensive and cheap) are my preferred ones, but any decent spec will do.
You can also run from an ssd , apart from booting.

So still, I am interested in the hardware specs: powersupply and storage.

(as almost always except for testing windows, written from a raspberry pi.)
« Last Edit: November 26, 2019, 10:51:21 am by Thaddy »
also related to equus asinus.

Thaddy

  • Hero Member
  • *****
  • Posts: 9425
Re: Cross compiling for Raspbian arm on Windows?
« Reply #35 on: November 26, 2019, 10:49:04 am »
Iwould try to install an older ver of Raspbian e.g. Stretch and then Lazazrus. You will see if still you have some issues...
Not available for a RPi4. Bottom line is Buster. (At least for Raspbian)
also related to equus asinus.

MarkMLl

  • Hero Member
  • *****
  • Posts: 608
Re: Cross compiling for Raspbian arm on Windows?
« Reply #36 on: November 26, 2019, 10:53:39 am »
If the amperage (not the voltage) of the power supply is OK, check your storage medium(s)

Also the cable between the PSU and the RPi: it's no use having a 2.5A PSU with a bit of USB tinsel connected to it with an ohm or so on each conductor.

Also remember the special command that lets you check whether there has been a power or temperature excursion.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

Thaddy

  • Hero Member
  • *****
  • Posts: 9425
Re: Cross compiling for Raspbian arm on Windows?
« Reply #37 on: November 26, 2019, 10:55:41 am »
Yes, cheap cables are also a potential issue. Mea culpa, forgot to mention that.
also related to equus asinus.

MarkMLl

  • Hero Member
  • *****
  • Posts: 608
Re: Cross compiling for Raspbian arm on Windows?
« Reply #38 on: November 26, 2019, 11:37:37 am »
Te absolvo :-) A colleague made up hefty cables (something like 0.5mm2 tri-rated) for bench use, but there was so much of a mismatch between the wire and the connectors that they were physically fragile. I went digging last night and at least some USB cables are definitely tinsel, but I couldn't find an ohms/metre value for that type of conductor.

However I'd not be too surprised by something like an Ohm per metre, and for the non-engineers that means that a 2A spike in consumption would drop 2V which would /definitely/ give an RPi problems.

The command that shows voltages etc. is vcgencmd, and this is what you really need to know:

Code: Pascal  [Select]
  1. https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=147781&start=50#p972790
  2.  
  3. -----8<-----
  4.  
  5.         $ vcgencmd get_throttled
  6.         throttled=0x50005
  7.  
  8. Okay, the bits in this number represent:
  9.  
  10. Code: Select all
  11.     0: under-voltage
  12.     1: arm frequency capped
  13.     2: currently throttled
  14.     16: under-voltage has occurred
  15.     17: arm frequency capped has occurred
  16.     18: throttling has occurred
  17.  
  18. So 0x50005 means you are currently under-voltage and throttled.
  19.  
  20. ----->8-----
  21.  

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

BosseB

  • Full Member
  • ***
  • Posts: 110
Re: Cross compiling for Raspbian arm on Windows?
« Reply #39 on: November 26, 2019, 01:05:46 pm »
I get:

Code: Pascal  [Select]
  1. $ vcgencmd get_throttled
  2. throttled=0x0
So it is not experiencing anything at all.
--
Bo Berglund
Sweden

MarkMLl

  • Hero Member
  • *****
  • Posts: 608
Re: Cross compiling for Raspbian arm on Windows?
« Reply #40 on: November 26, 2019, 01:25:45 pm »
I get:

Code: Pascal  [Select]
  1. $ vcgencmd get_throttled
  2. throttled=0x0
So it is not experiencing anything at all.

You mean it's not experienced anything since the last reboot (or power cycle: I forget what resets it). If in doubt, you should be watching that carefully, it's the same monitoring subsystem that puts a lightning flash symbol on your screen if it's not happy.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.