strace question on Linux beaglebone 4.1.12-ti-r29 UTC 2015 armv7l GNU/Linux Debian Image 2015-11-12

I am trying to decipher my strace. My setup is Linux beaglebone 4.1.12-ti-r29 #1 SMP PREEMPT Mon Nov 9 22:46:19 UTC 2015 armv7l GNU/Linux BeagleBoard.org Debian Image 2015-11-12. I am not sure on how to interpet my findings. In particular of the files that are missing is that because I need an update or do they arise out a make file that simply is not working or incorrect. The CMake version that I am using is 3.0.2. Thanks for replies in advance.

execve("./LCDApp", ["./LCDApp"], [/* 19 vars */]) = 0

brk(0) = 0x4bf000

uname({sys=“Linux”, node=“beaglebone”, …}) = 0

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f95000

access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)

open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3

fstat64(3, {st_mode=S_IFREG|0644, st_size=26752, …}) = 0

mmap2(NULL, 26752, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6f8e000

close(3) = 0

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

open("/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp/libEBBLibrary.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

stat64("/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp", 0xbea01370) = -1 ENOENT (No such file or directory)

open("/lib/arm-linux-gnueabihf/tls/v7l/neon/libEBBLibrary.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

open("/lib/arm-linux-gnueabihf/libEBBLibrary.so", O_RDONLY|O_CLOEXEC) = 3

read(3, “\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0`m\0\0004\0\0\0”…, 512) = 512

lseek(3, 95252, SEEK_SET) = 95252

read(3, “\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0”…, 1200) = 1200

lseek(3, 63425, SEEK_SET) = 63425

read(3, “A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22”…, 51) = 51

fstat64(3, {st_mode=S_IFREG|0755, st_size=96452, …}) = 0

mmap2(NULL, 128964, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f50000

mprotect(0xb6f5f000, 65536, PROT_NONE) = 0

mmap2(0xb6f6f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0xb6f6f000

close(3) = 0

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

open("/usr/lib/arm-linux-gnueabihf/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3

read(3, “\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0 n\4\0004\0\0\0”…, 512) = 512

open("/lib/arm-linux-gnueabihf/libEBBLibrary.so", O_RDONLY|O_CLOEXEC) = 3

read(3, “\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0`m\0\0004\0\0\0”…, 512) = 512

lseek(3, 95252, SEEK_SET) = 95252

read(3, “\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0”…, 1200) = 1200

lseek(3, 63425, SEEK_SET) = 63425

read(3, “A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22”…, 51) = 51

fstat64(3, {st_mode=S_IFREG|0755, st_size=96452, …}) = 0

mmap2(NULL, 128964, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f50000

mprotect(0xb6f5f000, 65536, PROT_NONE) = 0

mmap2(0xb6f6f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0xb6f6f000

close(3) = 0

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

open("/usr/lib/arm-linux-gnueabihf/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3

read(3, “\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0 n\4\0004\0\0\0”…, 512) = 512

lseek(3, 100684, SEEK_SET) = 100684

read(3, “\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0”…, 1520) = 1520

lseek(3, 65940, SEEK_SET) = 65940

read(3, “A4\0\0\0aeabi\0\1*\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22”…, 53) = 53

fstat64(3, {st_mode=S_IFREG|0755, st_size=102204, …}) = 0

mmap2(NULL, 139836, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6ceb000

mprotect(0xb6cfb000, 61440, PROT_NONE) = 0

mmap2(0xb6d0a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0xb6d0a000

mmap2(0xb6d0c000, 4668, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6d0c000

close(3) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f8c000

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f8b000

set_tls(0xb6f8b4c0, 0xb6f98050, 0xb6f8bbb8, 0xb6f8b4c0, 0xb6f98050) = 0

mprotect(0xb6df6000, 8192, PROT_READ) = 0

mprotect(0xb6d0a000, 4096, PROT_READ) = 0

mprotect(0xb6e97000, 4096, PROT_READ) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f8a000

mprotect(0xb6f44000, 16384, PROT_READ) = 0

mprotect(0xb6f97000, 4096, PROT_READ) = 0

munmap(0xb6f8e000, 26752) = 0

set_tid_address(0xb6f8b068) = 650

set_robust_list(0xb6f8b070, 12) = 0

rt_sigaction(SIGRTMIN, {0xb6cefd9d, [], SA_RESTORER|SA_SIGINFO, 0xb6d34ae1}, NULL, 8) = 0

rt_sigaction(SIGRT_1, {0xb6cefcbd, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0xb6d34ae1}, NULL, 8) = 0

rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0

getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0

futex(0xb6f4ece8, FUTEX_WAKE_PRIVATE, 2147483647) = 0

futex(0xb6f4ecdc, FUTEX_WAKE_PRIVATE, 2147483647) = 0

fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), …}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f94000

mprotect(0xb6df6000, 8192, PROT_READ) = 0

mprotect(0xb6d0a000, 4096, PROT_READ) = 0

mprotect(0xb6e97000, 4096, PROT_READ) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f8a000

mprotect(0xb6f44000, 16384, PROT_READ) = 0

mprotect(0xb6f97000, 4096, PROT_READ) = 0

munmap(0xb6f8e000, 26752) = 0

set_tid_address(0xb6f8b068) = 650

set_robust_list(0xb6f8b070, 12) = 0

rt_sigaction(SIGRTMIN, {0xb6cefd9d, [], SA_RESTORER|SA_SIGINFO, 0xb6d34ae1}, NULL, 8) = 0

rt_sigaction(SIGRT_1, {0xb6cefcbd, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0xb6d34ae1}, NULL, 8) = 0

rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0

getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0

futex(0xb6f4ece8, FUTEX_WAKE_PRIVATE, 2147483647) = 0

futex(0xb6f4ecdc, FUTEX_WAKE_PRIVATE, 2147483647) = 0

fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), …}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f94000

write(1, “Starting EBB LCD Character Displ”…, 43) = 43

brk(0) = 0x4bf000

brk(0x4e0000) = 0x4e0000

open("/dev/spidev2.0", O_RDWR) = -1 ENOENT (No such file or directory)

dup(2) = 3

fcntl64(3, F_GETFL) = 0x402 (flags O_RDWR|O_APPEND)

fstat64(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), …}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f93000

_llseek(3, 0, 0xbea01838, SEEK_CUR) = -1 ESPIPE (Illegal seek)

write(3, “SPI: Can’t open device.: No such”…, 51) = 51

close(3) = 0

munmap(0xb6f93000, 4096) = 0

ioctl(-1, 0x40046b04, 0x4bf024) = -1 EBADF (Bad file descriptor)

dup(2) = 3

fcntl64(3, F_GETFL) = 0x402 (flags O_RDWR|O_APPEND)

fstat64(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), …}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f93000

_llseek(3, 0, 0xbea01968, SEEK_CUR) = -1 ESPIPE (Illegal seek)

write(3, “SPI: Can’t set max speed HZ: Bad”…, 49) = 49

lose(3) = 0

munmap(0xb6f93000, 4096) = 0

ioctl(-1, 0x40206b00, 0xbea01a30) = -1 EBADF (Bad file descriptor)

dup(2) = 3

fcntl64(3, F_GETFL) = 0x402 (flags O_RDWR|O_APPEND)

fstat64(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), …}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f93000

_llseek(3, 0, 0xbea01910, SEEK_CUR) = -1 ESPIPE (Illegal seek)

write(3, “SPI: SPI_IOC_MESSAGE Failed: Bad”…, 49) = 49

close(3) = 0

munmap(0xb6f93000, 4096) = 0

From this man page: http://man7.org/linux/man-pages/man8/ld.so.8.html

FILES

       */lib/ld.so*
              a.out dynamic linker/loader
       */lib/ld-linux.so.*{*1*,*2*}
              ELF dynamic linker/loader
       __*/etc/ld.so.cache*__
              File containing a compiled list of directories in which to
              search for shared objects and an ordered list of candidate
              shared objects.
       __*/etc/ld.so.preload*__
              File containing a whitespace-separated list of ELF shared
              objects to be loaded before the program.
       lib*.so*
              shared objects

The odd part, is these files, which are configurations files for ld, should have been installed when ld was installed. I’ve never seen this personally. Which leads me to believe that perhaps you’ve followed some convoluted instructions on how to do something without understanding it. Or perhaps you missed a step when following someone elses instructions.

Anyway, if i knew which package ld, and these ld config files were part of I’d suggest that you check to make sure you either have installed, or installed correctly. e.g. sometimes someone will tell you to add an apt repo to your apt.lst file - Which turns out to be a really bad idea.

Which packages have to you installed for development ? Is build-essential installed ? perhaps an apt-get install build-essential will clear things up ?

Which version of gcc are you running, and is this native, or cross compile ?

Anyway, here is the short “skinny”:

/etc/ld.so.nohwcap

/etc/ld.so.preload
These two files are not found. Quite honestly I have no idea how important these files are. Probably not very important, so let’s not worry about them just yet.

Your library you were worried about in your other post successfully opened here, and then a few lines later the file handle 3 was closed also successfully.

open("/lib/arm-linux-gnueabihf/libEBBLibrary.so", O_RDONLY|O_CLOEXEC) = 3

I’m thinking the below is your real failure.

open("/dev/spidev2.0", O_RDWR) = -1 ENOENT (No such file or directory)

Yeah, double check your application..

In 3.8.x spidev2.0 could be used on spi1, but with 4.1.x+ the "first"
is spidev1 (even if spi1 over spi0..)

(there's not much we can really fix that, as the spi maintainer
already doesn't want us giving access to the spidev interface in
device tree's. (which we've ignored.. :wink: ) )

Regards,

Dean, Looks like you found where to put libEBBLibrary.so… Apparently the LCD is attached via SPI? The code is trying to open /dev/spidev2.0, but it’s not there. ("/", O_RDWR) = -1 ENOENT () Likely has to be enabled via devicetree. Mike

Dean,

Looks like you found where to put libEBBLibrary.so…

open(“/lib/arm-linux-gnueabihf/libEBBLibrary.so”, O_RDONLY|O_CLOEXEC) = 3

Apparently the LCD is attached via SPI? The code is trying to open /dev/spidev2.0, but it’s not there.

open(“/dev/spidev2.0”, O_RDWR) = -1 ENOENT (No such file or directory)

Likely has to be enabled via devicetree.

Yeah there are many reason why this can fail. Robert named one, you named another here, and I’ll name yet another which could be that application needs elevated permissions to run( and no elevated permissions were granted ). There are even more possibilities . . .

wait a minute . . .

What was posted was running on my BBB. That said I also have a VM of Debian 8.2 which I did some cross compiling. At any rate my GCC is 4.9.2

cat /proc/version

Linux version 4.1.12-ti-r29 (root@a5-imx6q-wandboard-2gb) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP PREEMPT Mon Nov 9 22:46:19 UTC 2015

Am I the only one seeing a problem here with the bolded text ?

No, the kernel arm build farm is made up of 4 wand quad's, 2 omap5_uevm's,
and 2 jetson-tk1's..

The node that gets the build is a little randomish..

Regards,

Anyway, Debian Wheezy would be gcc 4.7.2 I believe( don’t recall the minor version ), not sure abotu Ubuntu, but 4.9.x does not seem unreasonable.

Ooooo jetsons . . . will have to query you on that sometime. Those boards seem pretty nice, aside from not having lots of external peripheral I/O. IN the context of embedded . . .

Natively I am running 4.9.2 …

cat /proc/version
Linux version 4.1.12-ti-r29 (root@a5-imx6q-wandboard-2gb) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP PREEMPT Mon Nov 9 22:46:19 UTC 2015

That said I also have a VM of Debian 8.2 which I have used on occasion for cross compilation and Eclipse. All said this post was not from the VM, but run natively on the BBB with my desktop as UBuntu 15.04.

and they were 'half' price about two months ago (96).. (limit one "per"
shipping address.. (DANG THEM!!!))..

The onboard (pcie) RTL8168g/8111g has a nasty lockup bug. So you have to
use a 10/100 or force 100Mb mode, as it randomly locks up 1 Gb with heavy
cpu load (build farm)..

What a waste of the pcie channels for 100Mb mode. :wink:

Regards,

Dean,

This should be your first worry-> open("/dev/spidev2.0", O_RDWR) = -1 ENOENT (No such file or directory)

Find out why your system thinks this file does not exist. As in perhaps it doesn’t because you need to load a device tree file as mike mentioned above. But also as stated above, there can be many reasons why your application does not think this file exists.

Natively I am running 4.9.2 ...

cat /proc/version
Linux version 4.1.12-ti-r29 (root@a5-imx6q-wandboard-2gb) (gcc version 4.9.2
(Debian 4.9.2-10) ) #1 SMP PREEMPT Mon Nov 9 22:46:19 UTC 2015

That said I also have a VM of Debian 8.2 which I have used on occasion for
cross compilation and Eclipse. All said this post was not from the VM, but
run natively on the BBB with my desktop as UBuntu 15.04.

So did you tell the BBB to load the spidev interface???

PS.. "4.1.12-ti-r29" was way before i fixed spi/dma.. So you really
should upgrade: (unless you only plan to send 159 bytes over spi)

cd /opt/scripts/tools/
git pull
sudo ./update_kernel.sh --ti-rt-channel --lts-4_1
cd ~/

git clone GitHub - beagleboard/bb.org-overlays: Device Tree Overlays for bb.org boards --depth=1
cd ./bb.org-overlays
./dtc-overlay.sh
./install.sh

Then:

sudo sh -c "echo 'cape_enable=bone_capemgr.enable_partno=BB-SPIDEV1'

/boot/uEnv.txt"

Regards,

The onboard (pcie) RTL8168g/8111g has a nasty lockup bug. So you have to use a 10/100 or force 100Mb mode, as it randomly locks up 1 Gb with heavy cpu load (build farm)…

Silicon bug ?

What a waste of the pcie channels for 100Mb mode. :wink:

Well, at least there wouldn’t be any hardware bottlenecks on that 100Mbit ethernet :wink:

Might be a mis-configuration of the RTL8168g

https://devtalk.nvidia.com/default/topic/794758/embedded-systems/jetson-tk1-r8169-ethernet-cuts-on-high-load/

Regards,

pt-get install build-essential

In 3.8.x spidev2.0 could be used on spi1, but with 4.1.x+ the “first”
is spidev1 (even if spi1 over spi0…) >

SPIDevice *busDevice = new SPIDevice(2,0); //Using second SPI bus (both loaded)

The code is trying to open /dev/spidev2.0, but it’s not there

This should be your first worry-> open(“/dev/spidev2.0”, O_RDWR) = -1 ENOENT (No such file or directory)

Find out why your system thinks this file does not exist. As in perhaps it doesn’t because you need to load a device tree file as mike mentioned above. But also as stated above, there can be many reasons why your application does not think this file exists.

So did you tell the BBB to load the spidev interface???

PS… “4.1.12-ti-r29” was way before i fixed spi/dma… So you really
should upgrade: (unless you only plan to send 159 bytes over spi)

cd /opt/scripts/tools/
git pull
sudo ./update_kernel.sh --ti-rt-channel --lts-4_1
cd ~/

git clone https://github.com/ --depth=1
cd ./bb.org-overlays
./dtc-overlay.sh
./install.sh

Then:

sudo sh -c "echo 'cape_enable=bone_capemgr.

/boot/uEnv.txt"

Here is an update of the steps performed …

1) I did an update on apt-get install build-essential

2) Change code from … SPIDevice *busDevice = new SPIDevice(2,0)

to SPIDevice *busDevice = new SPIDevice(1,0)

3) Updated kernel and ./dtc overlay

OUTCOME: The SPIDEV2.0 problem went away – unfortunately shortly thereafter my BBB would no longer connect with ssh root@192.168.7.2. I therefore reloaded back to what I started with originally as below.

Linux beaglebone 4.1.12-ti-r29 #1 SMP PREEMPT Mon Nov 9 22:46:19 UTC 2015 armv7l GNU/Linux

Linux version 4.1.12-ti-r29 (root@a5-imx6q-wandboard-2gb) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP PREEMPT Mon Nov 9 22:46:19 UTC 2015

BeagleBoard.org Debian Image 2015-11-12

When I set out again to run natively on my BBB the error changed from …

SPI: SPI_IOC_MESSAGE Failed: Bad file descriptor

to

SPI: SPI_IOC_MESSAGE Failed: Invalid argument

and the SPIDEV2.0 of course went away with libEBBLibrary.so loading and SPIDEV1.0 now loading. That said there still remains to be a number of directories that are still missing. I am taking this latest error as a sign of progress, but I have yet to resolve it. I also should mention that I ruled out my laptop, and loading the same configuration on my clunker with the same outcome. Here is latests strace … For brevity I removed portions of it because it repeats itself at nauseum.

SPI: SPI_IOC_MESSAGE Failed: Invalid argument

root@beaglebone:~/exploringBB/chp09/LCDcharacter# ls

LCDApp LCDApp.cpp LCDProb build build_static

root@beaglebone:~/exploringBB/chp09/LCDcharacter# strace ./LCDApp

execve(“./LCDApp”, [“./LCDApp”], [/* 19 vars */]) = 0

brk(0) = 0x8b9000

uname({sys=“Linux”, node=“beaglebone”, …}) = 0

access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)

mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f4d000

access(“/etc/ld.so.preload”, R_OK) = -1 ENOENT (No such file or directory)

open(“/etc/ld.so.cache”, O_RDONLY|O_CLOEXEC) = 3

fstat64(3, {st_mode=S_IFREG|0644, st_size=26752, …}) = 0

mmap2(NULL, 26752, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6f46000

close(3) = 0

access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)

open(“/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp/libEBBLibrary.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

stat64(“/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp”, 0xbea86370) = -1 ENOENT (No such file or directory)

open(“/lib/arm-linux-gnueabihf/tls/v7l/neon/libEBBLibrary.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

stat64(“/lib/arm-linux-gnueabihf/tls/v7l/neon”, 0xbea86370) = -1 ENOENT (No such file or directory)

open(“/lib/arm-linux-gnueabihf/tls/v7l/vfp/libEBBLibrary.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

stat64(“/lib/arm-linux-gnueabihf/tls/v7l/vfp”, 0xbea86370) = -1 ENOENT (No such file or directory)

open(“/lib/arm-linux-gnueabihf/tls/v7l/libEBBLibrary.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

stat64(“/lib/arm-linux-gnueabihf/tls/v7l”, 0xbea86370) = -1 ENOENT (No such file or directory)

open(“/lib/arm-linux-gnueabihf/tls/neon/vfp/libEBBLibrary.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

stat64(“/linux-gnueabihf/tls/neon/vflib/armp”, 0xbea86370) = -1 ENOENT (No such file or directory)

open(“/lib/arm-linux-gnueabihf/tls/neon/libEBBLibrary.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

stat64(“/lib/arm-linux-gnueabihf/tls/neon”, 0xbea86370) = -1 ENOENT (No such file or directory)

open(“/lib/arm-linux-gnueabihf/tls/vfp/libEBBLibrary.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

stat64(“/lib/arm-linux-gnueabihf/tls/vfp”, 0xbea86370) = -1 ENOENT (No such file or directory)

open(“/lib/arm-linux-gnueabihf/tls/libEBBLibrary.so”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

open(“/usr/lib/libEBBLibrary.so”, O_RDONLY|O_CLOEXEC) = 3

read(3, “\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0`m\0\0004\0\0\0”…, 512) = 512

lseek(3, 95252, SEEK_SET) = 95252

read(3, “\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0”…, 1200) = 1200

lseek(3, 63425, SEEK_SET) = 63425

read(3, “A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22”…, 51) = 51

fstat64(3, {st_mode=S_IFREG|0644, st_size=96452, …}) = 0

mmap2(NULL, 128964, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f08000

mprotect(0xb6f17000, 65536, PROT_NONE) = 0

mmap2(0xb6f27000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0xb6f27000

close(3) = 0

access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)

open(“/usr/lib/arm-linux-gnueabihf/libstdc++.so.6”, O_RDONLY|O_CLOEXEC) = 3

read(3, “\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0 n\4\0004\0\0\0”…, 512) = 512

lseek(3, 656784, SEEK_SET) = 656784

read(3, “\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0”…, 1280) = 1280

lseek(3, 656208, SEEK_SET) = 656208

read(3, “A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22”…, 51) = 51

fstat64(3, {st_mode=S_IFREG|0644, st_size=658064, …}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f45000

mmap2(NULL, 749256, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6e51000

mprotect(0xb6eed000, 61440, PROT_NONE) = 0

mmap2(0xb6efc000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9b000) = 0xb6efc000

mmap2(0xb6f02000, 24264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6f02000

close(3) = 0

access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)

open(“/lib/arm-linux-gnueabihf/libm.so.6”, O_RDONLY|O_CLOEXEC) = 3

read(3, “\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0h<\0\0004\0\0\0”…, 512) = 512

lseek(3, 405976, SEEK_SET) = 405976

read(3, “\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0”…, 1160) = 1160

lseek(3, 405640, SEEK_SET) = 405640

read(3, “A4\0\0\0aeabi\0\1*\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22”…, 53) = 53

fstat64(3, {st_mode=S_IFREG|0644, st_size=407136, …}) = 0

mmap2(NULL, 471184, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6ddd000

mprotect(0xb6e40000, 61440, PROT_NONE) = 0

mmap2(0xb6e4f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x62000) = 0xb6e4f000

close(3) = 0

access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)

open(“/lib/arm-linux-gnueabihf/libgcc_s.so.1”, O_RDONLY|O_CLOEXEC) = 3

read(3, “\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\230\321\0\0004\0\0\0”…, 512) = 512

lseek(3, 99900, SEEK_SET) = 99900

read(3, “\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0”…, 1120) = 1120

lseek(3, 99568, SEEK_SET) = 99568

read(3, “A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22”…, 51) = 51

fstat64(3, {st_mode=S_IFREG|0644, st_size=101020, …}) = 0

mmap2(NULL, 165160, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6db4000

mprotect(0xb6dcd000, 61440, PROT_NONE) = 0

mmap2(0xb6ddc000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0xb6ddc000

close(3) = 0

access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)

open(“/lib/arm-linux-gnueabihf/libc.so.6”, O_RDONLY|O_CLOEXEC) = 3

read(3, “\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0Mw\1\0004\0\0\0”…, 512) = 512

lseek(3, 899996, SEEK_SET) = 899996

read(3, “\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0”…, 2880) = 2880

lseek(3, 896548, SEEK_SET) = 896548

read(3, “A4\0\0\0aeabi\0\1*\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\3\f”…, 53) = 53

fstat64(3, {st_mode=S_IFREG|0755, st_size=902876, …}) = 0

mmap2(NULL, 972200, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6cc6000

mprotect(0xb6d9f000, 61440, PROT_NONE) = 0

mmap2(0xb6dae000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd8000) = 0xb6dae000

mmap2(0xb6db1000, 9640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6db1000

close(3) = 0

access(“/etc/ld.so.nohwcap”, F_OK) = -1 ENOENT (No such file or directory)

open(“/lib/arm-linux-gnueabihf/libpthread.so.0”, O_RDONLY|O_CLOEXEC) = 3

read(3, “\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0EQ\0\0004\0\0\0”…, 512) = 512

lseek(3, 100684, SEEK_SET) = 100684

read(3, “\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0”…, 1520) = 1520

lseek(3, 65940, SEEK_SET) = 65940

read(3, “A4\0\0\0aeabi\0\1*\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22”…, 53) = 53

fstat64(3, {st_mode=S_IFREG|0755, st_size=102204, …}) = 0

mmap2(NULL, 139836, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6ca3000

mprotect(0xb6cb3000, 61440, PROT_NONE) = 0

mmap2(0xb6cc2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0xb6cc2000

mmap2(0xb6cc4000, 4668, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6cc4000

close(3) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f44000

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f43000

set_tls(0xb6f434c0, 0xb6f50050, 0xb6f43bb8, 0xb6f434c0, 0xb6f50050) = 0

mprotect(0xb6dae000, 8192, PROT_READ) = 0

mprotect(0xb6cc2000, 4096, PROT_READ) = 0

mprotect(0xb6e4f000, 4096, PROT_READ) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f42000

mprotect(0xb6efc000, 16384, PROT_READ) = 0

mprotect(0xb6f4f000, 4096, PROT_READ) = 0

munmap(0xb6f46000, 26752) = 0

set_tid_address(0xb6f43068) = 586

set_robust_list(0xb6f43070, 12) = 0

rt_sigaction(SIGRTMIN, {0xb6ca7d9d, , SA_RESTORER|SA_SIGINFO, 0xb6cecae1}, NULL, 8) = 0

rt_sigaction(SIGRT_1, {0xb6ca7cbd, , SA_RESTORER|SA_RESTART|SA_SIGINFO, 0xb6cecae1}, NULL, 8) = 0

rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0

getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0

futex(0xb6f06ce8, FUTEX_WAKE_PRIVATE, 2147483647) = 0

futex(0xb6f06cdc, FUTEX_WAKE_PRIVATE, 2147483647) = 0

fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), …}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f4c000

write(1, “Starting EBB LCD Character Displ”…, 43Starting EBB LCD Character Display Example

) = 43

brk(0) = 0x8b9000

brk(0x8da000) = 0x8da000

open(“/dev/spidev1.0”, O_RDWR) = 3

ioctl(3, 0x40016b01, 0x8b901c) = 0

ioctl(3, 0x80016b01, 0x8b901c) = 0

ioctl(3, 0x40046b04, 0x8b9024) = 0

ioctl(3, 0x80046b04, 0x8b9024) = 0

ioctl(3, 0x40016b03, 0x8b9020) = 0

ioctl(3, 0x80016b03, 0x8b9020) = 0

ioctl(3, 0x40046b04, 0x8b9024) = 0

ioctl(3, 0x80046b04, 0x8b9024) = 0

ioctl(3, 0x40206b00, 0xbea86a30) = 1

nanosleep({0, 1520000}, NULL) = 0

ioctl(3, 0x40206b00, 0xbea86a30) = -1 EINVAL (Invalid argument)

dup(2) = 4

fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)

fstat64(4, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), …}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f4b000

_llseek(4, 0, 0xbea86910, SEEK_CUR) = -1 ESPIPE (Illegal seek)

write(4, “SPI: SPI_IOC_MESSAGE Failed: Inv”…, 46SPI: SPI_IOC_MESSAGE Failed: Invalid argument

) = 46

close(4) = 0

munmap(0xb6f4b000, 4096) = 0

nanosleep({0, 37000}, NULL) = 0

ioctl(3, 0x40206b00, 0xbea86a30) = -1 EINVAL (Invalid argument)

dup(2) = 4

fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)

fstat64(4, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), …}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f4b000

Ok, so without seeing any code no one can really answer a question related to your problem. However, I will say that errors in the realm of “invalid argument” or “file not found” are development 101 type problems. Also, if your code is not exiting with an error on these problems I will say that you’re likely not writing your code very defensively either. e.g. error checking. Which generally is a very bad idea, and usually a sign of a novice developer.

My point however is not meant to belittle you. But instead it is meant to say that you really need to learn more in the context of Linux development in general, and then perhaps find / read a decent howto on spidev.

Another thing. These type of problems are not related to the hardware.

Just to state this again:

"PS.. "4.1.12-ti-r29" was way before i "fixed" spi/dma.. So you
really should upgrade: (unless you only plan to send 159 bytes over
spi)"

at the "160th" byte it locks up hard.. till you reboot..

Upgrade to:

sudo update
sudo apt-get install linux-image-4.1.15-ti-r43
sudo reboot

or

sudo update
sudo apt-get install linux-image-4.1.15-ti-rt-r43
sudo reboot

No sense using 4.1.12-ti-r29 and "trying" to get spi to work, as we
know it DOESN'T work :wink:

Regards,