Mercurial > hg > beaglert
changeset 396:922535948800 prerelease
merge
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 14 Jun 2016 18:15:23 +0100 |
parents | a4e49a3d9948 (diff) d107cb121bfa (current diff) |
children | 5848f5c8bc39 |
files | Makefile |
diffstat | 3 files changed, 33 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Tue Jun 14 18:11:35 2016 +0100 +++ b/Makefile Tue Jun 14 18:15:23 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 @@ -29,6 +29,7 @@ # if we are building an example, just copy it to the projects/ folder # and then treat it as a project ifdef EXAMPLE + #you can alternatively specify PROJECT= along with EXAMPLE= PROJECT?=exampleTempProject PROJECT_DIR?=$(abspath projects/$(PROJECT)) $(shell mkdir -p $(abspath projects)) @@ -39,17 +40,21 @@ endif ifdef PROJECT - $(shell mkdir -p $(PROJECT_DIR)/build) + $(shell mkdir -p $(PROJECT_DIR)/build build/core) endif OUTPUT_FILE?=$(PROJECT_DIR)/$(PROJECT) COMMAND_LINE_OPTIONS?=$(CL) RUN_COMMAND?=$(OUTPUT_FILE) $(COMMAND_LINE_OPTIONS) -RUN_IDE_COMMAND?=stdbuf -i0 -o0 -e0 $(OUTPUT_FILE) $(COMMAND_LINE_OPTIONS) +RUN_IDE_COMMAND?=stdbuf -i0 -o0 -e0 $(RUN_COMMAND) 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 @@ -204,7 +209,7 @@ clean: projectclean coreclean: ## Remove the core's build objects - -$(RM) build/* + -$(RM) build/core/* prompt: @printf "Warning: you are about to DELETE the projects/ folder and its content. This operation cannot be undone. Continue? (y/N) " @@ -261,6 +266,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
--- a/core/WriteFile.cpp Tue Jun 14 18:11:35 2016 +0100 +++ b/core/WriteFile.cpp Tue Jun 14 18:15:23 2016 +0100 @@ -119,7 +119,7 @@ } } -void WriteFile::log(float* array, int length){ +void WriteFile::log(const float* array, int length){ for(int n = 0; n < length; n++){ log(array[n]); }
--- a/include/WriteFile.h Tue Jun 14 18:11:35 2016 +0100 +++ b/include/WriteFile.h Tue Jun 14 18:15:23 2016 +0100 @@ -90,7 +90,7 @@ * This is ignored in binary mode. */ void setFooter(const char* newFooter); - void log(float* array, int length); + void log(const float* array, int length); void log(float value); void init(const char* filename);