File tree 8 files changed +44
-12
lines changed
8 files changed +44
-12
lines changed Original file line number Diff line number Diff line change 1
1
# scrutiny-demos
2
- Some demonstration projects that uses scrutiny
2
+
3
+ A collection of demonstration project to showcase the Scrutiny Debugger framework
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ FetchContent_Declare(
18
18
scrutiny-embedded
19
19
20
20
GIT_REPOSITORY https://github.com/scrutinydebugger/scrutiny-embedded.git
21
- GIT_TAG nsec_demo
21
+ GIT_TAG nsec2024_demo
22
22
)
23
23
FetchContent_MakeAvailable(scrutiny-embedded)
24
24
Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ RUN apt-get update && apt-get install -y \
17
17
&& rm -rf /var/lib/apt/lists/*
18
18
19
19
# RUN pip3 install scrutinydebugger
20
- RUN git clone -b nsec2024_demo https://github.com/scrutinydebugger/scrutiny-python /tmp/scrutiny-python && pip3 install -e /tmp/scrutiny-python
20
+ RUN git clone --depth 1 - b nsec2024_demo https://github.com/scrutinydebugger/scrutiny-python /tmp/scrutiny-python && pip3 install -e /tmp/scrutiny-python
Original file line number Diff line number Diff line change
1
+ # NorthSec 2024 Demo
2
+
3
+ This project is a Arduino project used to demonstrate the Scrutiny framework during the 2024 edition of NorthSec
4
+
5
+
6
+ https://nsec.io/session/2024-scrutiny-debugger-debug-test-and-configure-embedded-softwares-through-instrumentation.html
7
+
8
+
9
+ ## Building the Arduino app
10
+
11
+ Calling the following script should be enough, assuming you have docker configured
12
+
13
+ ``` bash
14
+ export ARDUINO_PORT=/dev/ttyACM0 # Change serial port
15
+ ./scripts/build_in_docker
16
+ ./scripts/flash
17
+ ```
18
+
19
+ ## Running the server
20
+
21
+ ``` bash
22
+ # pip install scrutinydebugger # For latest release
23
+ # scrutiny-python repo has a tag "nsec2024_demo" that points on the version used.
24
+ git clone --depth 1 -b nsec2024_demo https://github.com/scrutinydebugger/scrutiny-python /tmp/scrutiny-python && pip3 install -e /tmp/scrutiny-python
25
+ scrutiny launch-server --config scrutiny_server_config.json # Make sure to adjust the serial port name in that configuration
26
+ ```
27
+
28
+
Original file line number Diff line number Diff line change 2
2
set -euo pipefail
3
3
4
4
SCRIPT_DIR=$( realpath " $( dirname ${BASH_SOURCE[0]} ) " )
5
- cd " $SCRIPT_DIR "
5
+ ROOT_DIR=$SCRIPT_DIR /..
6
+ cd " $ROOT_DIR "
6
7
7
- source common.sh
8
+ source $SCRIPT_DIR / common.sh
8
9
9
10
[ -z ${ARDUINO_PATH: +x} ] && fatal " ARDUINO_PATH must be set"
10
11
11
12
info " ARDUINO_PATH=$ARDUINO_PATH "
12
13
mkdir -p build
13
14
cmake -G Ninja \
14
15
-DARDUINO_PATH=$ARDUINO_PATH \
15
- -DCMAKE_TOOLCHAIN_FILE=" $SCRIPT_DIR /cmake/toolchain/mega2526.toolchain.cmake" \
16
+ -DCMAKE_TOOLCHAIN_FILE=" $ROOT_DIR /cmake/toolchain/mega2526.toolchain.cmake" \
16
17
-S . -B build
17
18
18
19
ninja -C build
Original file line number Diff line number Diff line change 2
2
set -euo pipefail
3
3
4
4
SCRIPT_DIR=$( realpath " $( dirname ${BASH_SOURCE[0]} ) " )
5
- cd $SCRIPT_DIR
6
- WORKDIR=$SCRIPT_DIR # Having Workdir = script dir makes the compile_commands.json paths match the host system. Easier for vscode integration
5
+ ROOT_DIR=$SCRIPT_DIR /..
6
+ cd $ROOT_DIR
7
+ WORKDIR=$ROOT_DIR # Having Workdir = script dir makes the compile_commands.json paths match the host system. Easier for vscode integration
7
8
IMAGE_NAME=scrutiny_nsec2024_demo
8
9
CACHE_OPT=
9
10
while getopts " f" o; do
15
16
16
17
docker build . -t $IMAGE_NAME $CACHE_OPT
17
18
docker run \
18
- --volume $SCRIPT_DIR :$WORKDIR \
19
+ --volume $ROOT_DIR :$WORKDIR \
19
20
-e ARDUINO_PATH=/usr/share/arduino \
20
21
-u $( id -u) :$( id -g) \
21
22
$IMAGE_NAME \
22
- bash -c $WORKDIR /build.sh
23
+ bash -c $WORKDIR /scripts/ build.sh
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
# /bin/bash
2
2
SCRIPT_DIR=$( realpath " $( dirname ${BASH_SOURCE[0]} ) " )
3
- cd " $SCRIPT_DIR "
3
+ ROOT_DIR=$SCRIPT_DIR /..
4
+ cd " $ROOT_DIR "
4
5
5
- source common.sh
6
+ source $SCRIPT_DIR / common.sh
6
7
BINNAME=scrutiny-nsec2024.hex
7
8
BINPATH=./build/$BINNAME
8
9
DEFAULT_PORT=/dev/ttyACM0
You can’t perform that action at this time.
0 commit comments