[Lazarus] Raspberry Pi Debug Digital I/O
Bo Berglund
bo.berglund at gmail.com
Mon Jan 25 08:43:38 CET 2016
On Sun, 24 Jan 2016 22:02:49 -0500, Donald Ziesig <donald at ziesig.org>
wrote:
>
>I get exactly this on my pi except there is a line:
>
>pi:x:1000:
>
>immediately following the netdev line..
I edited out that because the grep found pi in the wrong place...
>wiringPiSetup: Must be root. (did you forget sudo?).
>
>Using the same executable but prefacing the command with sudo, it runs
>and does digital I/O.
>
>When I try to run my program using unprivileged Lazarus it compiles but
>the Debugger crashes.
>
>When I run my program using root-mode Lazarus it compiles, runs and does
>digital I/O.
>
>The comments in h2WiringPi state that the programs that use it must run
>as root, which is how I got to this position in the first place.
I solved my root/pi problem back in Oct 2015.
You can read about it here:
http://lists.lazarus.freepascal.org/pipermail/lazarus/2015-October/094438.html
Specifically see how the change from using /dev/mem to /dev/gpiomem
made it possible to run as user pi.
I personally totally detest having to be root in a development system
and having my programs require root to run.
I don't have to anymore.
--
Bo Berglund
Developer in Sweden
More information about the Lazarus
mailing list