terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Joe., luketeaford, lisa, Kent

Post Reply
thetechnobear
Wiggling with Experience
Posts: 374
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sat Aug 29, 2020 5:32 am

you do not need to be in the script directory, just run it (create_pi.sh) from the root of the repo.
e.g ./script/create_pi.sh

(btw: you should be using the TT form of it)

the orac repo contains all binaries need to build the 'orac image' which I distribute.

BUT beware that Orac really is only the pure data side of what you see, it is built upon a number of binaries... the main one is my Kontrol software, which is part of my MEC project (and so MEC) repo.
MEC is also 'platform' agnostic, so for some platforms it brings in other projects of mine - in this case TTUI, which is the C++ api I created for terminal tedium, and also contains sidekick.

however, as mentioned above, if you just need the binaries, then the orac binary already creates this.

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Sat Aug 29, 2020 7:54 am

hmm, tried again with a clean raspbian lite. and by adding the apt-tt repos.

packages orac, mec, sidekick download and install without errors. but the services somehow don't work.

sidekick seems to be restarting continuosly, as i can see in /var/log/syslog:
Aug 29 13:48:01 raspberrypi systemd[1]: Started Sidekick service for norns.
Aug 29 13:48:01 raspberrypi systemd[1]: sidekick.service: Main process exited, code=killed, status=4/ILL
Aug 29 13:48:01 raspberrypi systemd[1]: sidekick.service: Failed with result 'signal'.
Aug 29 13:48:01 raspberrypi systemd[1]: sidekick.service: Service RestartSec=100ms expired, scheduling restart.
Aug 29 13:48:01 raspberrypi systemd[1]: sidekick.service: Scheduled restart job, restart counter is at 60.
Aug 29 13:48:01 raspberrypi systemd[1]: Stopped target sidekick.
Aug 29 13:48:01 raspberrypi systemd[1]: Stopping sidekick.
Aug 29 13:48:01 raspberrypi systemd[1]: Starting sidekick-init...
Aug 29 13:48:01 raspberrypi systemd[1]: Stopped Sidekick service for norns.
Aug 29 13:48:01 raspberrypi systemd[1]: Starting Sidekick service for norns...
Aug 29 13:48:01 raspberrypi systemd[1]: sidekick-init.service: Succeeded.
Aug 29 13:48:01 raspberrypi systemd[1]: Started sidekick-init.
Aug 29 13:48:01 raspberrypi systemd[1]: Reached target sidekick.

thetechnobear
Wiggling with Experience
Posts: 374
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sat Aug 29, 2020 8:18 am

Sidekick service for norns ?

Is this just a typo in my service file? Is it definitely using the ttui version?


I’d need to see the log file for failing service which you can get via journalctl

Bare in mind GPIO pins and i2c addresses are ‘hardcoded’

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Sat Aug 29, 2020 8:33 am

yes it sais "Sidekick service for norns" in /etc/systemd/system/sidekick.service

here's what i get from journalctl -xe:
Aug 29 14:28:26 raspberrypi systemd[1]: Stopped target sidekick.
-- Subject: A stop job for unit sidekick.target has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit sidekick.target has finished.
--
-- The job identifier is 36576 and the job result is done.
Aug 29 14:28:26 raspberrypi systemd[1]: Stopping sidekick.
-- Subject: A stop job for unit sidekick.target has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit sidekick.target has begun execution.
--
-- The job identifier is 36576.
Aug 29 14:28:26 raspberrypi systemd[1]: Starting sidekick-init...
-- Subject: A start job for unit sidekick-init.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit sidekick-init.service has begun execution.
--
-- The job identifier is 36577.
Aug 29 14:28:26 raspberrypi systemd[1]: sidekick-init.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit sidekick-init.service has successfully entered the 'dead' state.
Aug 29 14:28:26 raspberrypi systemd[1]: Started sidekick-init.
-- Subject: A start job for unit sidekick-init.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit sidekick-init.service has finished successfully.
--
-- The job identifier is 36577.
Aug 29 14:28:26 raspberrypi systemd[1]: Reached target sidekick.
-- Subject: A start job for unit sidekick.target has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit sidekick.target has finished successfully.
--
-- The job identifier is 36576.



started trying to compile things, so i downloaded MEC and created the build directory and run "cmake .."
then i need to run make in the build directory? if yes, i get an error at certain point..

Scanning dependencies of target splite
[ 14%] Building CXX object external/SoundplaneLite/splite/CMakeFiles/splite.dir/splib/SoundplaneDriver.cpp.o
[ 15%] Building CXX object external/SoundplaneLite/splite/CMakeFiles/splite.dir/splib/SoundplaneModelA.cpp.o
[ 16%] Building CXX object external/SoundplaneLite/splite/CMakeFiles/splite.dir/splib/ThreadUtility.cpp.o
[ 17%] Building CXX object external/SoundplaneLite/splite/CMakeFiles/splite.dir/splib/SensorFrame.cpp.o
[ 18%] Building CXX object external/SoundplaneLite/splite/CMakeFiles/splite.dir/splib/TouchTracker.cpp.o
[ 19%] Building CXX object external/SoundplaneLite/splite/CMakeFiles/splite.dir/SPLiteDevice.cpp.o
[ 19%] Building CXX object external/SoundplaneLite/splite/CMakeFiles/splite.dir/splib/LibusbSoundplaneDriver.cpp.o
In file included from /home/we/MEC/external/SoundplaneLite/splite/splib/LibusbSoundplaneDriver.h:21,
from /home/we/MEC/external/SoundplaneLite/splite/splib/LibusbSoundplaneDriver.cpp:12:
/home/we/MEC/external/SoundplaneLite/splite/splib/Unpacker.h:83:35: error: 'function' in namespace 'std' does not name a template type
using GotFrameCallback = std::function<void(const SensorFrame &frame)>;
^~~~~~~~
/home/we/MEC/external/SoundplaneLite/splite/splib/Unpacker.h:83:30: note: 'std::function' is defined in header '<functional>'; did you forget to '#include <functional>'?
/home/we/MEC/external/SoundplaneLite/splite/splib/Unpacker.h:1:1:
+#include <functional>
// Driver for Soundplane Model A.
/home/we/MEC/external/SoundplaneLite/splite/splib/Unpacker.h:83:30:
using GotFrameCallback = std::function<void(const SensorFrame &frame)>;
^~~
/home/we/MEC/external/SoundplaneLite/splite/splib/Unpacker.h:85:30: error: expected ')' before 'gotFrame'
Unpacker(GotFrameCallback gotFrame) :
~ ^~~~~~~~~
)
/home/we/MEC/external/SoundplaneLite/splite/splib/Unpacker.h:184:11: error: 'GotFrameCallback' does not name a type
const GotFrameCallback mGotFrame;
^~~~~~~~~~~~~~~~

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Sat Aug 29, 2020 8:39 am

ok i think it's more "cmake --build ." out of the build directory. but i get the same errors i posted above..

sry - i am a very diletant "programmer"

thetechnobear
Wiggling with Experience
Posts: 374
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sat Aug 29, 2020 10:55 am

unless your into linux dev, id not start compiling, thats a whole rabbit whole of fun
(e.g. the above Id guess is an incorrect version of gcc for some reason)


as for the log, I need the log for the sidekick service, you should be able to get **just** this with

journalctl -u sidekick

(this is in the readme on github for orac)

btw: yeah just checked the 'norns' reference is just a cut n paste error

btw2: if your using the orac repo, by looking at checkins id say you'd want the dev ( not master, or tt)

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Sat Aug 29, 2020 11:19 am

heres what journalctl -u sidekick spits out:
Aug 29 15:24:43 raspberrypi systemd[1]: Starting Sidekick service for norns...
Aug 29 15:24:48 raspberrypi systemd[1]: Started Sidekick service for norns.
Aug 29 15:24:48 raspberrypi systemd[1]: sidekick.service: Main process exited, code=killed, status=4/ILL
Aug 29 15:24:48 raspberrypi systemd[1]: sidekick.service: Failed with result 'signal'.
Aug 29 15:24:48 raspberrypi systemd[1]: sidekick.service: Service RestartSec=100ms expired, scheduling restart.
Aug 29 15:24:48 raspberrypi systemd[1]: sidekick.service: Scheduled restart job, restart counter is at 1045.
Aug 29 15:24:49 raspberrypi systemd[1]: Stopped Sidekick service for norns.
Aug 29 15:24:49 raspberrypi systemd[1]: Starting Sidekick service for norns...
Aug 29 15:24:54 raspberrypi systemd[1]: Started Sidekick service for norns.
Aug 29 15:24:54 raspberrypi systemd[1]: sidekick.service: Main process exited, code=killed, status=4/ILL
Aug 29 15:24:54 raspberrypi systemd[1]: sidekick.service: Failed with result 'signal'.
Aug 29 15:24:54 raspberrypi systemd[1]: sidekick.service: Service RestartSec=100ms expired, scheduling restart.
Aug 29 15:24:54 raspberrypi systemd[1]: sidekick.service: Scheduled restart job, restart counter is at 1046.
Aug 29 15:24:54 raspberrypi systemd[1]: Stopped Sidekick service for norns.
Aug 29 15:24:54 raspberrypi systemd[1]: Starting Sidekick service for norns...
Aug 29 15:24:59 raspberrypi systemd[1]: Started Sidekick service for norns.
Aug 29 15:24:59 raspberrypi systemd[1]: sidekick.service: Main process exited, code=killed, status=4/ILL
Aug 29 15:24:59 raspberrypi systemd[1]: sidekick.service: Failed with result 'signal'.
Aug 29 15:24:59 raspberrypi systemd[1]: sidekick.service: Service RestartSec=100ms expired, scheduling restart.
Aug 29 15:24:59 raspberrypi systemd[1]: sidekick.service: Scheduled restart job, restart counter is at 1047.
Aug 29 15:24:59 raspberrypi systemd[1]: Stopped Sidekick service for norns.
Aug 29 15:24:59 raspberrypi systemd[1]: Starting Sidekick service for norns...
Aug 29 15:25:05 raspberrypi systemd[1]: Started Sidekick service for norns.
Aug 29 15:25:05 raspberrypi systemd[1]: sidekick.service: Main process exited, code=killed, status=4/ILL
Aug 29 15:25:05 raspberrypi systemd[1]: sidekick.service: Failed with result 'signal'.
Aug 29 15:25:05 raspberrypi systemd[1]: sidekick.service: Service RestartSec=100ms expired, scheduling restart.
Aug 29 15:25:05 raspberrypi systemd[1]: sidekick.service: Scheduled restart job, restart counter is at 1048.
Aug 29 15:25:05 raspberrypi systemd[1]: Stopped Sidekick service for norns.


i agree with you - i'd be best to keep my hand off the compilers - but anyway. i tried with MEC: i get some errors from the soundplanelite stuff. is there a flag i can use to disable compilation of the SPLITE stuff? i think it runs through then, and i then could replace some of MECs binaries.. isn't that worth a shot?

User avatar
gbiz
Super Deluxe Wiggler
Posts: 1056
Joined: Tue May 07, 2013 11:20 am
Location: Sussex, UK

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by gbiz » Sat Aug 29, 2020 11:34 am

As nobody else has mentioned it, a general observation on this from a linux/unix perspective ...

Whatever it is you are running there is being killed due to an illegal instruction (SIGILL, signal 4). pd was reporting the same thing in the logs on the previous page. As it's the only issue you're getting it's likely down to the binary itself being compiled for the wrong architecture, or one or more of the shared libraries it's linked against being for the wrong arch. (If you were experiencing other issues away from this then i'd suggest it could be faulty memory/disk etc, but it doesn't look like you are).

You can use "file" to show what architecture a binary is compiled for. Use "ldd" to show the shared libraries the binary is linked against. If you suspect any of those, use "file" to show what those were compiled for.

SIGILL will dump a core file, unless core dumps are disabled. If you have the core file you can use gdb to determine what's the issue is. ("man 5 core" will details how you find where systemd is storing the corefile).

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Sat Aug 29, 2020 12:41 pm

i enabled writeing core dumps with ulimit -c unlimited - but i can't find a dumpfile in /proc/sys/ anywhere. nor here: /var/lib/systemd/coredump/

i ran the file command on the /usr/local/sidekick directory:
we@raspberrypi:/usr/local/sidekick$ file *
libarduiPi_OLED.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=4950593bde449b8daa5a70439fbf6fbdffb2a538, with debug_info, not stripped
libcjson.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=199a797e7d5b1ee77e5b04b77aefdb4bcac4175c, not stripped
liboscpack.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=cb39c2f284421a425a9b9ba71a974971f580c2ca, with debug_info, not stripped
libttuilite.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=4fa00e54381d9ec460870b4b211b239056d22bd5, with debug_info, not stripped
patches: directory
pdexternals: directory
post-patch.sh: ASCII text
sidekick: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=e85718fc64aceed8f61fc6238a742a01a5c7044d, with debug_info, not stripped
sidekick-init.service: ASCII text
sidekick.json: JSON data
sidekick.service: ASCII text
sidekick-state.json: JSON data
sidekick.target: ASCII text
start_sc.sh: ASCII text
startup.scd: ASCII text
stop_sc.sh: ASCII text
ttuisdk: directory


here the ones from /usr/local/MEC:
we@raspberrypi:/usr/local/MEC$ file *
49-axoloti.rules: ASCII text
59-soundplane.rules: ASCII text
69-eigenharp.rules: ASCII text
79-push2.rules: ASCII text
a2dump: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=8afcf403bc2d8b0c94311eb6fc30bd4fa7bb764e, with debug_info, not stripped
bs_mm_fw_0103.ihx: ASCII text
KontrolModule.pd_linux: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=3dba0210abd2e53bf28f2aee2f32882318bd2920, with debug_info, not stripped
KontrolRack.pd_linux: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=2ed018411af300f7378efe9ecd268aee9a025ceb, with debug_info, not stripped
libarduiPi_OLED.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=4950593bde449b8daa5a70439fbf6fbdffb2a538, with debug_info, not stripped
libcjson.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=199a797e7d5b1ee77e5b04b77aefdb4bcac4175c, not stripped
libeigenapi.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=9e240867834f51fc3e25efc503eeb847c05c36d1, with debug_info, not stripped
libmec-api.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=e7effcc0c5a042ace7d99257ad1764379e001fba, with debug_info, not stripped
libmec-eigenharp.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=3cbeebb11c0b51684bb6a32644514ab9674922ce, with debug_info, not stripped
libmec-kontrol-api.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=1cb6e9957be01e6c879eb869540239f83a457e92, with debug_info, not stripped
libmec-push2.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=8f4708cc99bdcb30e50f82d219e22889bf5504ab, with debug_info, not stripped
libmec-soundplane.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=ceabd32e22ad08b121d81d419a995b04dbd2feb9, not stripped
libmec-utils.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=10fc95d1da30b23596003f86bd9549a26beaaf2a, with debug_info, not stripped
liboscpack.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=cb39c2f284421a425a9b9ba71a974971f580c2ca, with debug_info, not stripped
libpicodecoder.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=58ba6a4e3624039b404a0fe10337d0300621c5a1, not stripped
libportaudio.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=e6acc553bf2d0b5182843e3ce5c7417725365d2a, with debug_info, not stripped
librtmidi.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=be6df94f764ee6a0807e0bfe9ca0883e3d1e08ba, with debug_info, not stripped
libsplite.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=bc20bc25d1fc690cd4cfe26ce4680a9671d727b6, with debug_info, not stripped
libttuilite.so: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=4fa00e54381d9ec460870b4b211b239056d22bd5, with debug_info, not stripped
mec-app: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=3cc9903c2f0b472eae00dbf6d9aceb3490357e91, with debug_info, not stripped
mec.service: ASCII text
orac.pbm: Netpbm image data, size = 128 x 64, rawbits, bitmap
osc_eigen.json: JSON data
osc_kontrol.json: JSON data
osc_soundplane.json: JSON data
picodump: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=7719388c8e00f55e364c59323ca0036b03ef1687, with debug_info, not stripped
pico.ihx: ASCII text
psu_mm_fw_0102.ihx: ASCII text
push_kontrol.json: JSON data
soundplanetest: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=e83bd79bde4a13118fd07ac56051a4c153419c38, with debug_info, not stripped
splitedevtest: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=cb52f4de3f4daa9efdc3f6bc5959052adf98fc60, with debug_info, not stripped
t_kontrol: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=cbbc5e81a0e376a936496056422ea0cd31548c45, with debug_info, not stripped
touchtrackertest: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=83108fb4edfd82bab9ff1686d9023d34565cd200, with debug_info, not stripped
t_scale: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=cbad7c74f1cac60ca83e3656ef4540d5b7e4c3f1, with debug_info, not stripped
t_surface: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=e00e018422dc3ea35d75d0dd4fb577bb1424ea1f, with debug_info, not stripped
ttuitest: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=68a9b67b82a9227b47226b35e949d34ecf95a7b0, with debug_info, not stripped
t_voice: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=d06178a7877230e302f7bc5cee6b9ed9ca1726fe, with debug_info, not stripped



i comparison to the files in /usr/bin: (just the files starting with a y)
we@raspberrypi:/usr/local/sidekick$ file /usr/bin/y*
/usr/bin/yes: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=d6bd14b193d8d4479c5ed1f44743bd7721466f6c, stripped


doesn't look like compiled for a very foreign architeture.. but it could still be an issue, the zero is bcm2835 and the newer pi's are bcm2837???

User avatar
gbiz
Super Deluxe Wiggler
Posts: 1056
Joined: Tue May 07, 2013 11:20 am
Location: Sussex, UK

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by gbiz » Sat Aug 29, 2020 1:11 pm

Yes that could be it.
I had a quick look into what could cause SIGILL on the Pi. Binaries built for ARMv7 or 8 would do this on an an ARMv6.
File doesn't show the architecture the binary is built for, which is why they possibly all look the same, but "readelf -A " shows the cpu arch the binary was built for. Try it against a few of the binaries above, including /usr/bin/yes as a reference.

(disclaimer ... I don't have much experience with the Pi)

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Sat Aug 29, 2020 2:09 pm

ok - with the readelf -A it says v7 for the sidekick/MEC stuff and v6 for the binaries in /usr/bin
if i read on in the interwebs, v7 and v8 are backwards compatible to v6 so they can run v6 code.. but it seems the zero cannot run v7 & v8 code.


we@raspberrypi:/usr/local/MEC$ readelf -A mec-app
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "7-A"
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_rounding: Needed
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: int
Tag_ABI_VFP_args: VFP registers
Tag_CPU_unaligned_access: v6
we@raspberrypi:/usr/local/MEC$ readelf -A ../sidekick/sidekick
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "7-A"
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_rounding: Needed
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: int
Tag_ABI_VFP_args: VFP registers
Tag_CPU_unaligned_access: v6
we@raspberrypi:/usr/local/MEC$ readelf -A /usr/bin/yes
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "6"
Tag_CPU_arch: v6
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv2
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_rounding: Needed
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: int
Tag_ABI_VFP_args: VFP registers
Tag_CPU_unaligned_access: v6

thetechnobear
Wiggling with Experience
Posts: 374
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sat Aug 29, 2020 2:21 pm

I think MEC and sidekick are compiled with '-march=armv7-a -mfpu=neon -mfloat-abi=hard' , so compiler will optimise (so use instructions) for this architecture. (sorry, not used pi zero, so dont know what its using)

`is there a flag i can use to disable compilation of the SPLITE stuff? i t`
if you look in the CMake file you'll find it , along with other things you can disable....

saying that, you're better to start with compiling ttuilite, and see if you can get sidekick to run,
thats where the hardware interaction is done.

btw: you dont need to get MEC running on TT, you only actually need the KontrolRack/KontrolModule Pd externals


also if the compile options are wrong, then Id expect the mutable instrument externals (of mine) will also need recompiling (Mi4Pd)

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Sat Aug 29, 2020 2:29 pm

i shall bleed for using a zero instead of the CM3+ :bang:

i'll have a look at the CMake file.. i hope i'll manage..

will let you know progress on these things. but for today - that's it.

thanks technobear and gbiz for your help!!

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Sun Aug 30, 2020 4:16 am

OK i change the CXX_FLAGS for unix build to:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv6+fp -mfpu=vfp -mfloat-abi=hard")

when i check the resulting libraries/binaries with readelf for their architecture they now show armv6 and also mfpu is not neon anymore but vfp.


and i also added the two statement to CMakeLists.txt:
set(DISABLE_SOUNDPLANELITE 1)
set(DISABLE_EIGENHARP 1)


that should diable these two from being built?

it compiles for a while but when reaching the mec-api it's still searching for some soundplane stuff and failing due to some errors:
[ 84%] Building CXX object mec-api/CMakeFiles/mec-api.dir/devices/push2/mec_push2_preset.cpp.o
[ 86%] Building CXX object mec-api/CMakeFiles/mec-api.dir/devices/mec_oscdisplay.cpp.o
[ 88%] Linking CXX shared library ../release/lib/libmec-api.so
/usr/bin/ld: cannot find -lsplite
collect2: error: ld returned 1 exit status
make[2]: *** [mec-api/CMakeFiles/mec-api.dir/build.make:320: release/lib/libmec-api.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:728: mec-api/CMakeFiles/mec-api.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

[1]+ Exit 2 make


can i disable the device support for soundplane in the mec-api "somehow easy" ?

sorry for all the questions..

thetechnobear
Wiggling with Experience
Posts: 374
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sun Aug 30, 2020 7:36 am

You can set DISABLE_SOUNDPLANELITE from command line when invoking cmake, no need to edit cmake files.

I’m not sure why it’s not working for you, since cmake looks to be using this in mec-api ( I checked dev branch)

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Sun Aug 30, 2020 9:40 am

i have good news - and i have bad news.

i was on master branch, switched to the dev branch and things compiled with the armv6 as target achitecture.

now sidekick and mec daemons are running, but pd still crashes with a signal 4. so i guess i have to recompile each and every external in the orac directory.. on to it.
and i need a toolchain to crosscompile. it's not fun to compile on the zero..
Screenshot 2020-08-30 at 16.32.57.png
You do not have the required permissions to view the files attached to this post.

thetechnobear
Wiggling with Experience
Posts: 374
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Sun Aug 30, 2020 11:55 am

cool..
so if you have already compiled and copied KontrolRack and KontrolModule (part of mec) ,
then i suspect its the MI modules, as i think i use those in the 'demo patch' that is loaded at startup.

the other thing is... there are a whole bunch of PD externals that are from other sources (ie not mine) , these are used by various 'factory' modules.
... i guess you should be able to find these on decken?

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Sun Aug 30, 2020 12:03 pm

yes - it's a little progress :)

unfortunatetly it's not the MI externals, as i compiled them as well for armv6..
but as you said - there are still some (14) that are not for the zeros architecture.
i'm gonna try to find them..

thetechnobear
Wiggling with Experience
Posts: 374
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Mon Aug 31, 2020 5:55 am

:( unfortunately the others i dont have the source for, nor compiled...

if they are not on deken ,
they are probably in pd-extended which you can find the source for.
hopefully should not be to hard to build from the source.

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Mon Aug 31, 2020 11:19 am

that was also my first place to look at - the source files of pd-extended.
but this week is horribly full of work... :(

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Fri Sep 04, 2020 6:53 am

ok i have the OSC stuff compiled from pd-extended source.

i still have some shared libraries missing from MEC:
libmec-soundplane.so
libmec-eigenharp.so
ttuitest

and from the orac/externals directory:
libarduiPi_OLED.so

and some more from orac/externals i didnt look into - but i think i'll find them..

what source files do they get compiled from?

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Sun Sep 06, 2020 6:54 am

aaaarh - it's bugging me.. somehow orac seems to run (no display yet) - but i can hear the demo playing (with some glitches).
...and something eats up all CPU. the system gets unusable busy. so i had to remove the systemd service files manually before beeing able to login again..
but it's still some progress...

when i look at my older orac installation on my TT/computemodule with the two displays - i don't have all the MEC/sidekick daemons running..
what are the essential components needed that are located outside the /usr/local/orac directory?

thetechnobear
Wiggling with Experience
Posts: 374
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Mon Sep 07, 2020 5:16 am

screen - my guess would be i2c address, that requires a code change.
(if its not that then Id need to debug it)

btw: in ttuilite repo there is a test program iirc

service file lock ups... thats probably just linux constantly restarting services that are failed.
if they were working, they would require very little cpu

audio glitches, could be the above... or you have not got the rPI into performance mode.


- mec should not be needed to RUN (but the TT external is part of it for building purposes)
- sidekick is 'optional' - you can run orac directly , sidekick just allows you to switch between other 'applications'

so for testing you can simply run PD as per orac.service
Note: it **MUST** be run as root, since access to gpio/oled requires root permissions.

User avatar
seismic
Common Wiggler
Posts: 219
Joined: Tue Feb 04, 2014 1:48 pm
Location: Zürich, Switzerland
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by seismic » Mon Sep 07, 2020 7:45 am

thanks for the reply:

displays:
when i check with "i2cdetect -y 1" they reside on 0x3c and 0x3d. like on my other TT.

i checked that ttuitest thing out, that gives some more news (bad ones sadly)
192.168.1.106 ~/zerOrac/TTuiLite/build/release/bin $ sudo ./ttuitest
starting test
draw bitmap
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted


will try to dig into this... as good as i can.

so i basically only need all the stuff in the orac directory.
so it's "mostly" kontrolmodule/rack and the stuff from TTuilite that has to reside there?

thetechnobear
Wiggling with Experience
Posts: 374
Joined: Wed Feb 11, 2015 8:17 am
Contact:

Re: terminal tedium (raspberry zero, pi2, pi3 codec / pd thing)

Post by thetechnobear » Mon Sep 07, 2020 9:58 am

ttuitest i think requires the orac image (orac.pbm) to be in the current directory.

Post Reply

Return to “Music Tech DIY”