From 93e46769a2a5436d73c4218bffdec6c342a09ad8 Mon Sep 17 00:00:00 2001 From: Mikael Asplund <mikael.asplund@liu.se> Date: Thu, 5 Nov 2020 15:55:57 +0100 Subject: [PATCH] Updated to work at home --- Lab1/BlinkTask/Makefile | 1 - Lab1/PhotoMeter/Makefile | 1 - Lab2/TrafficLight/Makefile | 2 +- Lab3/EnergyLPL/Makefile | 1 - TDDI07-settings.sh | 1 + setup-on-vm.sh | 19 +++++++++++++++++++ vm-settings.sh | 2 ++ 7 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 setup-on-vm.sh create mode 100644 vm-settings.sh diff --git a/Lab1/BlinkTask/Makefile b/Lab1/BlinkTask/Makefile index c8f802f..0150545 100644 --- a/Lab1/BlinkTask/Makefile +++ b/Lab1/BlinkTask/Makefile @@ -1,5 +1,4 @@ COMPONENT=BlinkTaskAppC -TINYOS_ROOT_DIR?=/courses/TDDI07/tinyos-main include $(TINYOS_ROOT_DIR)/Makefile.include diff --git a/Lab1/PhotoMeter/Makefile b/Lab1/PhotoMeter/Makefile index 7058eb5..045c8ed 100644 --- a/Lab1/PhotoMeter/Makefile +++ b/Lab1/PhotoMeter/Makefile @@ -1,5 +1,4 @@ COMPONENT=PhotoMeterAppC -TINYOS_ROOT_DIR?=/courses/TDDI07/tinyos-main CFLAGS += -I$(TINYOS_ROOT_DIR)/tos/lib/printf include $(TINYOS_ROOT_DIR)/Makefile.include diff --git a/Lab2/TrafficLight/Makefile b/Lab2/TrafficLight/Makefile index 863c279..295bb68 100644 --- a/Lab2/TrafficLight/Makefile +++ b/Lab2/TrafficLight/Makefile @@ -1,5 +1,5 @@ COMPONENT=TrafficLightAppC -TINYOS_ROOT_DIR?=/courses/TDDI07/tinyos-main + CFLAGS += -I$(TINYOS_ROOT_DIR)/tos/lib/printf PFLAGS = -DCC2420_DEF_CHANNEL=26 diff --git a/Lab3/EnergyLPL/Makefile b/Lab3/EnergyLPL/Makefile index 5b76c89..600799b 100644 --- a/Lab3/EnergyLPL/Makefile +++ b/Lab3/EnergyLPL/Makefile @@ -1,5 +1,4 @@ COMPONENT=EnergyLPLAppC -TINYOS_ROOT_DIR?=/courses/TDDI07/tinyos-main CFLAGS += -I$(TINYOS_ROOT_DIR)/tos/lib/printf CFLAGS += -DLOW_POWER_LISTENING diff --git a/TDDI07-settings.sh b/TDDI07-settings.sh index 7a92395..237dba2 100644 --- a/TDDI07-settings.sh +++ b/TDDI07-settings.sh @@ -1,2 +1,3 @@ +export TINYOS_ROOT_DIR=/courses/TDDI07/tinyos-main export PATH=$PATH:/courses/TDDI07/tinyos-tools/bin export CLASSPATH=/courses/TDDI07/tinyos-tools/lib/java/tinyos.jar:. diff --git a/setup-on-vm.sh b/setup-on-vm.sh new file mode 100644 index 0000000..7aca28c --- /dev/null +++ b/setup-on-vm.sh @@ -0,0 +1,19 @@ +#Note the current version of tinyos tools is not compatible with Java v. 14 and higher +sudo apt install build-essential python2.7 python-dev gcc-msp430 autoconf java-common openjdk-13-jdk emacs gperf bison flex + +wget https://www.ida.liu.se/~TDDI07/labs/files/tinyos-main.zip +unzip tinyos-main.zip + +git clone https://github.com/tinyos/nesc +cd nesc +./Bootstrap +./configure +make +sudo make install +cd .. + +cd tinyos-main/tools +./Bootstrap +./configure +make +sudo make install diff --git a/vm-settings.sh b/vm-settings.sh new file mode 100644 index 0000000..ff94cc2 --- /dev/null +++ b/vm-settings.sh @@ -0,0 +1,2 @@ +export TINYOS_ROOT_DIR=$HOME/tinyos-lab/tinyos-main +export CLASSPATH=$HOME/tinyos-lab/tinyos-main/tools/lib/java/tinyos.jar:. -- GitLab