[MERGED] bring in advantages from branch to trunk; Performance optimizations

This combines now the changes from branch PerformanceOptimizations to trunk
Mainly this change should do following:
- Flash savings should be around 224 bytes for stock
- Added option ARITHMETIC_OVERFLOW_CHECK to prevent overflows.
  Still not bulletproof, but codecost is about 50 bytes
- Increases mix speed about 25 - 30% depending on task for stock
  Also increased for other boards, but they may not notice...
- Increased ranges for weight and offset from +-125% to +-245%
- Easier now to increase number of GVARS if needed; Just increase GVAR_MAX in myeeprom.h.
  But!!!! EEPROM layout changes and may not be compatible. Do this for own proposes.
  Till now we do not know how we handle this in future.
- Corrected Timer for stock if used together with AUDIO or VOICE option
- See comments below, what I potentially forgotten...

Be aware this version is currently not compatible to companion9x. But the version before wasn't either. Work is current in progress to tie this up.
This commit is contained in:
open.20.fsguruh@xoxy.net
2013-03-10 19:51:19 +00:00
7 changed files with 642 additions and 219 deletions
+16
View File
@@ -97,6 +97,14 @@ AUDIO = NO
# Values = YES, NO
VOICE = NO
# corrects different rounding for negative values. So instead of -99.9 you will see again -100.0
# Values = YES, NO
CORRECT_NEGATIVE_VALUES = YES
# adds additional code to prevent arithmetic overflows. MAX or MIN values stays. Not yet guaranteed!! Just improved
# Values = YES, NO
ARITHMETIC_OVERFLOW_CHECK = NO
# HAPTIC Mods
# Values = YES, NO
HAPTIC = NO
@@ -423,6 +431,14 @@ ifeq ($(GVARS), YES)
EEPROM_VARIANT += ${GVARS_VARIANT}
endif
ifeq ($(CORRECT_NEGATIVE_VALUES), YES)
CPPDEFS += -DCORRECT_NEGATIVE_SHIFTS
endif
ifeq ($(ARITHMETIC_OVERFLOW_CHECK), YES)
CPPDEFS += -DPREVENT_ARITHMETIC_OVERFLOW
endif
# If STD-Support is enabled
ifeq ($(EXT), STD)
CPPDEFS += -DEXTSTD