Mercurial > hg > beaglert
changeset 393:814e85de67e1 prerelease
IDE can be started and set/unset startup from the Makefile
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 14 Jun 2016 16:26:34 +0100 |
parents | e4510c9eee94 |
children | b6b13f669174 |
files | Makefile |
diffstat | 1 files changed, 28 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Tue Jun 14 13:53:08 2016 +0100 +++ b/Makefile Tue Jun 14 16:26:34 2016 +0100 @@ -8,7 +8,7 @@ .DEFAULT_GOAL := Bela -NO_PROJECT_TARGETS=coreclean distclean stop help +NO_PROJECT_TARGETS=coreclean distclean stop help iderun idestop iderunup idenostartup NO_PROJECT_TARGETS_MESSAGE=PROJECT or EXAMPLE should be set for all targets except: $(NO_PROJECT_TARGETS) # Type `$ make help` to get a description of the functionalities of this Makefile. help: ## Show this help @@ -39,7 +39,7 @@ endif ifdef PROJECT - $(shell mkdir -p $(PROJECT_DIR)/build) + $(shell mkdir -p $(PROJECT_DIR)/build build/core) endif OUTPUT_FILE?=$(PROJECT_DIR)/$(PROJECT) @@ -48,7 +48,11 @@ BELA_STARTUP_SCRIPT?=/root/BeagleRT_startup.sh BELA_AUDIO_THREAD_NAME?=bela-audio SCREEN_NAME?=Bela - +BELA_IDE_STARTUP_SCRIPT?=/root/BeagleRT_node.sh +BELA_IDE_HOME?=/root/Bela/IDE +BELA_IDE_SCREEN_NAME?=Bela-IDE +BELA_IDE_RUN_COMMAND?=cd $(BELA_IDE_HOME) && screen -S $(BELA_IDE_SCREEN_NAME) -d -m node index.js +BELA_IDE_STOP_COMMAND?=screen -X -S $(BELA_IDE_SCREEN_NAME) quit > /dev/null RM := rm -rf STATIC_LIBS := ./libprussdrv.a ./libNE10.a @@ -257,6 +261,25 @@ stop: ## Stops any Bela program that is currently running stop: - @PID=`grep $(BELA_AUDIO_THREAD_NAME) /proc/xenomai/stat | cut -d " " -f 5 | sed s/\s//g`; if [ -z $$PID ]; then echo "No process to kill"; else echo "Killing old Bela process $$PID"; kill -2 $$PID; fi; screen -X -S $(SCREEN_NAME) quit > /dev/null; exit 0; +# @PID=`grep $(BELA_AUDIO_THREAD_NAME) /proc/xenomai/stat | cut -d " " -f 5 | sed s/\s//g`; if [ -z $$PID ]; then echo "No process to kill"; else echo "Killing old Bela process $$PID"; kill -2 $$PID; fi; screen -X -S $(SCREEN_NAME) quit > /dev/null; exit 0; + @PID=`grep $(BELA_AUDIO_THREAD_NAME) /proc/xenomai/stat | cut -d " " -f 5 | sed s/\s//g`; if [ -z $$PID ]; then echo "No process to kill"; else echo "Killing old Bela process $$PID"; fi; screen -X -S $(SCREEN_NAME) quit > /dev/null; exit 0; -.PHONY: all clean distclean help projectclean nostartup startup startuploop debug run runfg runscreen runscreenfg runscreenfifo stop +iderun: ## Starts the on-board IDE +iderun: + $(BELA_IDE_RUN_COMMAND) + +idestop: ## Stops the on-board IDE + @echo TODO + @exit 1 + +BELA_IDE_STARTUP_COMMAND=printf "\#!/bin/sh\n\#\n\# This file is autogenerated by Bela. Do not edit!\n\necho Running the Bela IDE...\n$(BELA_IDE_RUN_COMMAND)\n" > $(BELA_IDE_STARTUP_SCRIPT) + +iderunup: ## Enables the IDE at startup + @echo "Enabling the IDE at startup" + $(BELA_IDE_STARTUP_COMMAND) + @chmod +x $(BELA_IDE_STARTUP_SCRIPT) + +idenostartup: ## Disables the IDE at startup + @echo "Disabling the IDE at startup" + @printf "#!/bin/sh\n#\n\n# This file is autogenerated by Bela. Do not edit!\n\n# The Bela IDE is disabled on startup.\n" > $(BELA_IDE_STARTUP_SCRIPT) +.PHONY: all clean distclean help projectclean nostartup startup startuploop debug run runfg runscreen runscreenfg runscreenfifo stop iderun idestop iderunup idenostartup