From 7464275b00cb9678d8f63e7a835b955a37bb0aa7 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 5 Mar 2023 01:50:51 -0500 Subject: [PATCH] progress: bringing simulator closer to real code only:hellen-honda-k --- firmware/Makefile | 2 +- firmware/development/development.mk | 4 +--- firmware/development/perf_trace.cpp | 5 +++-- simulator/Makefile | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/firmware/Makefile b/firmware/Makefile index 5c6451ba57..54ec23fb08 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -301,7 +301,7 @@ INCDIR = \ $(PROJECT_DIR)/hw_layer/lcd \ $(PROJECT_DIR)/hw_layer/mass_storage \ $(HW_INC) \ - development/hw_layer \ + $(PROJECT_DIR)/development/hw_layer \ development/test \ $(CHIBIOS_CONTRIB)/os/various # contrib/os/various must go at the end because it also contains pid.h which conflicts with our pid.h diff --git a/firmware/development/development.mk b/firmware/development/development.mk index b1421eacb0..6ac6434b3a 100644 --- a/firmware/development/development.mk +++ b/firmware/development/development.mk @@ -9,6 +9,4 @@ DEV_SRC_CPP = $(DEVELOPMENT_DIR)/hw_layer/poten.cpp \ $(DEVELOPMENT_DIR)/engine_emulator.cpp \ $(DEVELOPMENT_DIR)/engine_sniffer.cpp \ $(DEVELOPMENT_DIR)/logic_analyzer.cpp \ - $(DEVELOPMENT_DIR)/development/perf_trace.cpp - -DEV_SIMULATOR_SRC_CPP = $(DEVELOPMENT_DIR)/engine_sniffer.cpp \ No newline at end of file + $(DEVELOPMENT_DIR)/development/perf_trace.cpp \ No newline at end of file diff --git a/firmware/development/perf_trace.cpp b/firmware/development/perf_trace.cpp index c6260b5b2a..2bce68d56c 100644 --- a/firmware/development/perf_trace.cpp +++ b/firmware/development/perf_trace.cpp @@ -45,8 +45,8 @@ static void stopTrace() { s_nextIdx = 0; } -static void perfEventImpl(PE event, EPhase phase) -{ +static void perfEventImpl(PE event, EPhase phase) { +#if EFI_PROD_CODE // Bail if we aren't allowed to trace if constexpr (!ENABLE_PERF_TRACE) { return; @@ -101,6 +101,7 @@ static void perfEventImpl(PE event, EPhase phase) } entry.Timestamp = timestamp; +#endif // EFI_PROD_CODE } void perfEventBegin(PE event) { diff --git a/simulator/Makefile b/simulator/Makefile index e61729913c..633828f9f7 100644 --- a/simulator/Makefile +++ b/simulator/Makefile @@ -169,11 +169,10 @@ CSRC = $(ALLCSRC) \ # setting. CPPSRC = $(ALLCPPSRC) \ $(CHIBIOS)/os/various/cpp_wrappers/ch.cpp \ - $(PROJECT_DIR)/development/sensor_chart.cpp \ $(HW_LAYER_DRIVERS_CPP) \ $(HW_LAYER_DRIVERS_CORE_CPP) \ $(CONSOLE_SRC_CPP) \ - $(DEV_SIMULATOR_SRC_CPP) \ + $(DEV_SRC_CPP) \ simulator/rusEfiFunctionalTest.cpp \ simulator/can/hal_can_lld.cpp \ simulator/framework.cpp \ @@ -192,6 +191,7 @@ INCDIR = . \ $(CHIBIOS)/os/various/cpp_wrappers \ $(PROJECT_DIR)/hw_layer/drivers/can \ ${CHIBIOS}/os/various \ + $(PROJECT_DIR)/development/hw_layer \ $(CHIBIOS)/os/hal/lib/streams \ $(RUSEFI_LIB_INC) \ simulator/can \