Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libbelafull : a complete bela lib #626

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@
/updates/
include/pru_rtaudio_bin.h
IDE/public/media
pru_rtaudio.txt
pru_rtaudio_irq.txt
resources/tools/bela-cape-btn/bela-cape-btn
resources/tools/board_detect/board_detect
resources/tools/mcasp-dump-tool/mcasp-dump-tool
lib/libbelafull.*
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DISTCC ?= 0 # set this to 1 to use distcc by default
%.d:

AT?=@
NO_PROJECT_TARGETS=help coreclean distclean startup startuploop stopstartup stoprunning stop nostartup connect_startup connect idestart idestop idestartup idenostartup ideconnect scsynthstart scsynthstop scsynthconnect scsynthstartup scsynthnostartup update checkupdate updateunsafe lib lib/libbela.so lib/libbelaextra.so lib/libbela.a lib/libbelaextra.a csoundstart
NO_PROJECT_TARGETS=help coreclean distclean startup startuploop stopstartup stoprunning stop nostartup connect_startup connect idestart idestop idestartup idenostartup ideconnect scsynthstart scsynthstop scsynthconnect scsynthstartup scsynthnostartup update checkupdate updateunsafe lib lib/libbela.so lib/libbelaextra.so lib/libbela.a lib/libbelaextra.a csoundstart lib/libbelafull.a libbelafull
NO_PROJECT_TARGETS_MESSAGE=PROJECT or EXAMPLE should be set for all targets except: $(NO_PROJECT_TARGETS)
# list of targets that automatically activate the QUIET=true flag
QUIET_TARGETS=runide
Expand Down Expand Up @@ -788,6 +788,18 @@ lib/$(LIB_A): $(LIB_OBJS) $(PRU_OBJS) $(LIB_DEPS)

lib: lib/libbela.so lib/libbela.a lib/libbelaextra.so lib/libbelaextra.a



LIB_FULL_A = libbelafull.a
LIB_FULL_OBJS = build/*/*.o libraries/*/build/*.o

lib/$(LIB_FULL_A): $(LIB_FULL_OBJS) $(PRU_OBJS) $(LIB_DEPS)
$(AT) echo Building lib/$(LIB_FULL_A)
$(AT) ar rcs lib/$(LIB_FULL_A) $(LIB_FULL_OBJS)

libbelafull: lib/libbelafull.a


HEAVY_TMP_DIR=/tmp/heavy-bela/
HEAVY_SRC_TARGET_DIR=$(PROJECT_DIR)
HEAVY_SRC_FILES=$(HEAVY_TMP_DIR)/*.cpp $(HEAVY_TMP_DIR)/*.c $(HEAVY_TMP_DIR)/*.hpp $(HEAVY_TMP_DIR)/*.h
Expand Down
11 changes: 11 additions & 0 deletions resources/pepper/rootfs/lib/systemd/system/bela_button.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=Monitor the Bela cape button
After=networking-online.target

[Service]
Type=simple
ExecStart=/usr/bin/stdbuf -oL -eL /usr/local/bin/bela-cape-btn --pin 89 --hold /opt/Bela/bela_button_hold.sh --delay 5 --monitor-click 0 --verbose --hold-press-timeout-ms 2000 --pressed 1
Environment=HOME=/root

[Install]
WantedBy=default.target
9 changes: 9 additions & 0 deletions resources/pepper/rootfs/opt/Bela/local/bela_button_hold.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
[ -z "$BELA_HOME" ] && BELA_HOME=/root/Bela

echo "Stopping the running Bela program"
make -C "$BELA_HOME" stoprunning

# bela button services appears to not be able to poll after
# patch is restarted on pepper
systemctl restart bela_button
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=networking-online.target

[Service]
Type=simple
ExecStart=/usr/bin/stdbuf -oL -eL /usr/local/bin/bela-cape-btn --pin 60 --hold /opt/Bela/bela_button_hold.sh --delay 10 --monitor-click 0 --verbose --hold-press-timeout-ms 1000
ExecStart=/usr/bin/stdbuf -oL -eL /usr/local/bin/bela-cape-btn --pin 60 --hold /opt/Bela/bela_button_hold.sh --delay 10 --monitor-click 0 --verbose --hold-press-timeout-ms 2000
Environment=HOME=/root

[Install]
Expand Down