summaryrefslogtreecommitdiff
path: root/ma
diff options
context:
space:
mode:
authorjaseg <git-bigdata-wsl-arch@jaseg.de>2020-07-05 16:18:49 +0200
committerjaseg <git-bigdata-wsl-arch@jaseg.de>2020-07-05 16:18:49 +0200
commit7eb5a8652eee2271de897c79f4f0c14eea2d1264 (patch)
tree6e55587952a5637a9d05999e054f2945c8338a33 /ma
parent01f7fd6e6d500ec577daa482f4e544416cc779ae (diff)
downloadmaster-thesis-7eb5a8652eee2271de897c79f4f0c14eea2d1264.tar.gz
master-thesis-7eb5a8652eee2271de897c79f4f0c14eea2d1264.tar.bz2
master-thesis-7eb5a8652eee2271de897c79f4f0c14eea2d1264.zip
ma: work on final build
Diffstat (limited to 'ma')
-rw-r--r--ma/Makefile35
-rw-r--r--ma/safety_reset.tex67
2 files changed, 69 insertions, 33 deletions
diff --git a/ma/Makefile b/ma/Makefile
index 799d885..2999ef9 100644
--- a/ma/Makefile
+++ b/ma/Makefile
@@ -8,6 +8,8 @@ SHELL := bash
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
+VERSION_STRING := $(shell git describe --tags --long --dirty)
+
all: safety_reset.pdf
#safety_reset.pdf: resources/grid_freq_estimation.pdf
@@ -15,22 +17,51 @@ all: safety_reset.pdf
#safety_reset.pdf: resources/dsss_experiments-ber.pdf
#safety_reset.pdf: resources/freq_meas_validation_rocof_testsuite.pdf
-%.pdf: %.tex %.bib version.tex
+%.pdf %-extra-appendices.pdf: %.tex %.bib version.tex
pdflatex -shell-escape $<
biber $*
pdflatex -shell-escape $<
+ pdflatex -shell-escape -jobname $*-extra-appendices "\def\includenotebooks{1} \def\includefirmwaresources{1} \input{$<}"
+ biber $*-extra-appendices
+ pdflatex -shell-escape -jobname $*-extra-appendices "\def\includenotebooks{1} \def\includefirmwaresources{1} \input{$<}"
.PHONY: preview
preview:
pdflatex -shell-escape safety_reset.tex
version.tex: safety_reset.tex safety_reset.bib
- git describe --tags --long --dirty > $@
+ echo "${VERSION_STRING}" > $@
resources/%.pdf: $(LAB_PATH)/%.ipynb
jupyter-nbconvert --to=pdf --output-dir=resources --output=$* --LatexExporter.template_file=resources/nbexport.tplx $^
+sdcard: safety_reset.pdf
+ rm -rf sdcard
+ mkdir -p sdcard
+ git clone .. sdcard/git
+ cp safety_reset.pdf sdcard/thesis-goette-${VERSION_STRING}.pdf
+ cp safety_reset-extra-appendices.pdf sdcard/thesis-goette-with-sources-${VERSION_STRING}.pdf
+ mkdir -p sdcard/data
+ cp ../controller/fw/src/EasyMeter_Q3DA1002_V3.03_fw_dump_0xc000.h \
+ '../lab-windows/dsss_experiments_res-2020-04-11 13:54:54.json' \
+ '../lab-windows/dsss_experiments_res-2020-04-16 16:55:49.json' \
+ '../lab-windows/dsss_experiments_res-2020-04-16 16:56:46.json' \
+ '../lab-windows/dsss_experiments_res-2020-04-16 17:24:04.json' \
+ '../lab-windows/dsss_experiments_res-2020-05-06 19:35:22.json' \
+ '../lab-windows/dsss_experiments_res-2020-07-04 16:43:39.json' \
+ ../lab-windows/dsss_test_signals/dsss_test_noisy_padded.bin \
+ ../lab-windows/emulated_adc_readings_01.bin \
+ ../lab-windows/filtered_freq.bin \
+ ../lab-windows/grid_freq_psd_spl_108pt.json \
+ ../lab-windows/raw_freq.bin \
+ ../lab-windows/synth_sig_test_0123_01.flac \
+ ../lab-windows/synth_sig_test_0123_02.flac \
+ ../lab-windows/waveform.sqlite3 \
+ sdcard/data/
+ cp ../data/* sdcard/data/
+
.PHONY: clean
clean:
rm -f safety_reset.aux safety_reset.bbl safety_reset.bcf safety_reset.log safety_reset.blg
rm -f safety_reset.out safety_reset.run.xml texput.log
+
diff --git a/ma/safety_reset.tex b/ma/safety_reset.tex
index 1c1576c..38bc54a 100644
--- a/ma/safety_reset.tex
+++ b/ma/safety_reset.tex
@@ -2724,12 +2724,6 @@ public repository listed on the second page of this document.
\newpage
\appendix
-%\chapter{Transcripts of Jupyter notebooks used in this thesis}
-
-%\includenotebook{Grid frequency estimation}{grid_freq_estimation}
-%\includenotebook{Grid frequency estimation validation against ROCOF test suite}{freq_meas_validation_rocof_testsuite}
-%\includenotebook{Frequency sensor clock stability analysis}{gps_clock_jitter_analysis}
-%\includenotebook{DSSS modulation experiments}{dsss_experiments-ber}
\chapter{Frequency sensor schematics}
\label{sec-app-freq-sens-schematics}
@@ -2743,36 +2737,47 @@ public repository listed on the second page of this document.
\includepdf[fitpaper,landscape,pagecommand={\thispagestyle{fancy}}]{resources/platform-export-pg3.pdf}
\fancyfoot[C]{\thepage}
-%\chapter{Firmware source code excerpts}
-%\section{DMA-backed ADC capture (adc.c)}
-%\inputminted[fontsize=\footnotesize,linenos,firstline=18,lastline=115,breaklines]{C}{../gm_platform/fw/adc.c}
-%
-%\section{Frequency sensor packetized serial interface}
-%\subsection{serial.c}
-%\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../gm_platform/fw/serial.c}
-%\subsection{packet\_interface.c}
-%\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../gm_platform/fw/packet_interface.c}
-%\subsection{cobs.c}
-%\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../gm_platform/fw/cobs.c}
-%\subsection{Host data logging utility (tw\_test.py)}
-%\inputminted[fontsize=\footnotesize,linenos,breaklines]{python}{../gm_platform/fw/tw_test.py}
-%
-%\section{Frequency estimation (freq\_meas.c)}
-%\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../controller/fw/src/freq_meas.c}
-%\section{DSSS demodulation (dsss\_demod.c)}
-%\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../controller/fw/src/dsss_demod.c}
-%\section{Cryptographic protocol handling}
-%\subsection{protocol.c}
-%\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../controller/fw/src/protocol.c}
-%\subsection{crypto.c}
-%\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../controller/fw/src/crypto.c}
-
-
\chapter{Demonstrator firmware symbol size map}
\emph{Please find this appendix enclosed in the pouch on the inside of the back cover.}
\label{symbol_size_chart}
\includepdf[fitpaper]{resources/safetyreset-symbol-sizes.pdf}
+\ifdefined\includenotebooks
+\chapter{Transcripts of Jupyter notebooks used in this thesis}
+
+\includenotebook{Grid frequency estimation}{grid_freq_estimation}
+\includenotebook{Grid frequency estimation validation against ROCOF test suite}{freq_meas_validation_rocof_testsuite}
+\includenotebook{Frequency sensor clock stability analysis}{gps_clock_jitter_analysis}
+\includenotebook{DSSS modulation experiments}{dsss_experiments-ber}
+\fi
+
+\ifdefined\includefirmwaresources
+\chapter{Firmware source code excerpts}
+\section{DMA-backed ADC capture (adc.c)}
+\inputminted[fontsize=\footnotesize,linenos,firstline=18,lastline=115,breaklines]{C}{../gm_platform/fw/adc.c}
+
+\section{Frequency sensor packetized serial interface}
+\subsection{serial.c}
+\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../gm_platform/fw/serial.c}
+\subsection{packet\_interface.c}
+\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../gm_platform/fw/packet_interface.c}
+\subsection{cobs.c}
+\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../gm_platform/fw/cobs.c}
+\subsection{Host data logging utility (tw\_test.py)}
+\inputminted[fontsize=\footnotesize,linenos,breaklines]{python}{../gm_platform/fw/tw_test.py}
+
+\section{Frequency estimation (freq\_meas.c)}
+\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../controller/fw/src/freq_meas.c}
+\section{DSSS demodulation (dsss\_demod.c)}
+\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../controller/fw/src/dsss_demod.c}
+\section{Cryptographic protocol handling}
+\subsection{protocol.c}
+\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../controller/fw/src/protocol.c}
+\subsection{crypto.c}
+\inputminted[fontsize=\footnotesize,linenos,breaklines]{C}{../controller/fw/src/crypto.c}
+\fi
+
+
% TODO
%\chapter{Economic viability of countermeasures}
%\section{Attack cost}