Forum > Embedded

RaspberryPi Zero2W

<< < (3/7) > >>

dbannon:
Yes Mark20, you probably would be disappointed running Lazarus on a Pi Zero, or even a Linux Desktop but for command line driven, no GUI, absolutely fine.

Depending on what I am doing, I generally edit using Lazarus, because the IDE is really useful, and cross compile from my laptop. Then use sshfs from the Pi to mount that directory from my laptop on the Pi so its easy to run and test the compiled executable.

Alternatively, you may be able to compile on the PI  zero but do keep in mind, as MarkMLI said, the SDcards and not made for repeated rewrites, and compiling does a lot of repeated rewrites.

If you have a 'bigger' PI, at least a 3 with 2G ram, running Lazarus is practicable, just, (must increase swap to initially build Lazarus at least) and the (32bit ?) binary can be used, when perfected, in the zero.

Davo

MarkMLl:

--- Quote from: dbannon on December 18, 2023, 11:40:52 pm ---Alternatively, you may be able to compile on the PI  zero but do keep in mind, as MarkMLI said, the SDcards and not made for repeated rewrites, and compiling does a lot of repeated rewrites.

--- End quote ---

It's specifically swap that causes problems, not rewrites per se.

It would be easy enough to have a script- a few lines or Perl or whatever- which detected that a .lpi file had been changed and ran lazbuild on it.

MarkMLl

dbannon:
I think you do need to consider just the i/o on the SDcard too. Its just the total number of times a particular part of the card is written to. The SDCards do not have the load leveling circuitry that a SSD has to even out those writes over the whole thing. So, you can easily write repeatably to the same spot and they have a limited number of times each spot is written to.

Yep, a particular problem with swap files but I always ensure, for example, my Lazarus Source is on a USB disk before I compile Lazarus.  (Its actually a conventional hard disk connected over USB, slower but the RasPi is no ball of fire anyway).

Davo

Thaddy:
The swap is only necessary during compilation annd you can revert it  when your software is running properly. When compiling with FPC on the zero itself I change the swap from 128 to 512, when compiling with Lazarus too I use either 1024 or 2048 depending on components needed. Nowadays I merely use cross-compiling, though.
It also helps if you use at least a class 10 card although a class 4 should still work.

dbannon:
I recently found, using Debian Bookworm on a PasPi4 with only 2G ram that I needed to increase swap to 1G when compiling Lazarus. The same hardware a year (?) ago running Debian Bullseye based Raspi OS worked 'out of the box', so I don't know if its because Lazarus has got bigger or the OS has got bigger, both true of course.

But I did not reverse the increase, no point really, if it does not need that extra swap, it won't use it, if it does need it, its there. Using swap is always undesirable but preferable to crashing the system.

There was a large HPC facility in this Nations capital where a good friend of mine would always kill any long running job that went into swap, I got a lot of credit at my facility by just sending a polite email.

Davo

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version