diff --git a/firmware/global.h b/firmware/global.h
index 08abf3321e..a8d01f4805 100644
--- a/firmware/global.h
+++ b/firmware/global.h
@@ -1,6 +1,8 @@
/*
* @file global.h
*
+ * Global header file for firmware
+ *
* @date May 27, 2013
* @author Andrey Belomutskiy, (c) 2012-2017
*/
@@ -37,9 +39,7 @@ typedef unsigned int time_t;
#include "efifeatures.h"
#include "rusefi_types.h"
#include "rusefi_enums.h"
-#if EFI_PROD_CODE
#include "io_pins.h"
-#endif
#include "auto_generated_enums.h"
#include "obd_error_codes.h"
#include "error_handling.h"
diff --git a/firmware/hw_layer/board_test.cpp b/firmware/hw_layer/board_test.cpp
index 54a74664a2..a28abff73f 100644
--- a/firmware/hw_layer/board_test.cpp
+++ b/firmware/hw_layer/board_test.cpp
@@ -21,14 +21,13 @@
* If not, see .
*/
+#include "engine.h"
#include "main.h"
#include "board_test.h"
-#include "rusefi_enums.h"
#include "pin_repository.h"
#include "efiGpio.h"
#include "adc_inputs.h"
#include "AdcConfiguration.h"
-#include "engine.h"
static volatile int stepCoutner = 0;
static volatile brain_pin_e currentPin = GPIO_UNASSIGNED;
diff --git a/firmware/main.h b/firmware/main.h
index f4b86a29b4..7235e40c57 100644
--- a/firmware/main.h
+++ b/firmware/main.h
@@ -31,7 +31,7 @@ extern "C"
#include "datalogging.h"
#include "loggingcentral.h"
#include "eficonsole.h"
-#endif
+#endif /* __cplusplus */
#include "chprintf.h"
diff --git a/simulator/main.h b/simulator/main.h
index 8fe70eb5af..b6350470ca 100644
--- a/simulator/main.h
+++ b/simulator/main.h
@@ -2,9 +2,9 @@
#include "global.h"
#ifdef __cplusplus
-#include "datalogging.h"
-#include "loggingcentral.h"
-#include "eficonsole.h"
-#include "cli_registry.h"
#include "chprintf.h"
-#endif
+#include "cli_registry.h"
+#include "datalogging.h"
+#include "eficonsole.h"
+#include "loggingcentral.h"
+#endif /* __cplusplus */
diff --git a/simulator/simulator/global.h b/simulator/simulator/global.h
index de233d651a..e709121c65 100644
--- a/simulator/simulator/global.h
+++ b/simulator/simulator/global.h
@@ -1,28 +1,36 @@
+/*
+ * @file global.h
+ *
+ * Global header file for win32 or posix simulator
+ *
+ * @date May 27, 2013
+ * @author Andrey Belomutskiy, (c) 2012-2017
+ */
+
+#ifndef GLOBAL_H_
+#define GLOBAL_H_
#define DEFAULT_ENGINE_TYPE FORD_ESCORT_GT
#include
#include
+
+#include
+#include
+#include
#include
#include
#include
#include "efifeatures.h"
-#if EFI_SIMULATOR
-#include
-#include
-#include
-#endif
-
-#include "rusefi_enums.h"
#include "auto_generated_enums.h"
-#include "obd_error_codes.h"
-#include "error_handling.h"
-
#include "boards.h"
#include "efilib.h"
#include "efitime.h"
+#include "error_handling.h"
+#include "rusefi_enums.h"
+#include "obd_error_codes.h"
#define EFI_UNIT_TEST FALSE
@@ -40,9 +48,6 @@
#define MY_US2ST(x) ((x) / 10)
-#ifndef GLOBAL_FT_H_
-#define GLOBAL_FT_H_
-
#define EFI_ERROR_CODE 0xffffffff
#define DL_OUTPUT_BUFFER 9000
@@ -69,10 +74,6 @@ typedef struct {
extern TestStream testStream;
-//##define TRUE 1
-//#define FALSE 0
-#endif /* GLOBAL_FT_H_ */
-
#ifdef __cplusplus
extern "C"
{
@@ -114,3 +115,5 @@ void applyNewConfiguration(void);
#define CONFIG(x) persistentState.persistentConfiguration.engineConfiguration.x
#define ENGINE(x) engine->x
#define TRIGGER_SHAPE(x) engine->triggerCentral.triggerShape.x
+
+#endif /* GLOBAL_H_ */