diff --git a/firmware/.cproject b/firmware/.cproject
index 659748441c..119404730f 100644
--- a/firmware/.cproject
+++ b/firmware/.cproject
@@ -319,7 +319,7 @@
-
+
@@ -588,7 +588,7 @@
-
+
diff --git a/firmware/chibios/os/hal/platforms/STM32F1xx/platform_f105_f107.mk b/firmware/chibios/os/hal/platforms/STM32F1xx/platform_f105_f107.mk
deleted file mode 100644
index 43017f9791..0000000000
--- a/firmware/chibios/os/hal/platforms/STM32F1xx/platform_f105_f107.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-# List of all the STM32F1xx platform files.
-PLATFORMSRC = ${CHIBIOS}/os/hal/platforms/STM32F1xx/stm32_dma.c \
- ${CHIBIOS}/os/hal/platforms/STM32F1xx/hal_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32F1xx/adc_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32F1xx/ext_lld_isr.c \
- ${CHIBIOS}/os/hal/platforms/STM32/can_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/ext_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/mac_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/sdc_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/GPIOv1/pal_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/I2Cv1/i2c_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/RTCv1/rtc_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/SPIv1/spi_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/TIMv1/gpt_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/TIMv1/icu_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/TIMv1/pwm_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/USARTv1/serial_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/USARTv1/uart_lld.c \
- ${CHIBIOS}/os/hal/platforms/STM32/OTGv1/usb_lld.c
-
-# Required include directories
-PLATFORMINC = ${CHIBIOS}/os/hal/platforms/STM32F1xx \
- ${CHIBIOS}/os/hal/platforms/STM32 \
- ${CHIBIOS}/os/hal/platforms/STM32/GPIOv1 \
- ${CHIBIOS}/os/hal/platforms/STM32/I2Cv1 \
- ${CHIBIOS}/os/hal/platforms/STM32/RTCv1 \
- ${CHIBIOS}/os/hal/platforms/STM32/SPIv1 \
- ${CHIBIOS}/os/hal/platforms/STM32/TIMv1 \
- ${CHIBIOS}/os/hal/platforms/STM32/USARTv1 \
- ${CHIBIOS}/os/hal/platforms/STM32/OTGv1
diff --git a/firmware/config/stm32f1egt/mpu_util.h b/firmware/config/stm32f1egt/mpu_util.h
new file mode 100644
index 0000000000..9741c01397
--- /dev/null
+++ b/firmware/config/stm32f1egt/mpu_util.h
@@ -0,0 +1,13 @@
+/*
+ * mpu_util.h
+ *
+ * Created on: Jan 8, 2015
+ * Author: Andrey
+ */
+
+#ifndef CONFIG_STM32F1EGT_MPU_UTIL_H_
+#define CONFIG_STM32F1EGT_MPU_UTIL_H_
+
+#define baseHardwareInit() {}
+
+#endif /* CONFIG_STM32F1EGT_MPU_UTIL_H_ */
diff --git a/firmware/egt2can.cpp b/firmware/egt2can.cpp
index b5b2344df7..6a98bf8280 100644
--- a/firmware/egt2can.cpp
+++ b/firmware/egt2can.cpp
@@ -7,8 +7,12 @@ egt_cs_array_t max31855_cs;
int main_loop_started;
+int maxNesting = 0;
+
void firmwareError(const char *fmt, ...) {
+}
+
/*
* Blue LED blinker thread, times are in milliseconds.
*/
@@ -18,31 +22,14 @@ static msg_t Thread1(void *arg) {
(void)arg;
chRegSetThreadName("blinker1");
while (TRUE) {
- palClearPad(GPIOC, GPIOC_LED4);
+ palClearPad(GPIOC, 13);
chThdSleepMilliseconds(500);
- palSetPad(GPIOC, GPIOC_LED4);
+ palSetPad(GPIOC, 13);
chThdSleepMilliseconds(500);
}
return 0;
}
-/*
- * Green LED blinker thread, times are in milliseconds.
- */
-static WORKING_AREA(waThread2, 128);
-static msg_t Thread2(void *arg) {
-
- (void)arg;
- chRegSetThreadName("blinker2");
- while (TRUE) {
- palClearPad(GPIOC, GPIOC_LED3);
- chThdSleepMilliseconds(250);
- palSetPad(GPIOC, GPIOC_LED3);
- chThdSleepMilliseconds(250);
- }
- return 0;
-}
-
void initSpiCs(SPIConfig *spiConfig, brain_pin_e csPin) {
spiConfig->end_cb = NULL;
@@ -57,6 +44,7 @@ void initSpiCs(SPIConfig *spiConfig, brain_pin_e csPin) {
void runRusEfi(void) {
+#if EFI_USE_UART_FOR_CONSOLE
/*
* Activates the serial driver 1 using the driver default configuration.
* PA9 and PA10 are routed to USART1.
@@ -64,12 +52,12 @@ void runRusEfi(void) {
sdStart(&SD1, NULL);
palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(1)); /* USART1 TX. */
palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(1)); /* USART1 RX. */
+#endif
/*
* Creates the blinker threads.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
- chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO, Thread2, NULL);
initMax31855(NULL, max31855_cs);
diff --git a/firmware/hw_layer/hardware.cpp b/firmware/hw_layer/hardware.cpp
index 6e8c982cac..9d6f2a85ea 100644
--- a/firmware/hw_layer/hardware.cpp
+++ b/firmware/hw_layer/hardware.cpp
@@ -20,11 +20,13 @@
#include "trigger_input.h"
#include "eficonsole.h"
+#include "max31855.h"
+#include "can_hw.h"
+
+#if EFI_PROD_CODE
#include "board_test.h"
#include "mcp3208.h"
#include "HIP9011.h"
-#include "max31855.h"
-#include "can_hw.h"
#include "histogram.h"
#include "mmc_card.h"
#include "neo6m.h"
@@ -32,15 +34,15 @@
#include "settings.h"
#include "algo.h"
#include "joystick.h"
-
-#if EFI_INTERNAL_FLASH
-#include "flash_main.h"
-#endif /* EFI_INTERNAL_FLASH */
-
#include "trigger_central.h"
#include "svnversion.h"
#include "engine_configuration.h"
#include "ec2.h"
+#endif
+
+#if EFI_INTERNAL_FLASH
+#include "flash_main.h"
+#endif /* EFI_INTERNAL_FLASH */
EXTERN_ENGINE
;
@@ -178,6 +180,8 @@ static void sendI2Cbyte(int addr, int data) {
static Logging *sharedLogger;
+#if EFI_PROD_CODE
+
void initHardware(Logging *l, Engine *engine) {
sharedLogger = l;
engine_configuration_s *engineConfiguration = engine->engineConfiguration;
@@ -336,3 +340,5 @@ void initHardware(Logging *l, Engine *engine) {
printMsg(sharedLogger, "initHardware() OK!");
}
+
+#endif /* EFI_PROD_CODE */