diff --git a/firmware/Makefile b/firmware/Makefile index e4bd3712fa..196a4b88e5 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -43,15 +43,6 @@ ifeq ($(DEBUG_LEVEL_OPT),) # DEBUG_LEVEL_OPT = -O0 -ggdb -g endif - -ifeq ($(CCACHE_DIR),) - $(info No CCACHE_DIR) -else - $(info CCACHE_DIR is ${CCACHE_DIR}) - CCPREFIX=ccache -endif - - # Compiler options here. # yes we have two kinds of EXTRA_*PARAMS so that we can define those in two different places independently # @@ -299,8 +290,8 @@ ifeq ($(CROSS_COMPILE),) else TRGT = $(CROSS_COMPILE) endif -CC = $(CCPREFIX) $(TRGT)gcc -CPPC = $(CCPREFIX) $(TRGT)g++ +CC = $(TRGT)gcc +CPPC = $(TRGT)g++ # Enable loading with g++ only if you need C++ runtime support. # NOTE: You can use C++ even without C++ support if you are careful. C++ # runtime support makes code size explode. diff --git a/firmware/bootloader/Makefile b/firmware/bootloader/Makefile index 8f94be4e41..df68305c27 100644 --- a/firmware/bootloader/Makefile +++ b/firmware/bootloader/Makefile @@ -25,6 +25,9 @@ DDEFS += -DEFI_USB_SERIAL=TRUE -DHAL_USE_USB_MSD=FALSE # disable CAN DDEFS += -DEFI_CAN_SUPPORT=FALSE +# Cache is disabled on F7, H7 +DDEFS += -DSTM32_SRAM2_NOCACHE=FALSE -DSTM32_NOCACHE_SRAM1_SRAM2=FALSE -DSTM32_NOCACHE_SRAM3=FALSE + DDEFS += -DEFI_UNIT_TEST=0 -DEFI_PROD_CODE=1 -DEFI_SIMULATOR=0 # Compiler options here. @@ -281,8 +284,8 @@ ifeq ($(CROSS_COMPILE),) else TRGT = $(CROSS_COMPILE) endif -CC = $(CCPREFIX) $(TRGT)gcc -CPPC = $(CCPREFIX) $(TRGT)g++ +CC = $(TRGT)gcc +CPPC = $(TRGT)g++ # Enable loading with g++ only if you need C++ runtime support. # NOTE: You can use C++ even without C++ support if you are careful. C++ # runtime support makes code size explode. diff --git a/firmware/bootloader/openblt_chibios/openblt_flash.cpp b/firmware/bootloader/openblt_chibios/openblt_flash.cpp index 75b7a81c17..432144f38a 100644 --- a/firmware/bootloader/openblt_chibios/openblt_flash.cpp +++ b/firmware/bootloader/openblt_chibios/openblt_flash.cpp @@ -14,9 +14,9 @@ void FlashInit() { blt_addr FlashGetUserProgBaseAddress() { #ifdef STM32H7XX - return 0x08020000; + return FLASH_BASE + 128 * 1024; #else // not STM32H7 - return 0x08008000; + return FLASH_BASE + 32 * 1024; #endif } diff --git a/firmware/hw_layer/ports/stm32/stm32f7/cfg/mcuconf.h b/firmware/hw_layer/ports/stm32/stm32f7/cfg/mcuconf.h index 006e045344..d0d2a80212 100644 --- a/firmware/hw_layer/ports/stm32/stm32f7/cfg/mcuconf.h +++ b/firmware/hw_layer/ports/stm32/stm32f7/cfg/mcuconf.h @@ -123,7 +123,10 @@ #define STM32_CECSEL STM32_CECSEL_LSE #define STM32_CK48MSEL STM32_CK48MSEL_PLL #define STM32_SDMMCSEL STM32_SDMMCSEL_PLL48CLK + +#ifndef STM32_SRAM2_NOCACHE #define STM32_SRAM2_NOCACHE TRUE +#endif /* * GPT driver system settings. diff --git a/firmware/hw_layer/ports/stm32/stm32h7/cfg/mcuconf.h b/firmware/hw_layer/ports/stm32/stm32h7/cfg/mcuconf.h index b81f5ac2dc..5caffe7665 100644 --- a/firmware/hw_layer/ports/stm32/stm32h7/cfg/mcuconf.h +++ b/firmware/hw_layer/ports/stm32/stm32h7/cfg/mcuconf.h @@ -54,8 +54,12 @@ * Memory attributes settings. */ #define STM32_NOCACHE_MPU_REGION MPU_REGION_6 +#ifndef STM32_NOCACHE_SRAM1_SRAM2 #define STM32_NOCACHE_SRAM1_SRAM2 FALSE +#endif // STM32_NOCACHE_SRAM1_SRAM2 +#ifndef STM32_NOCACHE_SRAM3 #define STM32_NOCACHE_SRAM3 TRUE +#endif // STM32_NOCACHE_SRAM3 /* * PWR system settings. diff --git a/firmware/rusefi_rules.mk b/firmware/rusefi_rules.mk index 4d0be65f26..e84b4b5abd 100644 --- a/firmware/rusefi_rules.mk +++ b/firmware/rusefi_rules.mk @@ -3,4 +3,9 @@ RUSEFI_OPT = -Werror RUSEFI_CPPOPT = -Werror=shadow # ...except these few -RUSEFI_OPT += -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=undef -Wno-error=stringop-overflow +RUSEFI_OPT += -Wno-error=unused-function +RUSEFI_OPT += -Wno-error=unused-variable +RUSEFI_OPT += -Wno-error=sign-compare +RUSEFI_OPT += -Wno-error=unused-parameter +RUSEFI_OPT += -Wno-error=undef +RUSEFI_OPT += -Wno-error=stringop-overflow diff --git a/java_console/ui/src/main/java/com/rusefi/maintenance/ProgramSelector.java b/java_console/ui/src/main/java/com/rusefi/maintenance/ProgramSelector.java index a944366300..ab60b835b3 100644 --- a/java_console/ui/src/main/java/com/rusefi/maintenance/ProgramSelector.java +++ b/java_console/ui/src/main/java/com/rusefi/maintenance/ProgramSelector.java @@ -193,7 +193,7 @@ public class ProgramSelector { return; } - OpenbltBootCommanderRunner.flashSerial(port, "../../fome_update.srec", callbacks); + OpenbltBootCommanderRunner.flashSerial(port, "../fome_update.srec", callbacks); // it's a lengthy operation let's signal end Toolkit.getDefaultToolkit().beep(); diff --git a/misc/extract_trigger_angles.py b/misc/extract_trigger_angles.py deleted file mode 100644 index 6782a9f12f..0000000000 --- a/misc/extract_trigger_angles.py +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/python2 - -# this script parses a rusEfi console log, extract analog_chart line and -# calculates average trigger angles -# author spags - -import numpy - - -# todo: change the sccript so that we do not need to hard-code trigger sequence length? -trigger_size = 10 - -rpm_max_change = 15 - - -AC_HEADER = 'analog_chart,' - -fp = open("target.csv") -data = {} - -last_time = 0 -rpm = 10000 -last_rpm = 0 - -for line in fp: - # Chuck the date - # todo: use ':' tag - line = line[35:] - - if line.startswith(AC_HEADER): - line = line.strip(AC_HEADER) - numbers = [float(n) for n in line.split('|')[:2 * trigger_size]] - - if abs(rpm-last_rpm) < rpm_max_change: - data[last_time] = numbers - else: - print "RPM Variance too great", last_rpm, rpm - last_rpm = rpm - - elif line.startswith('time'): - last_time = float(line.split(',')[1]) - last_rpm = rpm - rpm = float(line.split(',')[3]) - - else: - pass - -print "Got %d data points"%len(data) - -a = {} -for i in range(0, len(numbers)+1,2): - a[i] = numpy.zeros(len(data)) - -count = 0 - - -for time,numbers in data.iteritems(): - for i in range(0, len(numbers),2): - a[i][count] = numbers[i] - - count+=1 -print "Trigger\t\tStdDeviation" -print "-"*40 -for i in a.values(): - - - print "%f\t\t%f"%(numpy.average(i), i.std()) diff --git a/simulator/Makefile b/simulator/Makefile index f1f21062f4..8d52fd86db 100644 --- a/simulator/Makefile +++ b/simulator/Makefile @@ -60,13 +60,6 @@ ifeq ($(SANITIZE),yes) USE_OPT += -fsanitize=address endif -ifeq ($(CCACHE_DIR),) - $(info No CCACHE_DIR) -else - $(info CCACHE_DIR is ${CCACHE_DIR}) - CCPREFIX=ccache -endif - # C specific options here (added to USE_OPT). ifeq ($(USE_COPT),) USE_COPT = -std=gnu99 @@ -224,8 +217,8 @@ else TRGT = endif -CC = $(CCPREFIX) $(TRGT)gcc -CPPC = $(CCPREFIX) $(TRGT)g++ +CC = $(TRGT)gcc +CPPC = $(TRGT)g++ # Enable loading with g++ only if you need C++ runtime support. # NOTE: You can use C++ even without C++ support if you are careful. C++ # runtime support makes code size explode. diff --git a/unit_tests/unit_test_rules.mk b/unit_tests/unit_test_rules.mk index cd9782a0a3..6f705f9a48 100644 --- a/unit_tests/unit_test_rules.mk +++ b/unit_tests/unit_test_rules.mk @@ -56,13 +56,6 @@ USE_OPT += -DEFI_UNIT_TEST=1 -DEFI_PROD_CODE=0 -DEFI_SIMULATOR=0 # Pretend we are all different hardware so that all canned engine configs are included USE_OPT += -DHW_MICRO_RUSEFI=1 -DHW_PROTEUS=1 -DHW_FRANKENSO=1 -DHW_HELLEN=1 -ifeq ($(CCACHE_DIR),) - $(info No CCACHE_DIR) -else - $(info CCACHE_DIR is ${CCACHE_DIR}) - CCPREFIX=ccache -endif - # C specific options here (added to USE_OPT). ifeq ($(USE_COPT),) USE_COPT = -std=gnu99 -fgnu89-inline @@ -126,8 +119,8 @@ else TRGT = endif -CC = $(CCPREFIX) $(TRGT)gcc -CPPC = $(CCPREFIX) $(TRGT)g++ +CC = $(TRGT)gcc +CPPC = $(TRGT)g++ # Enable loading with g++ only if you need C++ runtime support. # NOTE: You can use C++ even without C++ support if you are careful. C++ # runtime support makes code size explode.