diff --git a/firmware/config/boards/STM32F407VET6_Mini.bat b/firmware/config/boards/STM32F407VET6_Mini.bat new file mode 100644 index 0000000000..3cb189f5a4 --- /dev/null +++ b/firmware/config/boards/STM32F407VET6_Mini.bat @@ -0,0 +1,7 @@ + +echo "Compiling for https://rusefi.com/forum/viewtopic.php?f=4&t=1498" +cd ../.. +set EXTRA_PARAMS="-DEFI_COMMUNICATION_PIN=GPIOB_9 -DSTM32_PLLM_VALUE=25" +make clean +make +..\misc\hex2dfu\HEX2DFU.exe build/rusefi.hex -out build/rusefi.dfu diff --git a/firmware/config/stm32f4ems/mcuconf.h b/firmware/config/stm32f4ems/mcuconf.h index 6befa3a076..d5e08e2aa9 100644 --- a/firmware/config/stm32f4ems/mcuconf.h +++ b/firmware/config/stm32f4ems/mcuconf.h @@ -77,7 +77,9 @@ #define STM32_SW STM32_SW_PLL #define STM32_PLLSRC STM32_PLLSRC_HSE +#ifndef STM32_PLLM_VALUE #define STM32_PLLM_VALUE 8 +#endif #define STM32_PLLN_VALUE 336 #define STM32_PLLP_VALUE 2 #define STM32_PLLQ_VALUE 7 diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 9f59dd6e91..a3b7f880f8 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -970,6 +970,9 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engineConfiguration->alternatorPwmFrequency = 300; +#ifndef EFI_COMMUNICATION_PIN +#define EFI_COMMUNICATION_PIN GPIOD_15 +#endif engineConfiguration->communicationLedPin = GPIOD_15; // blue LED on discovery engineConfiguration->runningLedPin = GPIOD_12; // greeb LED on discovery setDefaultBasePins(PASS_ENGINE_PARAMETER_SIGNATURE); diff --git a/firmware/flash_dfu.bat b/firmware/flash_dfu.bat index e1f0068394..9ccd20c0fb 100644 --- a/firmware/flash_dfu.bat +++ b/firmware/flash_dfu.bat @@ -2,4 +2,10 @@ rem on linux that would be rem dfu-util -a 0 -D rusefi_release.dfu -R +rem ..\misc\hex2dfu\HEX2DFU.exe build/rusefi.hex -out build/rusefi.dfu +rem DfuSeCommand.exe -c -d --fn build/rusefi.dfu + +rem Note that DfuSe_Demo_V3.0.6_Setup.exe does not install "stm32 bootloader" device drivers automaticaly +rem You need to point Windows at a relevant folder inside C:\Program Files (x86)\STMicroelectronics\Software\DfuSe v3.0.6\Bin\Driver + DfuSeCommand.exe -c -d --fn rusefi.dfu