Commit 03961c5b authored by Nelso Jost's avatar Nelso Jost

NEW: ino tools for command line compiling and uploading sketch;

parent a7e1c47e
PY := 2
VENV := .venv
all: help
help:
@ echo "USAGE"
@ echo ""
@ echo " make apt-install -- Uses apt to install system tools"
@ echo ""
@ echo " make setup -- Install Python requirements"
@ echo ""
@ echo " make build -- Compile the sketch"
@ echo ""
@ echo " make upload -- Send the compiled sketch to the board"
@ echo ""
@ echo " make serial -- Starts a picocom serial communication"
apt-install:
sudo apt-get install python-pip picocom
setup: clean-venv
@ echo "-------------------------------------------------------"
virtualenv -v --python='python${PYVER}' ${VENV}
@ echo "Virtualenv with 'python${PYVER}' interpreter was created at ${VENV}"
@ echo "-------------------------------------------------------"
${VENV}/bin/pip${PYVER} install --upgrade pip
@ echo "-------------------------------------------------------"
${VENV}/bin/pip${PYVER} install -r requirements.pip
@ echo "-------------------------------------------------------"
@ echo "Virtualenv is ready at ${VENV}!"
@ echo " "
@ echo "TOTAL SIZE: "
@ du -sh ${VENV}
clean-venv:
rm -rf ${VENV}
clean:
rm -rf .build src/*
build:
rm -rf src/*
cp -rf ../meteorolog/. src/
${VENV}/bin/ino build
upload:
${VENV}/bin/ino upload
serial:
${VENV}/bin/ino serial -- -c
board-model = uno
serial-port = /dev/ttyACM0
PY := python3
PY := 3
VENV := .venv
all: help
......@@ -6,7 +6,7 @@ all: help
help:
@ echo "USAGE:"
@ echo ""
@ echo " make deb-install -- Uses apt to install required system tools"
@ echo " make apt-install -- Uses apt to install required system tools"
@ echo " (for Debian-based systems only)"
@ echo ""
@ echo " make setup -- Create a local Python virtual environment"
......@@ -22,20 +22,18 @@ help:
@ echo ""
@ echo " make tail-exec -- Follow the logger's execution.log"
setup: venv
apt-install:
sudo apt-get install python3 python3-pip supervisor
sudo pip3 install virtualenv
sudo apt-get install python python3-pip supervisor
sudo pip${PYVER} install virtualenv
venv: clean-venv
setup: clean-venv
@ echo "-------------------------------------------------------"
virtualenv -v --python='${PY}' ${VENV}
@ echo "Virtualenv with interpreter '${PY}' was created at ${VENV}"
virtualenv -v --python='python${PYVER}' ${VENV}
@ echo "Virtualenv with 'python${PYVER}' interpreter was created at ${VENV}"
@ echo "-------------------------------------------------------"
${VENV}/bin/pip3 install --upgrade pip
${VENV}/bin/pip${PYVER} install --upgrade pip
@ echo "-------------------------------------------------------"
${VENV}/bin/pip3 install -r requirements.pip
${VENV}/bin/pip${PYVER} install -r requirements.pip
@ echo "-------------------------------------------------------"
@ echo "Virtualenv is ready at ${VENV}!"
@ echo " "
......@@ -46,13 +44,13 @@ clean-venv:
rm -rf ${VENV}
run:
sudo ${VENV}/bin/python3 logger.py
sudo ${VENV}/bin/python${PYVER} logger.py
deploy:
sudo ${VENV}/bin/python3 deploy.py
sudo ${VENV}/bin/python${PYVER} deploy.py
undeploy:
sudo ${VENV}/bin/python3 deploy.py -u
sudo ${VENV}/bin/python${PYVER} deploy.py -u
tail-exec:
tail -F logs/execution.log
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment