From 0230e65e9cf9f45fc9d1ee18e4f22b1feeed9151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= <henrik@tjaders.com> Date: Tue, 18 Apr 2017 15:08:26 +0200 Subject: [PATCH] All output goes into the output folder --- Makefile | 4 ++-- README.md | 7 +++++++ klee_stm_gdb.py | 6 ++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7e5433d..af69dce 100644 --- a/Makefile +++ b/Makefile @@ -223,13 +223,13 @@ debug: $(EXECUTABLE) -iex 'mon halt' $< klee: buildrepo $(EXECUTABLE) - klee -emit-all-errors $(IROUT) + mkdir -p output; cp $(IROUT) output/; cd output; klee -emit-all-errors $(IROUT); cd .. run: buildrepo $(EXECUTABLE) arm-none-eabi-gdb -q -x klee_stm_gdb.py $(EXECUTABLE) bench: buildrepo $(EXECUTABLE) - make clean; make; make klee; make clean; make wcet; make run; python profiling_db_parser.py klee_profiling.db + make clean; make; make klee; make clean; make wcet; make run; python profiling_db_parser.py output/klee_profiling.db define make-repo for dir in $(SRCDIRS); \ diff --git a/README.md b/README.md index 8beb3c0..f9f37bd 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,13 @@ causes interrupts is also wonky, e.g., when sigle stepping over a `JOB_REQUEST` the pend bit is not correctly handeled (and the corresponding interrupt not taken). These problems are present for this project only, but general to the gdb debug integration, so be aware. +If not using Eclipse the way to start openocd is by invoking: + +``` +openocd -f st_nuclie_f4_itm.cfg +``` +in a separate terminal. + ## Problems If openocd fails to start, one possible error is that the `/tmp/swo.log` file has been locked to a bad state. Actually its not an diff --git a/klee_stm_gdb.py b/klee_stm_gdb.py index ab538cf..01cd723 100644 --- a/klee_stm_gdb.py +++ b/klee_stm_gdb.py @@ -17,6 +17,12 @@ object_index_current = 0 object_index_max = 100 database_name = "klee_profiling" +path = "output" + +""" Create an folder named output if it doesn't exist """ +os.makedirs(path, exist_ok=True) +""" Enter the output folder """ +os.chdir(path) """ Check if a database exists, otherwise create one """ -- GitLab