diff --git a/firmware/.cproject b/firmware/.cproject
index cc0f34c8fa..6bf07799b1 100644
--- a/firmware/.cproject
+++ b/firmware/.cproject
@@ -71,9 +71,9 @@
-
-
-
+
+
+
@@ -132,9 +132,9 @@
-
-
-
+
+
+
@@ -363,9 +363,9 @@
-
-
-
+
+
+
@@ -419,9 +419,9 @@
-
-
-
+
+
+
diff --git a/firmware/Makefile b/firmware/Makefile
index b5c9c7a9c4..2f755a06ce 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -90,7 +90,7 @@ include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk
include console/tunerstudio/tunerstudio.mk
include ext/ext.mk
include hw_layer/hw_layer.mk
-include emulation/development.mk
+include development/development.mk
include controllers/controllers.mk
include $(PROJECT_DIR)/util/util.mk
@@ -121,7 +121,7 @@ CSRC = $(PORTSRC) \
$(CONSOLESRC) \
$(CONSOLEUTILSRC) \
$(HALSRC) \
- $(EMULATIONSRC) \
+ $(DEV_SRC) \
$(HW_LAYER_EMS) \
$(CONTROLLERSSRC) \
$(CONTROLLERS_ALGO_SRC) \
@@ -139,7 +139,7 @@ CSRC = $(PORTSRC) \
CPPSRC = $(CHCPPSRC) \
$(TRIGGER_SRC_CPP) \
$(TRIGGER_DECODERS_SRC_CPP) \
- $(EMULATIONSRC_CPP) \
+ $(DEV_SRC_CPP) \
$(CONTROLLERS_ALGO_SRC_CPP) \
$(SYSTEMSRC_CPP) \
$(ENGINES_SRC_CPP) \
@@ -196,9 +196,9 @@ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
hw_layer/algo \
hw_layer/lcd \
hw_layer/stm32f4 \
- emulation \
- emulation/hw_layer \
- emulation/test \
+ development \
+ development/hw_layer \
+ development/test \
controllers \
controllers/sensors \
controllers/system \
diff --git a/firmware/controllers/algo/algo.mk b/firmware/controllers/algo/algo.mk
index 5def1b0d2c..b16c3c5682 100644
--- a/firmware/controllers/algo/algo.mk
+++ b/firmware/controllers/algo/algo.mk
@@ -13,7 +13,6 @@ CONTROLLERS_ALGO_SRC_CPP = $(PROJECT_DIR)/controllers/algo/OutputSignalArray.cpp
$(PROJECT_DIR)/controllers/algo/engine.cpp \
$(PROJECT_DIR)/controllers/algo/event_registry.cpp \
$(PROJECT_DIR)/controllers/algo/algo.cpp \
- $(PROJECT_DIR)/controllers/algo/wave_chart.cpp \
$(PROJECT_DIR)/controllers/algo/signal_executor.cpp \
$(PROJECT_DIR)/controllers/algo/enum_strings.cpp
diff --git a/firmware/controllers/algo/ec2.h b/firmware/controllers/algo/ec2.h
index ec6a4ab6d3..069c8351ed 100644
--- a/firmware/controllers/algo/ec2.h
+++ b/firmware/controllers/algo/ec2.h
@@ -66,10 +66,5 @@ public:
uint64_t stopEngineRequestTimeNt;
};
-void initializeIgnitionActions(float advance, float dwellAngle,
- IgnitionEventList *list DECLARE_ENGINE_PARAMETER_S);
-
-void setDefaultNonPersistentConfiguration(engine_configuration2_s *engineConfiguration2);
-void printConfiguration(engine_configuration_s *engineConfiguration, engine_configuration2_s *engineConfiguration2);
#endif /* EC2_H_ */
diff --git a/firmware/controllers/algo/signal_executor.cpp b/firmware/controllers/algo/signal_executor.cpp
index e95e52652d..1f332f621f 100644
--- a/firmware/controllers/algo/signal_executor.cpp
+++ b/firmware/controllers/algo/signal_executor.cpp
@@ -1,5 +1,5 @@
/**
- * @file signal_executor.c
+ * @file signal_executor.cpp
*
* todo: we should split this file into two:
* one for pure scheduling and another one for signal output which would
@@ -34,8 +34,10 @@
EXTERN_ENGINE;
+#if EFI_WAVE_CHART
#include "wave_chart.h"
extern WaveChart waveChart;
+#endif
#if EFI_PROD_CODE || EFI_SIMULATOR
static Logging logger;
diff --git a/firmware/controllers/math/engine_math.h b/firmware/controllers/math/engine_math.h
index 75930e8258..06e4343061 100644
--- a/firmware/controllers/math/engine_math.h
+++ b/firmware/controllers/math/engine_math.h
@@ -10,8 +10,6 @@
#include "engine_configuration.h"
-#ifdef __cplusplus
-
#include "ec2.h"
#include "trigger_structure.h"
#include "table_helper.h"
@@ -24,12 +22,8 @@ void findTriggerPosition(
int isInjectionEnabled(engine_configuration_s *engineConfiguration);
-#endif
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+void initializeIgnitionActions(float advance, float dwellAngle,
+ IgnitionEventList *list DECLARE_ENGINE_PARAMETER_S);
/**
* @brief Shifts angle into the [0..720) range for four stroke and [0..360) for two stroke
@@ -75,8 +69,4 @@ void setTimingLoadBin(engine_configuration_s *engineConfiguration, float l, floa
void setSingleCoilDwell(engine_configuration_s *engineConfiguration);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
#endif /* ENGINE_MATH_H_ */
diff --git a/firmware/controllers/sensors/maf.h b/firmware/controllers/sensors/maf.h
index 2a602c26cf..70577963ab 100644
--- a/firmware/controllers/sensors/maf.h
+++ b/firmware/controllers/sensors/maf.h
@@ -12,17 +12,7 @@
#include "main.h"
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
#define getMafT(ec) (getVoltageDivided(ec->mafAdcChannel))
-
float getMaf(void);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
#endif
diff --git a/firmware/controllers/settings.h b/firmware/controllers/settings.h
index ea07250605..b48373f6fa 100644
--- a/firmware/controllers/settings.h
+++ b/firmware/controllers/settings.h
@@ -9,16 +9,17 @@
#ifndef INJECTOR_CONTROL_H_
#define INJECTOR_CONTROL_H_
-#include "engine_configuration.h"
+#include "engine.h"
+
void initSettings(engine_configuration_s *engineConfiguration);
+void printSpiState(Logging *logger, board_configuration_s *boardConfiguration);
+void printConfiguration(engine_configuration_s *engineConfiguration, engine_configuration2_s *engineConfiguration2);
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
-void printSpiState(Logging *logger, board_configuration_s *boardConfiguration);
-void pokeControl(void);
void setEngineType(int value);
#ifdef __cplusplus
diff --git a/firmware/controllers/trigger/main_trigger_callback.cpp b/firmware/controllers/trigger/main_trigger_callback.cpp
index 189570dfcd..222897bd54 100644
--- a/firmware/controllers/trigger/main_trigger_callback.cpp
+++ b/firmware/controllers/trigger/main_trigger_callback.cpp
@@ -390,7 +390,9 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECL
#endif /* EFI_HISTOGRAMS */
}
+#if EFI_PROD_CODE
#include "wave_chart.h"
+#endif
static void showTriggerHistogram(void) {
printAllCallbacksHistogram();
diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp
index 2dfb120d4d..0d62931b0f 100644
--- a/firmware/controllers/trigger/trigger_central.cpp
+++ b/firmware/controllers/trigger/trigger_central.cpp
@@ -16,7 +16,6 @@
#include "listener_array.h"
#include "data_buffer.h"
#include "histogram.h"
-#include "wave_chart.h"
#include "pwm_generator_logic.h"
#include "efilib2.h"
@@ -27,6 +26,7 @@
#endif
#if EFI_WAVE_CHART
+#include "wave_chart.h"
WaveChart waveChart;
#endif /* EFI_WAVE_CHART */
diff --git a/firmware/emulation/analog_chart.cpp b/firmware/development/analog_chart.cpp
similarity index 100%
rename from firmware/emulation/analog_chart.cpp
rename to firmware/development/analog_chart.cpp
diff --git a/firmware/emulation/analog_chart.h b/firmware/development/analog_chart.h
similarity index 100%
rename from firmware/emulation/analog_chart.h
rename to firmware/development/analog_chart.h
diff --git a/firmware/development/development.mk b/firmware/development/development.mk
new file mode 100644
index 0000000000..b26633ede1
--- /dev/null
+++ b/firmware/development/development.mk
@@ -0,0 +1,13 @@
+
+DEV_SRC = development/hw_layer/poten.c \
+ development/test/test.c \
+ development/test/testbmk.c
+
+DEV_SRC_CPP = development/trigger_emulator.cpp \
+ development/analog_chart.cpp \
+ development/rfi_perftest.cpp \
+ development/engine_emulator.cpp \
+ $(PROJECT_DIR)/development/wave_chart.cpp \
+ development/wave_analyzer.cpp
+
+DEV_SIMULATOR_SRC_CPP = $(PROJECT_DIR)/development/wave_chart.cpp
\ No newline at end of file
diff --git a/firmware/emulation/engine_emulator.cpp b/firmware/development/engine_emulator.cpp
similarity index 100%
rename from firmware/emulation/engine_emulator.cpp
rename to firmware/development/engine_emulator.cpp
diff --git a/firmware/emulation/engine_emulator.h b/firmware/development/engine_emulator.h
similarity index 100%
rename from firmware/emulation/engine_emulator.h
rename to firmware/development/engine_emulator.h
diff --git a/firmware/emulation/hw_layer/poten.c b/firmware/development/hw_layer/poten.c
similarity index 100%
rename from firmware/emulation/hw_layer/poten.c
rename to firmware/development/hw_layer/poten.c
diff --git a/firmware/emulation/hw_layer/poten.h b/firmware/development/hw_layer/poten.h
similarity index 100%
rename from firmware/emulation/hw_layer/poten.h
rename to firmware/development/hw_layer/poten.h
diff --git a/firmware/emulation/readme.txt b/firmware/development/readme.txt
similarity index 100%
rename from firmware/emulation/readme.txt
rename to firmware/development/readme.txt
diff --git a/firmware/emulation/rfi_perftest.cpp b/firmware/development/rfi_perftest.cpp
similarity index 100%
rename from firmware/emulation/rfi_perftest.cpp
rename to firmware/development/rfi_perftest.cpp
diff --git a/firmware/emulation/rfi_perftest.h b/firmware/development/rfi_perftest.h
similarity index 100%
rename from firmware/emulation/rfi_perftest.h
rename to firmware/development/rfi_perftest.h
diff --git a/firmware/emulation/test/test.c b/firmware/development/test/test.c
similarity index 100%
rename from firmware/emulation/test/test.c
rename to firmware/development/test/test.c
diff --git a/firmware/emulation/test/test.h b/firmware/development/test/test.h
similarity index 100%
rename from firmware/emulation/test/test.h
rename to firmware/development/test/test.h
diff --git a/firmware/emulation/test/testbmk.c b/firmware/development/test/testbmk.c
similarity index 100%
rename from firmware/emulation/test/testbmk.c
rename to firmware/development/test/testbmk.c
diff --git a/firmware/emulation/test/testbmk.h b/firmware/development/test/testbmk.h
similarity index 100%
rename from firmware/emulation/test/testbmk.h
rename to firmware/development/test/testbmk.h
diff --git a/firmware/emulation/trigger_emulator.cpp b/firmware/development/trigger_emulator.cpp
similarity index 100%
rename from firmware/emulation/trigger_emulator.cpp
rename to firmware/development/trigger_emulator.cpp
diff --git a/firmware/emulation/trigger_emulator.h b/firmware/development/trigger_emulator.h
similarity index 100%
rename from firmware/emulation/trigger_emulator.h
rename to firmware/development/trigger_emulator.h
diff --git a/firmware/emulation/wave_analyzer.cpp b/firmware/development/wave_analyzer.cpp
similarity index 100%
rename from firmware/emulation/wave_analyzer.cpp
rename to firmware/development/wave_analyzer.cpp
diff --git a/firmware/emulation/wave_analyzer.h b/firmware/development/wave_analyzer.h
similarity index 100%
rename from firmware/emulation/wave_analyzer.h
rename to firmware/development/wave_analyzer.h
diff --git a/firmware/controllers/algo/wave_chart.cpp b/firmware/development/wave_chart.cpp
similarity index 100%
rename from firmware/controllers/algo/wave_chart.cpp
rename to firmware/development/wave_chart.cpp
diff --git a/firmware/controllers/algo/wave_chart.h b/firmware/development/wave_chart.h
similarity index 100%
rename from firmware/controllers/algo/wave_chart.h
rename to firmware/development/wave_chart.h
diff --git a/firmware/emulation/development.mk b/firmware/emulation/development.mk
deleted file mode 100644
index 5c28f0ba1e..0000000000
--- a/firmware/emulation/development.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-
-EMULATIONSRC = emulation/hw_layer/poten.c \
- emulation/test/test.c \
- emulation/test/testbmk.c
-
-EMULATIONSRC_CPP = emulation/trigger_emulator.cpp \
- emulation/analog_chart.cpp \
- emulation/rfi_perftest.cpp \
- emulation/engine_emulator.cpp \
- emulation/wave_analyzer.cpp
-
diff --git a/firmware/svnversion.h b/firmware/svnversion.h
index 75ed3664a4..476ff06cf8 100644
--- a/firmware/svnversion.h
+++ b/firmware/svnversion.h
@@ -1,5 +1,5 @@
// This file was generated by Version2Header
-// Sat Dec 27 09:45:34 EST 2014
+// Thu Jan 01 15:21:19 EST 2015
#ifndef VCS_VERSION
-#define VCS_VERSION "5964"
+#define VCS_VERSION "6083"
#endif
diff --git a/unit_tests/boards.c b/unit_tests/boards.cpp
similarity index 100%
rename from unit_tests/boards.c
rename to unit_tests/boards.cpp
diff --git a/unit_tests/main.h b/unit_tests/main.h
index b9da0cec6b..b7a9a76a51 100644
--- a/unit_tests/main.h
+++ b/unit_tests/main.h
@@ -12,13 +12,6 @@
#include
#include
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#define CH_FREQUENCY 1000
-
#include "global.h"
#include "error_handling.h"
#include "efifeatures.h"
@@ -28,6 +21,13 @@ extern "C"
#include "boards.h"
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define CH_FREQUENCY 1000
+
typedef int bool_t;
void chDbgAssert(int c, char *msg, void *arg);
diff --git a/win32_functional_tests/Makefile b/win32_functional_tests/Makefile
index aaa726e210..035eb4f9d8 100644
--- a/win32_functional_tests/Makefile
+++ b/win32_functional_tests/Makefile
@@ -81,6 +81,7 @@ include $(PROJECT_DIR)/controllers/system/system.mk
include $(PROJECT_DIR)/console/console.mk
include $(PROJECT_DIR)/console/tunerstudio/tunerstudio.mk
include $(PROJECT_DIR)/console_util/console_util.mk
+include $(PROJECT_DIR)/development/development.mk
include $(CHIBIOS)/boards/simulator/board.mk
include ${CHIBIOS}/os/hal/hal.mk
@@ -120,7 +121,7 @@ CSRC = ${PORTSRC} \
CPPSRC = $(UTILSRC_CPP) \
$(CONTROLLERS_ALGO_SRC_CPP) \
$(PROJECT_DIR)/controllers/settings.cpp \
- $(PROJECT_DIR)/emulation/analog_chart.cpp \
+ $(PROJECT_DIR)/development/analog_chart.cpp \
$(TRIGGER_SRC_CPP) \
$(TRIGGER_DECODERS_SRC_CPP) \
$(SYSTEMSRC_CPP) \
@@ -129,10 +130,11 @@ CPPSRC = $(UTILSRC_CPP) \
$(CONTROLLERS_SENSORS_SRC_CPP) \
$(CONTROLLERS_CORE_SRC_CPP) \
$(CONTROLLERS_MATH_SRC_CPP) \
+ $(DEV_SIMULATOR_SRC_CPP) \
$(ENGINES_SRC_CPP) \
$(PROJECT_DIR)/simulator/rusEfiFunctionalTest.cpp \
$(PROJECT_DIR)/simulator/framework.cpp \
- $(PROJECT_DIR)/emulation/trigger_emulator.cpp \
+ $(PROJECT_DIR)/development/trigger_emulator.cpp \
$(TEST_SRC_CPP)
# C sources to be compiled in ARM mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
@@ -168,7 +170,7 @@ $(PORTINC) $(KERNINC) $(TESTINC) \
$(PROJECT_DIR)/ext_algo \
$(PROJECT_DIR)/controllers \
$(PROJECT_DIR)/hw_layer/algo \
- $(PROJECT_DIR)/emulation \
+ $(PROJECT_DIR)/development \
$(PROJECT_DIR)/controllers/algo \
$(PROJECT_DIR)/controllers/core \
$(PROJECT_DIR)/controllers/math \