Initial commit: demo-epb v1.0 — Elektrische Parkbremse Demo

Vollstaendige Demo des slohmaier Dev Process anhand einer EPB-Steuergeraet-
Software. Zeigt ASPICE 4.0 / ISO 26262-konforme Entwicklung im Monorepo.

Inhalte:
- 5 Plaene (PID, PM-, QA-, SWE-, Test-Plan) in Word, ausgefuellt mit
  EPB-spezifischen Inhalten
- 10 System-Anforderungen + 25 Software-Anforderungen (Doorstop-MD)
- 5 System-Architektur-Elemente + 10 Software-Architektur-Elemente
  mit PlantUML-Diagrammen und vollstaendigem Mapping
- 3 implementierte Komponenten (Apply Controller D, Actuator Driver B,
  Switch Debouncer QM) plus 7 Header-Stubs
- 28 Unit-Tests, alle gruen, mit Coverage- und MISRA-Build-Targets
- Audit-Artefakte: 1 Review-Protokoll, 1 Non-Conformity, 1 MISRA-Record
- Gitea-Actions-CI-Pipeline (validate.yml)
- Doorstop-Konfiguration fuer bidirektionale Traceability
- Generator-Skript fuer alle 50 Reqs/Arch-Elemente aus Strukturdaten
- README mit gefuehrter Tour fuer Prospects
This commit is contained in:
Stefan Lohmaier
2026-05-11 13:51:02 -07:00
commit 1855162e6d
92 changed files with 4116 additions and 0 deletions
+68
View File
@@ -0,0 +1,68 @@
# Makefile fuer demo-epb. Bewusst klein gehalten, damit der Demo
# ohne externe Build-Tools (CMake, SCons) auf jedem POSIX-System baut.
CC ?= cc
CFLAGS ?= -std=c99 -Wall -Wextra -Werror -Wpedantic \
-Wcast-align -Wcast-qual -Wconversion -Wshadow \
-Wstrict-prototypes -Wmissing-prototypes
COVFLAGS = --coverage -O0 -g
SRC_DIR = src
TEST_DIR = tests/unit
BUILD = build
SRCS = $(SRC_DIR)/switch_debouncer.c \
$(SRC_DIR)/actuator_driver.c \
$(SRC_DIR)/apply_controller.c
OBJS = $(SRCS:%.c=$(BUILD)/%.o)
TESTS = test_switch_debouncer test_actuator_driver test_apply_controller
TEST_BINS = $(TESTS:%=$(BUILD)/%)
.PHONY: all test coverage clean misra static
all: $(TEST_BINS)
$(BUILD)/%.o: %.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(COVFLAGS) -I$(SRC_DIR) -c $< -o $@
$(BUILD)/test_%: $(TEST_DIR)/test_%.c $(OBJS)
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(COVFLAGS) -I$(SRC_DIR) -Itests $< $(OBJS) -o $@
test: $(TEST_BINS)
@echo "==========================================="
@echo "Running unit tests"
@echo "==========================================="
@fail=0; \
for t in $(TEST_BINS); do \
echo ""; \
$$t || fail=1; \
done; \
exit $$fail
coverage: test
@which lcov >/dev/null 2>&1 || { echo "lcov not installed (brew install lcov)"; exit 1; }
lcov --capture --directory $(BUILD) --output-file $(BUILD)/coverage.info
lcov --remove $(BUILD)/coverage.info '/usr/*' 'tests/*' --output-file $(BUILD)/coverage.clean.info
genhtml $(BUILD)/coverage.clean.info --output-directory $(BUILD)/coverage-html
@echo "Coverage HTML: $(BUILD)/coverage-html/index.html"
misra:
@which cppcheck >/dev/null 2>&1 || { echo "cppcheck not installed (brew install cppcheck)"; exit 1; }
cppcheck --enable=all --inconclusive --error-exitcode=1 \
--suppress=missingIncludeSystem \
--suppress=unusedFunction \
--addon=misra \
-I$(SRC_DIR) $(SRC_DIR)
static:
@which cppcheck >/dev/null 2>&1 || { echo "cppcheck not installed"; exit 1; }
cppcheck --enable=warning,style,performance,portability \
--error-exitcode=1 \
--suppress=missingIncludeSystem \
-I$(SRC_DIR) $(SRC_DIR)
clean:
rm -rf $(BUILD)