diff --git a/.gitignore b/.gitignore index 8e22ec09e4..7f208df9eb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.o.d *.o build/ +blbuild/ Debug_EMS/ Release_EMS/ Debug/ diff --git a/firmware/bootloader/!compile_bootloader_discovery407.bat b/firmware/bootloader/!compile_bootloader_discovery407.bat new file mode 100644 index 0000000000..1c95ad0cb3 --- /dev/null +++ b/firmware/bootloader/!compile_bootloader_discovery407.bat @@ -0,0 +1,12 @@ +@echo off + +echo Starting compilation for Discovery-407 + +rem set PROJECT_BOARD=Prometheus +rem set PROMETHEUS_BOARD=405 +rem set EXTRA_PARAMS=-DDUMMY -DSTM32F405xx -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_TRACE=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE +set BOOTLOADER_CODE_PATH="." +rem set DEBUG_LEVEL_OPT="-O2" + +call !compile_bootloader.bat -r + diff --git a/firmware/bootloader/src/Makefile b/firmware/bootloader/src/Makefile index feb48aa07e..3bfa5b2e92 100644 --- a/firmware/bootloader/src/Makefile +++ b/firmware/bootloader/src/Makefile @@ -131,7 +131,7 @@ include $(PROJECT_DIR)/hw_layer/$(CPU_HWLAYER)/hw_stm32.mk # Define linker script file here ifeq ($(LDSCRIPT),) - LDSCRIPT= $(CONFIG)/stm32f4ems/STM32F407xG_CCM.ld + LDSCRIPT= $(CONFIG)/stm32f4ems/STM32F407xG.ld endif # C sources that can be compiled in ARM or THUMB mode depending on the global diff --git a/firmware/config/boards/Prometheus/STM32F405xG.ld b/firmware/config/boards/Prometheus/STM32F405xG.ld index 4454ab5c11..2b4840080d 100644 --- a/firmware/config/boards/Prometheus/STM32F405xG.ld +++ b/firmware/config/boards/Prometheus/STM32F405xG.ld @@ -17,6 +17,7 @@ /* * STM32F405xG memory setup. * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0. + * 'bl' is related to rusefi bootloader */ MEMORY { diff --git a/firmware/config/boards/Prometheus/STM32F469xI.ld b/firmware/config/boards/Prometheus/STM32F469xI.ld index 40acd222bc..714cb91beb 100644 --- a/firmware/config/boards/Prometheus/STM32F469xI.ld +++ b/firmware/config/boards/Prometheus/STM32F469xI.ld @@ -17,6 +17,7 @@ /* * ST32F469xI memory setup. * Note: Use of ram1, ram2 and ram3 is mutually exclusive with use of ram0. + * 'bl' is related to rusefi bootloader */ MEMORY { diff --git a/firmware/config/stm32f4ems/STM32F407xG.ld b/firmware/config/stm32f4ems/STM32F407xG.ld index 765ffc4850..2096c08794 100644 --- a/firmware/config/stm32f4ems/STM32F407xG.ld +++ b/firmware/config/stm32f4ems/STM32F407xG.ld @@ -17,10 +17,12 @@ /* * STM32F407xG memory setup. * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0. + * 'bl' is related to rusefi bootloader */ MEMORY { - flash0 : org = 0x08000000, len = 1M + bl : org = 0x08000000, len = 16k /* bootloader section */ + flash0 : org = DEFINED(BOOTLOADER) ? 0x08008000 : 0x08000000, len = DEFINED(BOOTLOADER) ? 1016k : 1024k flash1 : org = 0x00000000, len = 0 flash2 : org = 0x00000000, len = 0 flash3 : org = 0x00000000, len = 0