rPI and compile

General FreeBASIC programming questions.
Posts: 329
Joined: Nov 28, 2012 1:27
Location: California

rPI and compile

Postby speedfixer » May 12, 2019 18:28

rPI 3B+

I am compiling a fair sized, complex (as is) program.
It pulls in the pigpio daemon library set. I don't have any pca9685 code yet.
I use a module destructor.

I will do more isolation later, but if anyone has a clue for me ...

Program compiles with no error. Program will run without fault.
Recompiled libs and program all with/without -g and exx.

I park in a small loop and exit on a key press.

On exit:

1 - When I compile with -e (or more) all is fine.
2 - When I compile without -e I get a segfault.

It will reach the end of the coded program, in either case, but it does not appear to reach the destructor code.
There is no END or STOP keyword used. Somewhere in the rt lib closing code?

gdb output:
Thread 1 "pgd_pca9685" received signal SIGSEGV, Segmentation fault.
0x76fb9c1c in memcmp () from /usr/lib/arm-linux-gnueabihf/libarmmem.so

If anyone has a hint, I would appreciate any help I can get.
Meanwhile, I will combine all into one source and start on code reduction. When I get down to something of a size to post, I will be back.

Posts: 329
Joined: Nov 28, 2012 1:27
Location: California

Re: rPI and compile

Postby speedfixer » May 13, 2019 21:27

I am thinking I may have included one of the pigpio object files twice. Still checking.

Otherwise, FB on the PI works great.
I am using the pigpio daemon library @ https://github.com/joan2937

My opinion: this is a much more complete and easier to use library set than the WiringPI, BCM2708 or BCM 2835.
Also, the author doesn't play little snippy ego games about how the libraries are used.
The online info is very complete. (If only her docs were available to download.) The author uses an unlicense.

My header include files are about 900 lines for pigpio.h and 200 lines for pigpigd_if2.h
(Thanks to dkl again for the fbfrog program.) If anyone wants - ask.

The author, Joan, is quick to respond and very active on the PI forums.


Return to “General”

Who is online

Users browsing this forum: No registered users and 3 guests