From d66c197259ae827564a8550e5df17a7d14fc1ac6 Mon Sep 17 00:00:00 2001
From: jaseg <git-bigdata-wsl-arch@jaseg.de>
Date: Fri, 22 May 2020 18:09:51 +0200
Subject: ma: add source code excerpts appendix

---
 ma/safety_reset.tex | 36 ++++++++++++++++++++++++++++++------
 1 file changed, 30 insertions(+), 6 deletions(-)

(limited to 'ma/safety_reset.tex')

diff --git a/ma/safety_reset.tex b/ma/safety_reset.tex
index 4e0e6dd..d00f7eb 100644
--- a/ma/safety_reset.tex
+++ b/ma/safety_reset.tex
@@ -2561,18 +2561,42 @@ correctly configure than it is to simply use separate hardware and secure the in
 \includenotebook{Frequency sensor clock stability analysis}{gps_clock_jitter_analysis}
 \includenotebook{DSSS modulation experiments}{dsss_experiments-ber}
 
-\chapter{Demonstrator Resources}
-\section{schematics and code}
+\chapter{Frequency Sensor Schematics}
 % FIXME
+\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{Client application (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 Sizes}
 \label{symbol_size_chart}
 \includepdf[fitpaper]{resources/safetyreset-symbol-sizes.pdf}
 
-\chapter{Economic viability of countermeasures}
-\section{Attack cost}
-\section{Countermeasure cost}
-
+% FIXME
+%\chapter{Economic viability of countermeasures}
+%\section{Attack cost}
+%\section{Countermeasure cost}
+%\section{Conclusion}
 
 % FIXME maybe include a standard for the technical side of a safety reset system here, e.g. in the style of an IETF draft?
 
-- 
cgit 

