From 3a1eb921094da2f669253f4607bc46da44ce9a2c Mon Sep 17 00:00:00 2001 From: Andrei Date: Mon, 1 May 2017 22:09:35 +0300 Subject: [PATCH 1/2] STM32F407xx-define (and small clean-up) pull request --- firmware/compile_and_program.bat | 4 ++-- firmware/config/boards/ST_STM32F4/board.mk | 3 +++ firmware/controllers/algo/engine_configuration.cpp | 4 ---- firmware/hw_layer/stm32f4/stm32f4xx_hal_flash.c | 2 -- firmware/hw_layer/stm32f4/stm32f4xx_hal_flash_ex.c | 2 -- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/firmware/compile_and_program.bat b/firmware/compile_and_program.bat index 1d954020f5..c8481be98a 100644 --- a/firmware/compile_and_program.bat +++ b/firmware/compile_and_program.bat @@ -13,8 +13,8 @@ rem magic once needed call update_version.bat echo Starting compilation -rem the important piece -make +rem the important piece (pass external args if needed) +make %1 %2 %3 rem cd build rem if not exist rusefi.hex echo "compilation failed" diff --git a/firmware/config/boards/ST_STM32F4/board.mk b/firmware/config/boards/ST_STM32F4/board.mk index 25db37f4ac..e3be9cd995 100644 --- a/firmware/config/boards/ST_STM32F4/board.mk +++ b/firmware/config/boards/ST_STM32F4/board.mk @@ -3,3 +3,6 @@ BOARDSRC = $(PROJECT_DIR)/config/boards/ST_STM32F4/board.c # Required include directories BOARDINC = $(PROJECT_DIR)/config/boards/ST_STM32F4 + +# MCU defines +DDEFS += -DSTM32F407xx -DSTM32F40_41xxx diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 9db0fb827a..a584a1b51a 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -263,10 +263,6 @@ void prepareVoidConfiguration(engine_configuration_s *activeConfiguration) { engineConfiguration->cj125ua = EFI_ADC_NONE; engineConfiguration->cj125ur = EFI_ADC_NONE; - boardConfiguration->idle.stepperDirectionPin = GPIO_UNASSIGNED; - boardConfiguration->idle.stepperStepPin = GPIO_UNASSIGNED; - engineConfiguration->stepperEnablePin = GPIO_UNASSIGNED; - boardConfiguration->idle.stepperDirectionPin = GPIO_UNASSIGNED; boardConfiguration->idle.stepperStepPin = GPIO_UNASSIGNED; engineConfiguration->stepperEnablePin = GPIO_UNASSIGNED; diff --git a/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash.c b/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash.c index cbf1661834..a58a7d7353 100644 --- a/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash.c +++ b/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash.c @@ -93,8 +93,6 @@ */ /* Includes ------------------------------------------------------------------*/ -#define STM32F407xx -#define STM32F40_41xxx #define assert_param(expr) ((void)0) //#include "stm32f4xx_hal.h" diff --git a/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash_ex.c b/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash_ex.c index 5857b76f68..f95e561152 100644 --- a/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash_ex.c +++ b/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash_ex.c @@ -80,8 +80,6 @@ /* Includes ------------------------------------------------------------------*/ -#define STM32F407xx -#define STM32F40_41xxx #define assert_param(expr) ((void)0) #define HAL_FLASH_MODULE_ENABLED From e9a330584e496ef5e9e35616b2c19072a08d71d0 Mon Sep 17 00:00:00 2001 From: Andrei Date: Mon, 1 May 2017 22:24:19 +0300 Subject: [PATCH 2/2] STM32F407xx-define (and small clean-up) pull request --- firmware/config/boards/ST_STM32F4/board.h | 2 ++ firmware/config/boards/ST_STM32F4/board.mk | 2 +- firmware/hw_layer/stm32f4/stm32f4xx_hal_flash.c | 3 +++ firmware/hw_layer/stm32f4/stm32f4xx_hal_flash_ex.c | 3 +++ firmware/svnversion.h | 4 ++-- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/firmware/config/boards/ST_STM32F4/board.h b/firmware/config/boards/ST_STM32F4/board.h index abff6dfcad..96b9532001 100644 --- a/firmware/config/boards/ST_STM32F4/board.h +++ b/firmware/config/boards/ST_STM32F4/board.h @@ -57,7 +57,9 @@ * * See also STM32F4xx_MCUCONF is defined in mcuconf.h */ +#ifndef STM32F407xx #define STM32F407xx +#endif /* * IO pins assignments. diff --git a/firmware/config/boards/ST_STM32F4/board.mk b/firmware/config/boards/ST_STM32F4/board.mk index e3be9cd995..3f6f71c3a6 100644 --- a/firmware/config/boards/ST_STM32F4/board.mk +++ b/firmware/config/boards/ST_STM32F4/board.mk @@ -5,4 +5,4 @@ BOARDSRC = $(PROJECT_DIR)/config/boards/ST_STM32F4/board.c BOARDINC = $(PROJECT_DIR)/config/boards/ST_STM32F4 # MCU defines -DDEFS += -DSTM32F407xx -DSTM32F40_41xxx +DDEFS += -DSTM32F407xx diff --git a/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash.c b/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash.c index a58a7d7353..bd2b159f58 100644 --- a/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash.c +++ b/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash.c @@ -93,6 +93,9 @@ */ /* Includes ------------------------------------------------------------------*/ +#ifdef STM32F407xx +#define STM32F40_41xxx +#endif #define assert_param(expr) ((void)0) //#include "stm32f4xx_hal.h" diff --git a/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash_ex.c b/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash_ex.c index f95e561152..9a53d9324d 100644 --- a/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash_ex.c +++ b/firmware/hw_layer/stm32f4/stm32f4xx_hal_flash_ex.c @@ -80,6 +80,9 @@ /* Includes ------------------------------------------------------------------*/ +#ifdef STM32F407xx +#define STM32F40_41xxx +#endif #define assert_param(expr) ((void)0) #define HAL_FLASH_MODULE_ENABLED diff --git a/firmware/svnversion.h b/firmware/svnversion.h index 9d3c30f097..15c0cd07a5 100644 --- a/firmware/svnversion.h +++ b/firmware/svnversion.h @@ -1,5 +1,5 @@ // This file was generated by Version2Header -// Sat Apr 22 01:25:51 EEST 2017 +// Mon May 01 22:16:55 EEST 2017 #ifndef VCS_VERSION -#define VCS_VERSION "13886" +#define VCS_VERSION "13950" #endif