auto-sync

This commit is contained in:
rusEfi 2015-07-10 08:57:59 -04:00
parent c879dfcb84
commit 69b0c4e2de
1022 changed files with 0 additions and 133863 deletions

View File

@ -1,844 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602" moduleId="org.eclipse.cdt.core.settings" name="Debug_EMS">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="rusefi" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602" name="Debug_EMS" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug">
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602." name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.1168037802" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.2135519682" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.945329795" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.1770410023" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.38474178" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.1893727956" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.206435159" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.max" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.45385409" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.1957907346" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="Sourcery CodeBench Lite for ARM EABI" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1246031326" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.1091522544" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m4" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.626810862" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.1339159356" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.2354483" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.597862663" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.1750543541" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.1045074278" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.762291247" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.1773808297" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.1110530715" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="cs-make" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1804740480" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="cs-rm" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.792712237" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1913060082" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.17619031" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.softfp" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.1287725454" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.fpv4spd16" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto.463687969" name="Link-time optimizer (-flto)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto" value="true" valueType="boolean"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.920767907" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
<builder buildPath="${workspace_loc:/firmware}/Debug" id="ilg.gnuarmeclipse.managedbuild.cross.builder.2137117093" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1587722559" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.533250110" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.616095263" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1375389811" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.950368886" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;..&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/stm32f4&quot;"/>
<listOptionValue builtIn="false" value="../chibios/os/kernel/include"/>
<listOptionValue builtIn="false" value="&quot;../ext&quot;"/>
<listOptionValue builtIn="false" value="&quot;../ext_algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/various&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console/binary&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/engines&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/boards&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/core&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/trigger&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/sensors&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/math&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console_util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/test&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/flash&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/lcd&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/serial_over_usb&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/ckp&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/adc&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/stm32f4ems&quot;"/>
<listOptionValue builtIn="false" value="&quot;../splib&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/kernel/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/boards/ST_STM32F4_DISCOVERY&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/src&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/TIMv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/I2Cv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/RTCv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/OTGv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/GPIOv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32F4xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/SPIv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/USARTv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx/STM32F4xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/common/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/common/ARMCMx/CMSIS/include&quot;"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1678253866" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="CORTEX_USE_FPU=TRUE"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.183179237" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value="-fgnu89-inline -c -Werror=type-limits -Werror=uninitialized" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1472643596" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.816044947" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.2033499713" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;..&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/stm32f4&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/kernel/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../ext&quot;"/>
<listOptionValue builtIn="false" value="&quot;../ext_algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/various&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console/binary&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/engines&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/boards&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/core&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/trigger&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/sensors&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/math&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console_util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/test&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/flash&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/lcd&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/serial_over_usb&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/ckp&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/adc&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/stm32f4ems&quot;"/>
<listOptionValue builtIn="false" value="&quot;../splib&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/kernel/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/boards/ST_STM32F4_DISCOVERY&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/src&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/TIMv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/I2Cv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/RTCv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/OTGv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/GPIOv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32F4xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/SPIv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/USARTv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx/STM32F4xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/common/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="../chibios/os/ports/common/ARMCMx/CMSIS/include"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.729960344" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="CORTEX_USE_FPU=TRUE"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.other.1628064604" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.other" useByScannerDiscovery="true" value="-fgnu89-inline -c -Werror=type-limits -Werror=uninitialized" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti.770615701" name="Do not use RTTI (-fno-rtti)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions.1846214625" name="Do not use exceptions (-fno-exceptions)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.238419844" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1584540843" name="Cross ARM C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.519043947" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.1134890931" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" value="--specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group" valueType="string"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.19385321" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.1829193555" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.1336205150" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value="-Wl,-Map,&quot;rusefi.map&quot; -mcpu=cortex-m4 -mthumb -g3" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostdlibs.2113602694" name="No startup or default libs (-nostdlib)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostdlibs" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.1520845026" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" valueType="stringList">
<listOptionValue builtIn="false" value="&quot;..\config\stm32f4ems\STM32F407xG_CCM.ld&quot;"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs.457288864" name="Do not use default libraries (-nodefaultlibs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart.1584814043" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart" value="false" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.1223012391" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.1474433264" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.152645266" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.1152034301" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.272763435" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.1992966747" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.1879914122" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.1365986989" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.780547167" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.514016171" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.757444191" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="hw_layer/stm32f1|chibios/os/hal/platforms/STM32/USBv1|chibios/os/hal/platforms/STM32/RTCv1|chibios/os/hal/platforms/STM32/GPIOv1|chibios/os/ports/GCC/ARMCMx/STM32F1xx|chibios/os/hal/platforms/STM32F1xx|chibios/boards/ST_NUCLEO_F103RB|config/stm32f0egt|egt2can.cpp|chibios/boards/simulator|chibios/boards/OLIMEX_STM32_E407|chibios/boards/ST_STM32F0_DISCOVERY|chibios/os/ports/GCC/ARMCMx/STM32F0xx|hw_layer/stm32f0|chibios/os/hal/platforms/STM32/I2Cv2|chibios/os/hal/platforms/STM32/SPIv2|chibios/os/hal/platforms/STM32/USARTv2|chibios/os/ports/IAR|chibios/os/hal/platforms/STM32F0xx|chibios/os/hal/platforms/Win32|chibios/os/ports/GCC/ARMCMx/chcore_v6m.c|chibios/os/ports/GCC/SIMIA32|chibios/os/ports/IAR/ARMCMx/chcore_v6m.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1741644682">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1741644682" moduleId="org.eclipse.cdt.core.settings" name="Release_broken_original">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1741644682" name="Release_broken_original" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release">
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.1741644682." name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release.831183705" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.584468799" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.size" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.854778752" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.415222183" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.2057410416" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.1312027392" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.76743941" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.149747241" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.1769451933" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="Sourcery CodeBench Lite for ARM EABI" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1169537082" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.1014498050" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m3" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.1388738051" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.1921974169" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.89784259" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.1227450470" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.1172324871" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.1231920815" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.1712754231" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.1742663816" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.89060645" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="cs-make" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1195479102" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="cs-rm" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.1425498986" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1740680628" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.837857135" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
<builder buildPath="${workspace_loc:/firmware}/Release" id="ilg.gnuarmeclipse.managedbuild.cross.builder.2122141174" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1321040525" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.262734782" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.66687840" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.321753119" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.516094271" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.360220425" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1520126933" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1438482916" name="Cross ARM C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.1857280433" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.267041159" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" value="--specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group" valueType="string"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.411046500" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.1111463752" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.354737704" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value="--specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.450263154" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.852505922" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.2094486746" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.228365690" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.2090367028" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.1667646066" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.664756051" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.436005602" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.751143496" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.1525118183" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.873914590" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="hw_layer/stm32f1|chibios/os/hal/platforms/STM32/USBv1|chibios/os/hal/platforms/STM32/RTCv1|chibios/os/hal/platforms/STM32/GPIOv1|chibios/os/ports/GCC/ARMCMx/STM32F1xx|chibios/os/hal/platforms/STM32F1xx|chibios/boards/ST_NUCLEO_F103RB|config/stm32f0egt|egt2can.cpp|chibios/boards/simulator|chibios/boards/OLIMEX_STM32_E407|chibios/boards/ST_STM32F0_DISCOVERY|chibios/os/ports/GCC/ARMCMx/STM32F0xx|hw_layer/stm32f0|chibios/os/hal/platforms/STM32/I2Cv2|chibios/os/hal/platforms/STM32/SPIv2|chibios/os/hal/platforms/STM32/USARTv2|chibios/os/ports/IAR|chibios/os/hal/platforms/STM32F0xx|chibios/os/hal/platforms/Win32|chibios/os/ports/GCC/ARMCMx/chcore_v6m.c|chibios/os/ports/GCC/SIMIA32|chibios/os/ports/IAR/ARMCMx/chcore_v6m.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602.1044213654">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602.1044213654" moduleId="org.eclipse.cdt.core.settings" name="Debug_EGT2CAN">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="rusefi" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602.1044213654" name="Debug_EGT2CAN" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug">
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602.1044213654." name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.377175633" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.1589341452" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.1207400841" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.2088060218" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.1956055749" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.315686629" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.598429016" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.max" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.1403205537" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.1443668889" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="Sourcery CodeBench Lite for ARM EABI" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1887488663" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.23097541" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m3" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.978474509" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.177034630" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1504138624" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.144016175" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.862890427" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.1528505178" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.1451989724" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.718138181" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.530702658" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="cs-make" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.615375876" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="cs-rm" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.1062383544" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1716904876" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.542648601" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.soft" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.1732001730" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.fpv4spd16" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto.1668820449" name="Link-time optimizer (-flto)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto" value="true" valueType="boolean"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1817810839" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
<builder buildPath="${workspace_loc:/firmware}/Debug" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1551751280" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.539236567" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.922093160" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.422780115" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1247184524" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.2139481274" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;..&quot;"/>
<listOptionValue builtIn="false" value="../chibios/os/kernel/include"/>
<listOptionValue builtIn="false" value="&quot;../ext&quot;"/>
<listOptionValue builtIn="false" value="&quot;../ext_algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/various&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console/binary&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/engines&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/boards&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/core&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/trigger&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/sensors&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/math&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console_util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/test&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/flash&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/lcd&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/serial_over_usb&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/ckp&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/adc&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/stm32f1egt&quot;"/>
<listOptionValue builtIn="false" value="&quot;../splib&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/kernel/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/boards/ST_NUCLEO_F103RB&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/src&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/TIMv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/I2Cv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/RTCv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/USBv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/GPIOv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32F1xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/SPIv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/USARTv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx/STM32F1xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/common/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/common/ARMCMx/CMSIS/include&quot;"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1875884188" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.29365974" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value="-fgnu89-inline -c -Werror=type-limits" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.946574992" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1076614034" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.409200792" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;..&quot;"/>
<listOptionValue builtIn="false" value="&quot;../ext&quot;"/>
<listOptionValue builtIn="false" value="&quot;../ext_algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/various&quot;"/>
<listOptionValue builtIn="false" value="&quot;../util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console/binary&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/engines&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/boards&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/core&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/trigger&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/sensors&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/math&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console_util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/test&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/stm32f1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/flash&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/lcd&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/serial_over_usb&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/ckp&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/adc&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/stm32f1egt&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/boards/ST_NUCLEO_F103RB&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/kernel/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/src&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/TIMv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/I2Cv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/RTCv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/USBv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/GPIOv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32F1xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/SPIv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/USARTv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx/STM32F1xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/common/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/common/ARMCMx/CMSIS/include&quot;"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.1198784382" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="false"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.other.1947947017" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.other" useByScannerDiscovery="true" value="-fgnu89-inline -c -Werror=type-limits" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti.58453872" name="Do not use RTTI (-fno-rtti)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions.509603815" name="Do not use exceptions (-fno-exceptions)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1637043609" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1355432717" name="Cross ARM C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.13281858" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.453214924" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" value="--specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group" valueType="string"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.1240793428" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.1398450826" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.1608731059" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value="-Wl,-Map,&quot;rusefi.map&quot; -mcpu=cortex-m4 -mthumb -g3" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostdlibs.250528370" name="No startup or default libs (-nostdlib)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostdlibs" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.288806553" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" valueType="stringList">
<listOptionValue builtIn="false" value="&quot;${workspace_loc}\\${ProjName}\config\stm32f0egt\STM32F051x8.ld&quot;"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs.1797845173" name="Do not use default libraries (-nodefaultlibs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart.848039256" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart" value="false" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.900591477" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.1596461614" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1754519369" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.212945097" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.869131021" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.1587748114" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.2044908440" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.14930095" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.1360714963" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.496130042" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.1990205143" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
</tool>
</toolChain>
</folderInfo>
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602.1044213654.198530188" name="/" resourcePath="chibios">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.962846903" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug" unusedChildren="">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.1589341452.559543768" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.1589341452"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.1207400841.626678522" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.1207400841"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.2088060218.51187625" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.2088060218"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.1956055749.1237334367" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.1956055749"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.315686629.1030657452" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.315686629"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.598429016.1878406374" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.598429016"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.1403205537.1675650572" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.1403205537"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.1443668889.610332078" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.1443668889"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1887488663.889322184" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1887488663"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.23097541.2089861918" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.23097541"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.978474509.754387030" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.978474509"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.177034630.1988216623" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.177034630"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1504138624.811628775" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1504138624"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.144016175.598347740" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.144016175"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.862890427.684626326" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.862890427"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.1528505178.1683377590" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.1528505178"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.1451989724.1040015648" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.1451989724"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.718138181.811924152" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.718138181"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.530702658.552189281" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.530702658"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.615375876.1396725" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.615375876"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.1062383544.1352734974" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.1062383544"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1716904876.16434346" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1716904876"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.542648601.1022714557" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.542648601"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.1732001730.1244989800" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.1732001730"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto.1668820449.997077344" name="Link-time optimizer (-flto)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto.1668820449"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.461623446" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.539236567">
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1658656680" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.47816861" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1247184524">
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1802690577" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.44784324" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1076614034">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.2067151322" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;..&quot;"/>
<listOptionValue builtIn="false" value="&quot;../ext&quot;"/>
<listOptionValue builtIn="false" value="&quot;../ext_algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/various&quot;"/>
<listOptionValue builtIn="false" value="&quot;../util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console/binary&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/engines&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/boards&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/core&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/trigger&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/sensors&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/math&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console_util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/test&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/stm32f1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/flash&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/lcd&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/serial_over_usb&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/ckp&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/adc&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/stm32f1egt&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/boards/ST_NUCLEO_F103RB&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/kernel/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/src&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/TIMv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/I2Cv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/RTCv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/USBv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/GPIOv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32F1xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/SPIv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/USARTv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx/STM32F1xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/common/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/common/ARMCMx/CMSIS/include&quot;"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.873780997" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1247958019" name="Cross ARM C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1355432717"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.781186241" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.1240793428"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.586532554" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.1596461614"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1025523577" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1754519369"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.474073722" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.212945097"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.976134399" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.496130042"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="chibios/boards/ST_STM32F0_DISCOVERY|chibios/os/hal/platforms/STM32/OTGv1|chibios/os/hal/platforms/STM32/RTCv2|chibios/os/hal/platforms/STM32/I2Cv2|chibios/os/ports/GCC/ARMCMx/chcore_v6m.c|chibios/os/ports/GCC/ARMCMx/STM32F0xx|console/status_loop.cpp|controllers/settings.cpp|controllers/flash_main.cpp|development|hw_layer/joystick.cpp|hw_layer/servo.cpp|hw_layer/pin_repository.c|hw_layer/microsecond_timer.c|hw_layer/io_pins.cpp|hw_layer/flash.c|hw_layer/adc_inputs.cpp|hw_layer/gpio_helper.cpp|hw_layer/board_test.cpp|chibios/os/hal/platforms/STM32/USARTv2|chibios/os/hal/platforms/STM32/SPIv2|chibios/os/hal/platforms/STM32/GPIOv2|chibios/os/hal/platforms/STM32F0xx|chibios/os/various/fatfs_bindings|util/LocalVersionHolder.cpp|util/histogram.c|util/data_buffer.c|util/cyclic_buffer.cpp|controllers/algo|controllers/system/SingleTimerExecutor.cpp|controllers/system/signal_executor_sleep.c|controllers/system/pwm_generator_logic.cpp|controllers/system/event_queue.cpp|chibios/ext/fatfs|config/engines|hw_layer/rtc_helper.c|hw_layer/mmc_card.c|hw_layer/neo6m.c|hw_layer/lcd|controllers/core|controllers/math|controllers/sensors|controllers/trigger|controllers/sensors/tps.cpp|controllers/sensors/thermistors.cpp|controllers/sensors/map.cpp|controllers/sensors/maf.cpp|controllers/sensors/ego.cpp|hw_layer/wave_analyzer_hw.c|hw_layer/vehicle_speed.cpp|hw_layer/trigger_input.cpp|hw_layer/stepper.cpp|hw_layer/pwm_generator.cpp|hw_layer/HIP9011.cpp|controllers/map_multiplier_thread.cpp|controllers/map_averaging.cpp|controllers/malfunction_indicator.cpp|controllers/lcd_controller.cpp|controllers/injector_central.cpp|console/binary|controllers/idle_thread.cpp|controllers/electronic_throttle.cpp|controllers/alternatorController.cpp|controllers/engine_controller.cpp|rusefi.cpp|chibios/boards/ST_STM32F4_DISCOVERY|hw_layer/stm32f4|chibios/os/ports/GCC/ARMCMx/STM32F4xx|chibios/os/hal/platforms/STM32F4xx|config/stm32f4ems|chibios/boards/simulator|chibios/boards/OLIMEX_STM32_E407|chibios/os/ports/IAR|chibios/os/hal/platforms/Win32|chibios/os/ports/GCC/SIMIA32|chibios/os/ports/IAR/ARMCMx/chcore_v6m.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602.160551264">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602.160551264" moduleId="org.eclipse.cdt.core.settings" name="Release_EMS">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="rusefi" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602.160551264" name="Release_EMS" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug">
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1034318602.160551264." name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.1412440709" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.871834085" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.556881986" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.78512559" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.637714295" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.52980977" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.639745241" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.none" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.927187042" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.1620905309" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="Sourcery CodeBench Lite for ARM EABI" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.205045592" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.2097010523" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m4" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.1947969972" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.2045800137" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1200945575" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.2119723594" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.755883771" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.980744613" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.1503034253" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.1900454251" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.87974797" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="cs-make" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.553214635" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="cs-rm" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.1691815976" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.671460679" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.1530358151" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.softfp" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.964218329" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.fpv4spd16" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto.575666799" name="Link-time optimizer (-flto)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto" value="true" valueType="boolean"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1907606527" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
<builder buildPath="${workspace_loc:/firmware}/Debug" id="ilg.gnuarmeclipse.managedbuild.cross.builder.298516331" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1573847297" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1390474022" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1880083031" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.2123354278" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.1397947910" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;..&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/stm32f4&quot;"/>
<listOptionValue builtIn="false" value="../chibios/os/kernel/include"/>
<listOptionValue builtIn="false" value="&quot;../ext&quot;"/>
<listOptionValue builtIn="false" value="&quot;../ext_algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/various&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console/binary&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/engines&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/boards&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/core&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/trigger&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/sensors&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/math&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console_util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/test&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/flash&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/lcd&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/serial_over_usb&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/ckp&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/adc&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/stm32f4ems&quot;"/>
<listOptionValue builtIn="false" value="&quot;../splib&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/kernel/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/boards/ST_STM32F4_DISCOVERY&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/src&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/TIMv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/I2Cv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/RTCv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/OTGv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/GPIOv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32F4xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/SPIv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/USARTv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx/STM32F4xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/common/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/common/ARMCMx/CMSIS/include&quot;"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.436142873" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="CORTEX_USE_FPU=TRUE"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other.617215585" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.other" useByScannerDiscovery="true" value="-fgnu89-inline -c -Werror=type-limits -Werror=uninitialized" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.987572507" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.9853749" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.1302087199" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;..&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/stm32f4&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/kernel/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../ext&quot;"/>
<listOptionValue builtIn="false" value="&quot;../ext_algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/various&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console/binary&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/engines&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/boards&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/core&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/trigger&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/sensors&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../controllers/math&quot;"/>
<listOptionValue builtIn="false" value="&quot;../console_util&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/test&quot;"/>
<listOptionValue builtIn="false" value="&quot;../development/hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/flash&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/lcd&quot;"/>
<listOptionValue builtIn="false" value="&quot;../hw_layer/serial_over_usb&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/algo&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/ckp&quot;"/>
<listOptionValue builtIn="false" value="&quot;../russianefi/adc&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/system&quot;"/>
<listOptionValue builtIn="false" value="&quot;../config/stm32f4ems&quot;"/>
<listOptionValue builtIn="false" value="&quot;../splib&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/kernel/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/boards/ST_STM32F4_DISCOVERY&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/src&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/TIMv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/I2Cv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/RTCv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/OTGv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/GPIOv2&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32F4xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/SPIv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/hal/platforms/STM32/USARTv1&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/GCC/ARMCMx/STM32F4xx&quot;"/>
<listOptionValue builtIn="false" value="&quot;../chibios/os/ports/common/ARMCMx&quot;"/>
<listOptionValue builtIn="false" value="../chibios/os/ports/common/ARMCMx/CMSIS/include"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.1706753831" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="CORTEX_USE_FPU=TRUE"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.other.322986548" name="Other compiler flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.other" useByScannerDiscovery="true" value="-fgnu89-inline -c -Werror=type-limits -Werror=uninitialized" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti.1128000519" name="Do not use RTTI (-fno-rtti)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.nortti" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions.1968021762" name="Do not use exceptions (-fno-exceptions)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.noexceptions" useByScannerDiscovery="true" value="true" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1182324371" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.558132651" name="Cross ARM C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.1292330315" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.1435444517" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" value="--specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group" valueType="string"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.470913487" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.1065470760" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.973678403" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value="-Wl,-Map,&quot;rusefi.map&quot; -mcpu=cortex-m4 -mthumb -g3" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostdlibs.751125057" name="No startup or default libs (-nostdlib)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostdlibs" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.1368404884" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" valueType="stringList">
<listOptionValue builtIn="false" value="&quot;..\config\stm32f4ems\STM32F407xG_CCM.ld&quot;"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs.70696403" name="Do not use default libraries (-nodefaultlibs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nodeflibs" value="false" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart.673480049" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.nostart" value="false" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.1271377648" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.200855647" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1875734672" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.2120537020" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.613905004" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.1964621762" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.1321840780" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.1210916258" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.65018176" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.1813003693" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.1607116074" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="hw_layer/stm32f1|chibios/os/hal/platforms/STM32/USBv1|chibios/os/hal/platforms/STM32/RTCv1|chibios/os/hal/platforms/STM32/GPIOv1|chibios/os/ports/GCC/ARMCMx/STM32F1xx|chibios/os/hal/platforms/STM32F1xx|chibios/boards/ST_NUCLEO_F103RB|config/stm32f0egt|egt2can.cpp|chibios/boards/simulator|chibios/boards/OLIMEX_STM32_E407|chibios/boards/ST_STM32F0_DISCOVERY|chibios/os/ports/GCC/ARMCMx/STM32F0xx|hw_layer/stm32f0|chibios/os/hal/platforms/STM32/I2Cv2|chibios/os/hal/platforms/STM32/SPIv2|chibios/os/hal/platforms/STM32/USARTv2|chibios/os/ports/IAR|chibios/os/hal/platforms/STM32F0xx|chibios/os/hal/platforms/Win32|chibios/os/ports/GCC/ARMCMx/chcore_v6m.c|chibios/os/ports/GCC/SIMIA32|chibios/os/ports/IAR/ARMCMx/chcore_v6m.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="rusefi_firmware.org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.391826329" name="ARM Cross Target Application"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Release_broken_original">
<resource resourceType="PROJECT" workspacePath="/firmware"/>
</configuration>
<configuration configurationName="Debug_EMS">
<resource resourceType="PROJECT" workspacePath="/firmware"/>
</configuration>
<configuration configurationName="Debug_EGT2CAN">
<resource resourceType="PROJECT" workspacePath="/firmware"/>
</configuration>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.release.1422617130;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.release.1422617130.;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.compiler.release.431693497;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.c.compiler.base.input.1479270851">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.cross.arm.gnu.ARM_CS_GCCWinManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1943399423;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1943399423.;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.assembler.debug.1465123421;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.assembler.base.input.1266531692">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.cross.arm.gnu.ARM_CS_GCCWinManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1943399423;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1943399423.;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.compiler.debug.866330458;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.cpp.compiler.base.input.1939416167">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.cross.arm.gnu.ARM_CS_GCCWinManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.release.1422617130;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.release.1422617130.;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.cpp.compiler.release.487461954;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.cpp.compiler.base.input.815685204">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.cross.arm.gnu.ARM_CS_GCCWinManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1943399423;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1943399423.;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.c.compiler.debug.1498722775;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.c.compiler.base.input.250064833">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.cross.arm.gnu.ARM_CS_GCCWinManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.release.1422617130;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.release.1422617130.;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.assembler.release.1527944975;org.eclipse.cdt.cross.arm.gnu.sourcery.windows.assembler.base.input.1359572999">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.cross.arm.gnu.ARM_CS_GCCWinManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>firmware</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

File diff suppressed because it is too large Load Diff

View File

@ -1,194 +0,0 @@
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.8.5 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<classes visible="yes" title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="no"/>
<detaileddescription title=""/>
<memberdecl>
<classes visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

View File

@ -1,306 +0,0 @@
##############################################################################
# Build global options
# NOTE: Can be overridden externally.
#
PROJECT_DIR = .
# Compiler options here.
ifeq ($(USE_OPT),)
# USE_OPT = -O2 -ggdb -std=gnu99 -fomit-frame-pointer -falign-functions=16
# USE_OPT = $(RFLAGS) -O1 -fgnu89-inline -ggdb -fomit-frame-pointer -falign-functions=16 -std=gnu99 -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers
USE_OPT = $(EXTRA_PARAMS) $(RFLAGS) -O2 -fomit-frame-pointer -falign-functions=16 -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Werror=type-limits -Wno-error=strict-aliasing -Wno-error=attributes
endif
# C specific options here (added to USE_OPT).
ifeq ($(USE_COPT),)
USE_COPT = -fgnu89-inline -std=gnu99
endif
# C++ specific options here (added to USE_OPT).
ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -std=c++11 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Werror=write-strings -Werror=type-limits
endif
# Enable this if you want the linker to remove unused code and data
ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
# Linker extra options here.
ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif
# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
USE_LTO = no
endif
# If enabled, this option allows to compile the application in THUMB mode.
ifeq ($(USE_THUMB),)
USE_THUMB = yes
endif
# Enable this if you want to see the full log while compiling.
ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
endif
#
# Build global options
##############################################################################
##############################################################################
# Architecture or project specific options
#
USE_FPU = softfp
# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
USE_FPU = no
endif
#
# Architecture or project specific options
##############################################################################
##############################################################################
# Project, sources and paths
#
# Define project name here
PROJECT = rusefi
# Imported source files and paths
CHIBIOS = chibios
#include $(CHIBIOS)/test/test.mk
#PROJECT_BOARD = OLIMEX_STM32_E407
ifneq ($(PROJECT_BOARD),OLIMEX_STM32_E407)
PROJECT_BOARD = ST_STM32F4_DISCOVERY
endif
DDEFS += -D$(PROJECT_BOARD)
# Imported source files and paths
include $(CHIBIOS)/boards/$(PROJECT_BOARD)/board.mk
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
#include $(CHIBIOS)/os/various/cpp_wrappers/kernel.mk
include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk
include console/binary/tunerstudio.mk
include ext/ext.mk
include hw_layer/hw_layer.mk
include development/development.mk
include controllers/controllers.mk
include $(PROJECT_DIR)/util/util.mk
include $(PROJECT_DIR)/config/engines/engines.mk
include $(PROJECT_DIR)/controllers/algo/algo.mk
include $(PROJECT_DIR)/controllers/core/core.mk
include $(PROJECT_DIR)/controllers/math/math.mk
include $(PROJECT_DIR)/controllers/sensors/sensors.mk
include $(PROJECT_DIR)/controllers/system/system.mk
include $(PROJECT_DIR)/controllers/trigger/trigger.mk
include $(PROJECT_DIR)/console/console.mk
include $(PROJECT_DIR)/console_util/console_util.mk
# Define linker script file here
LDSCRIPT= config/stm32f4ems/STM32F407xG_CCM.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(PORTSRC) \
$(KERNSRC) \
$(VARIOUSSRC) \
chibios/os/various/chprintf.c \
chibios/os/various/memstreams.c \
chibios/os/various/chrtclib.c \
$(UTILSRC) \
$(ENGINES_SRC) \
$(CONSOLESRC) \
$(CONSOLEUTILSRC) \
$(HALSRC) \
$(DEV_SRC) \
$(HW_LAYER_EMS) \
$(CONTROLLERSSRC) \
$(CONTROLLERS_ALGO_SRC) \
$(CONTROLLERS_CORE_SRC) \
$(CONTROLLERS_MATH_SRC) \
$(CONTROLLERS_SENSORS_SRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
$(FATFSSRC) \
$(TRIGGER_SRC) \
$(SYSTEMSRC)
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CPPSRC = $(CHCPPSRC) \
$(TRIGGER_SRC_CPP) \
$(TRIGGER_DECODERS_SRC_CPP) \
$(DEV_SRC_CPP) \
$(CONTROLLERS_ALGO_SRC_CPP) \
$(SYSTEMSRC_CPP) \
$(ENGINES_SRC_CPP) \
$(HW_LAYER_EMS_CPP) \
$(TUNERSTUDIO_SRC_CPP) \
$(CONSOLE_SRC_CPP) \
$(CONTROLLERS_SENSORS_SRC_CPP) \
$(CONTROLLERS_SRC_CPP) \
$(UTILSRC_CPP) \
$(CONTROLLERS_CORE_SRC_CPP) \
$(CONTROLLERS_MATH_SRC_CPP) \
rusefi.cpp \
main.cpp
# C sources to be compiled in ARM mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
# option that results in lower performance and larger code size.
ACSRC =
# C++ sources to be compiled in ARM mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
# option that results in lower performance and larger code size.
ACPPSRC =
# C sources to be compiled in THUMB mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
# option that results in lower performance and larger code size.
TCSRC =
# C sources to be compiled in THUMB mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
# option that results in lower performance and larger code size.
TCPPSRC =
# List ASM source files here
ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) \
$(CHCPPINC) \
$(CHIBIOS)/os/various \
config/stm32f4ems \
config/engines \
config \
chibios/os/various \
ext \
ext_algo \
util \
console_util \
console \
console/binary \
hw_layer \
hw_layer/serial_over_usb \
hw_layer/algo \
hw_layer/lcd \
hw_layer/stm32f4 \
development \
development/hw_layer \
development/test \
controllers \
controllers/sensors \
controllers/system \
controllers/algo \
controllers/core \
controllers/math \
controllers/trigger
#
# Project, sources and paths
##############################################################################
##############################################################################
# Compiler settings
#
MCU = cortex-m4
#TRGT = arm-elf-
TRGT = arm-none-eabi-
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.
LD = $(TRGT)gcc
#LD = $(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
OD = $(TRGT)objdump
SZ = $(TRGT)size
HEX = $(CP) -O ihex
BIN = $(CP) -O binary
# ARM-specific options here
AOPT =
# THUMB-specific options here
TOPT = -mthumb -DTHUMB
# Define C warning options here
CWARN = -Wall -Wextra -Wstrict-prototypes
# Define C++ warning options here
CPPWARN = -Wall -Wextra
#
# Compiler settings
##############################################################################
##############################################################################
# Start of default section
#
# List all default C defines here, like -D_DEBUG=1
DDEFS =
# List all default ASM defines here, like -D_DEBUG=1
DADEFS =
# List all default directories to look for include files here
DINCDIR =
# List the default directory to look for the libraries here
DLIBDIR =
# List all default libraries here
DLIBS =
#
# End of default section
##############################################################################
##############################################################################
# Start of user section
#
# List all user C define here, like -D_DEBUG=1
UDEFS =
# Define ASM defines here
UADEFS =
# List all user directories here
UINCDIR =
# List the user directory to look for the libraries here
ULIBDIR =
# List all user libraries here
ULIBS = -lm
#
# End of user defines
##############################################################################
RULESPATH = $(CHIBIOS)/os/ports/GCC/ARMCMx
include $(RULESPATH)/rules.mk

View File

@ -1,172 +0,0 @@
os/hal/hal.mk
os/hal/include/adc.h
os/hal/include/can.h
os/hal/include/ext.h
os/hal/include/gpt.h
os/hal/include/hal.h
os/hal/include/i2c.h
os/hal/include/icu.h
os/hal/include/io_block.h
os/hal/include/io_channel.h
os/hal/include/mac.h
os/hal/include/mii.h
os/hal/include/mmcsd.h
os/hal/include/mmc_spi.h
os/hal/include/pal.h
os/hal/include/pwm.h
os/hal/include/rtc.h
os/hal/include/sdc.h
os/hal/include/serial.h
os/hal/include/serial_usb.h
os/hal/include/spi.h
os/hal/include/tm.h
os/hal/include/uart.h
os/hal/include/usb.h
os/hal/platforms/STM32/can_lld.c
os/hal/platforms/STM32/can_lld.h
os/hal/platforms/STM32/ext_lld.c
os/hal/platforms/STM32/ext_lld.h
os/hal/platforms/STM32/GPIOv2/pal_lld.c
os/hal/platforms/STM32/GPIOv2/pal_lld.h
os/hal/platforms/STM32/i2s_lld.c
os/hal/platforms/STM32/i2s_lld.h
os/hal/platforms/STM32/mac_lld.c
os/hal/platforms/STM32/mac_lld.h
os/hal/platforms/STM32/OTGv1/stm32_otg.h
os/hal/platforms/STM32/OTGv1/usb_lld.c
os/hal/platforms/STM32/OTGv1/usb_lld.h
os/hal/platforms/STM32/RTCv2/rtc_lld.c
os/hal/platforms/STM32/RTCv2/rtc_lld.h
os/hal/platforms/STM32/sdc_lld.c
os/hal/platforms/STM32/sdc_lld.h
os/hal/platforms/STM32/SPIv1/spi_lld.c
os/hal/platforms/STM32/SPIv1/spi_lld.h
os/hal/platforms/STM32/stm32.h
os/hal/platforms/STM32/TIMv1/gpt_lld.c
os/hal/platforms/STM32/TIMv1/gpt_lld.h
os/hal/platforms/STM32/TIMv1/icu_lld.c
os/hal/platforms/STM32/TIMv1/icu_lld.h
os/hal/platforms/STM32/TIMv1/pwm_lld.c
os/hal/platforms/STM32/TIMv1/pwm_lld.h
os/hal/platforms/STM32/TIMv1/stm32_tim.h
os/hal/platforms/STM32/USARTv1/serial_lld.c
os/hal/platforms/STM32/USARTv1/serial_lld.h
os/hal/platforms/STM32/USARTv1/uart_lld.c
os/hal/platforms/STM32/USARTv1/uart_lld.h
os/hal/platforms/STM32F4xx/adc_lld.c
os/hal/platforms/STM32F4xx/adc_lld.h
os/hal/platforms/STM32F4xx/ext_lld_isr.c
os/hal/platforms/STM32F4xx/ext_lld_isr.h
os/hal/platforms/STM32F4xx/hal_lld.c
os/hal/platforms/STM32F4xx/hal_lld.h
os/hal/platforms/STM32F4xx/platform.dox
os/hal/platforms/STM32F4xx/platform.mk
os/hal/platforms/STM32F4xx/stm32f2xx.h
os/hal/platforms/STM32F4xx/stm32f4xx.h
os/hal/platforms/STM32F4xx/stm32_dma.c
os/hal/platforms/STM32F4xx/stm32_dma.h
os/hal/platforms/STM32F4xx/stm32_isr.h
os/hal/platforms/STM32F4xx/stm32_rcc.h
os/hal/src/adc.c
os/hal/src/can.c
os/hal/src/ext.c
os/hal/src/gpt.c
os/hal/src/hal.c
os/hal/src/i2c.c
os/hal/src/icu.c
os/hal/src/mac.c
os/hal/src/mmcsd.c
os/hal/src/mmc_spi.c
os/hal/src/pal.c
os/hal/src/pwm.c
os/hal/src/rtc.c
os/hal/src/sdc.c
os/hal/src/serial.c
os/hal/src/serial_usb.c
os/hal/src/spi.c
os/hal/src/tm.c
os/hal/src/uart.c
os/hal/src/usb.c
os/kernel/include/ch.h
os/kernel/include/chbsem.h
os/kernel/include/chcond.h
os/kernel/include/chdebug.h
os/kernel/include/chdynamic.h
os/kernel/include/chevents.h
os/kernel/include/chfiles.h
os/kernel/include/chheap.h
os/kernel/include/chinline.h
os/kernel/include/chlists.h
os/kernel/include/chmboxes.h
os/kernel/include/chmemcore.h
os/kernel/include/chmempools.h
os/kernel/include/chmsg.h
os/kernel/include/chmtx.h
os/kernel/include/chqueues.h
os/kernel/include/chregistry.h
os/kernel/include/chschd.h
os/kernel/include/chsem.h
os/kernel/include/chstreams.h
os/kernel/include/chsys.h
os/kernel/include/chthreads.h
os/kernel/include/chvt.h
os/kernel/kernel.mk
os/kernel/src/chcond.c
os/kernel/src/chdebug.c
os/kernel/src/chdynamic.c
os/kernel/src/chevents.c
os/kernel/src/chheap.c
os/kernel/src/chlists.c
os/kernel/src/chmboxes.c
os/kernel/src/chmemcore.c
os/kernel/src/chmempools.c
os/kernel/src/chmsg.c
os/kernel/src/chmtx.c
os/kernel/src/chqueues.c
os/kernel/src/chregistry.c
os/kernel/src/chschd.c
os/kernel/src/chsem.c
os/kernel/src/chsys.c
os/kernel/src/chthreads.c
os/kernel/src/chvt.c
os/ports/common/ARMCMx/CMSIS/include/arm_common_tables.h
os/ports/common/ARMCMx/CMSIS/include/arm_math.h
os/ports/common/ARMCMx/CMSIS/include/core_cm0.h
os/ports/common/ARMCMx/CMSIS/include/core_cm0plus.h
os/ports/common/ARMCMx/CMSIS/include/core_cm3.h
os/ports/common/ARMCMx/CMSIS/include/core_cm4.h
os/ports/common/ARMCMx/CMSIS/include/core_cm4_simd.h
os/ports/common/ARMCMx/CMSIS/include/core_cmFunc.h
os/ports/common/ARMCMx/CMSIS/include/core_cmInstr.h
os/ports/common/ARMCMx/CMSIS/readme.txt
os/ports/common/ARMCMx/nvic.c
os/ports/common/ARMCMx/nvic.h
os/ports/GCC/ARMCMx/chcore.c
os/ports/GCC/ARMCMx/chcore.h
os/ports/GCC/ARMCMx/chcore_v7m.c
os/ports/GCC/ARMCMx/chcore_v7m.h
os/ports/GCC/ARMCMx/chtypes.h
os/ports/GCC/ARMCMx/crt0.c
os/ports/GCC/ARMCMx/rules.mk
os/ports/GCC/ARMCMx/STM32F4xx/cmparams.h
os/ports/GCC/ARMCMx/STM32F4xx/port.mk
os/ports/GCC/ARMCMx/STM32F4xx/vectors.c
os/ports/IAR/ARMCMx/chcore.c
os/ports/IAR/ARMCMx/chcore.h
os/ports/IAR/ARMCMx/chcoreasm_v6m.s
os/ports/IAR/ARMCMx/chcoreasm_v7m.s
os/ports/IAR/ARMCMx/chcore_v6m.c
os/ports/IAR/ARMCMx/chcore_v6m.h
os/ports/IAR/ARMCMx/chcore_v7m.c
os/ports/IAR/ARMCMx/chcore_v7m.h
os/ports/IAR/ARMCMx/chtypes.h
os/ports/IAR/ARMCMx/cstartup.s
os/ports/IAR/ARMCMx/STM32F4xx/cmparams.h
os/ports/IAR/ARMCMx/STM32F4xx/vectors.s
os/various/chprintf.c
os/various/chprintf.h
os/various/fatfs_diskio.c
os/various/fatfs_syscall.c
os/various/memstreams.c
os/various/memstreams.h
os/various/various.mk

View File

@ -1,111 +0,0 @@
Index: boards/ST_STM32F4_DISCOVERY/board.h
===================================================================
--- boards/ST_STM32F4_DISCOVERY/board.h (revision 2723)
+++ boards/ST_STM32F4_DISCOVERY/board.h (working copy)
@@ -27,6 +27,7 @@
#define BOARD_ST_STM32F4_DISCOVERY
#define BOARD_NAME "STMicroelectronics STM32F4-Discovery"
+#define STM32_LSECLK 32768
/*
* Board oscillators-related settings.
Index: os/kernel/src/chdebug.c
===================================================================
--- os/kernel/src/chdebug.c (revision 2723)
+++ os/kernel/src/chdebug.c (working copy)
@@ -114,7 +114,7 @@
void dbg_check_lock(void) {
if ((dbg_isr_cnt != 0) || (dbg_lock_cnt != 0))
- chDbgPanic("SV#4");
+ chDbgPanic("SV#4 misplaced chSysLock()");
dbg_enter_lock();
}
@@ -138,7 +138,7 @@
void dbg_check_lock_from_isr(void) {
if ((dbg_isr_cnt <= 0) || (dbg_lock_cnt != 0))
- chDbgPanic("SV#6");
+ chDbgPanic("SV#6 misplaced chSysLockFromIsr");
dbg_enter_lock();
}
@@ -193,7 +193,7 @@
void chDbgCheckClassI(void) {
if ((dbg_isr_cnt < 0) || (dbg_lock_cnt <= 0))
- chDbgPanic("SV#10");
+ chDbgPanic("SV#10 misplaced I-class function");
}
/**
@@ -268,10 +268,11 @@
*
* @param[in] msg the pointer to the panic message string
*/
+
+void chDbgPanic3(const char *msg, char * file, int line);
+
void chDbgPanic(const char *msg) {
-
- dbg_panic_msg = msg;
- chSysHalt();
+ chDbgPanic3(msg, __FILE__, __LINE__);
}
#endif /* CH_DBG_ENABLED */
Index: os/ports/GCC/ARMCMx/chcore_v7m.h
===================================================================
--- os/ports/GCC/ARMCMx/chcore_v7m.h (revision 2723)
+++ os/ports/GCC/ARMCMx/chcore_v7m.h (working copy)
@@ -36,6 +36,8 @@
#ifndef _CHCORE_V7M_H_
#define _CHCORE_V7M_H_
+#include "chdebug.h"
+
/*===========================================================================*/
/* Port constants. */
/*===========================================================================*/
@@ -486,6 +488,8 @@
#define port_wait_for_interrupt()
#endif
+void chDbgStackOverflowPanic(Thread *otp);
+
/**
* @brief Performs a context switch between two threads.
* @details This is the most critical code in any port, this function
@@ -502,7 +506,7 @@
#define port_switch(ntp, otp) { \
register struct intctx *r13 asm ("r13"); \
if ((stkalign_t *)(r13 - 1) < otp->p_stklimit) \
- chDbgPanic("stack overflow"); \
+ chDbgStackOverflowPanic(otp); \
_port_switch(ntp, otp); \
}
#endif
Index: os/ports/GCC/ARMCMx/rules.mk
===================================================================
--- os/ports/GCC/ARMCMx/rules.mk (revision 2723)
+++ os/ports/GCC/ARMCMx/rules.mk (working copy)
@@ -60,7 +60,7 @@
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
ASXFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS)
CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS)
-CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.cpp=.lst)) $(DEFS)
+CPPFLAGS = $(MCFLAGS) $(CPPOPT) $(CPPWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.cpp=.lst)) $(DEFS)
ifeq ($(USE_LINK_GC),yes)
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LLIBDIR)
else
@@ -113,7 +113,7 @@
$(BUILDDIR) $(OBJDIR) $(LSTDIR):
ifneq ($(USE_VERBOSE_COMPILE),yes)
@echo Compiler Options
- @echo $(CC) -c $(CFLAGS) -I. $(IINCDIR) main.c -o main.o
+ @echo $(CPPC) -c $(CPPFLAGS) -I. $(IINCDIR) main.cpp -o main.o -llibstd++
@echo
endif
mkdir -p $(OBJDIR)

View File

@ -1,2 +0,0 @@
rd /s /q .dep
rd /s /q build

View File

@ -1,7 +0,0 @@
rem make, gcc, Windows and Cygwin combined have some issue with spaces or colons in paths, that's a workaround
rem that's more or less 'make clean'
rd /s /q .dep
rd /s /q build
# that's 'make' with some extra utilities
compile.bat

View File

@ -1,17 +0,0 @@
rd /s /q deliver
mkdir deliver
call clean.bat
make
cp build\rusefi.elf deliver\rusefi_debug.elf
cp build\rusefi.bin deliver\rusefi_debug.bin
cp build\rusefi.hex deliver\rusefi_debug.hex
call clean.bat
make EXTRA_PARAMS='-DEFI_ENABLE_ASSERTS=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'
cp build\rusefi.elf deliver\rusefi_release.elf
cp build\rusefi.bin deliver\rusefi_release.bin
cp build\rusefi.hex deliver\rusefi_release.hex

View File

@ -1,52 +0,0 @@
@echo off
rm -rf .dep/
rm -rf build\rusefi.hex
rm -rf build\rusefi.bin
call update_version.bat
echo Starting compilation
rem the important piece
make
rem cd build
rem if not exist rusefi.hex echo "compilation failed"
rem if not exist rusefi.hex exit -1
rem cd ..
if errorlevel 1 goto error
echo Build complete success.
rem svn info > ../firmware_binary/version.txt
rem cp config/features.h ../firmware_binary
rem cp build/rusefi.hex ../firmware_binary
rem cp build/rusefi.elf ../firmware_binary
rem cp tunerstudio/rusefi.ini ../firmware_binary
rem cd ../firmware_binary
rem del firmaware_binary.zip
rem 7z a firmaware_binary.zip rusefi.hex rusefi.ini features.h flash.bat
rem cd ../firmware
cd build
rem Generate human-readable version of the .map memory usage report
java -jar ../../java_tools/gcc_map_reader.jar > ../rusefi_ram_report.txt
cd ..
arm-none-eabi-size --format=berkeley "build\rusefi.elf"
arm-none-eabi-gcc -v
rem file, let's program the board right away
cd build
call ../flash_openocd
cd ..
goto end_of_file
:error
echo Compilation failed
:end_of_file

View File

@ -1,106 +0,0 @@
/**
* @file GY6_139QMB.cpp
* @brief 139qmb default engine configuration
*
* @date Feb 13, 2014
* @author rus084, (c) 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#include "GY6_139QMB.h"
#include "engine_math.h"
#include "engine_configuration.h"
#include "allsensors.h"
#include "advance_map.h"
EXTERN_ENGINE
;
static const fuel_table_t default_139qmb_fuel_table = {
{ 6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000 }, { 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000 }, { 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000 }, { 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000 }, { 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000 },
{ 6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000 }, { 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000 }, { 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000 }, { 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000 }, { 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000 }, { 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000 }, { 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000 }, { 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000 }, { 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000 }, { 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000 }, { 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000, 6.000000, 6.000000, 6.000000, 6.000000, 6.000000,
6.000000 }
};
static void setDefault139qmbMaps(DECLARE_ENGINE_PARAMETER_F) {
setFuelLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER);
setFuelRpmBin(1000, 11000 PASS_ENGINE_PARAMETER);
setTimingLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER);
setTimingRpmBin(1000, 11000 PASS_ENGINE_PARAMETER);
copyFuelTable(default_139qmb_fuel_table, config->fuelTable);
//copyTimingTable(default_139qmb_timing_table, config->ignitionTable);
}
void setGy6139qmbDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
setDefault139qmbMaps(PASS_ENGINE_PARAMETER_F);
// engineConfiguration->map.sensor.type = MT_3V_SENSOR;
setEgoSensor(ES_NarrowBand PASS_ENGINE_PARAMETER);
engineConfiguration->rpmHardLimit = 9000;
engineConfiguration->cranking.rpm = 1100;
engineConfiguration->targetIdleRpm = 2000;
engineConfiguration->analogInputDividerCoefficient = 1;
engineConfiguration->algorithm = LM_MAP;
engineConfiguration->globalTriggerAngleOffset = 45;
engineConfiguration->bc.sensorChartMode = SC_MAP;
engineConfiguration->specs.displacement = 0.072; // 72cc
engineConfiguration->specs.cylindersCount = 1;
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
engineConfiguration->specs.firingOrder = FO_ONE_CYLINDER;
/**
* We treat the trigger as 8-1 toothed wheel
*/
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
engineConfiguration->trigger.customTotalToothCount = 8;
engineConfiguration->trigger.customSkippedToothCount = 1;
boardConfiguration->injectionPins[0] = GPIOC_9;
boardConfiguration->ignitionPins[0] = GPIOC_8;
}

View File

@ -1,16 +0,0 @@
/*
* @file GY6_139QMB.h
*
* @date 13 feb 2014 y.
* @author rus084
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef GY6_139QMB_H_
#define GY6_139QMB_H_
#include "engine.h"
void setGy6139qmbDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
#endif /* GY6_139QMB_H_ */

View File

@ -1,15 +0,0 @@
/**
* @file MiniCooperR50.cpp
*
* MINI_COOPER_R50 = 13
*
* @date Apr 9, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "MiniCooperR50.h"
void setMiniCooperR50(engine_configuration_s *engineConfiguration) {
engineConfiguration->trigger.type = TT_MINI_COOPER_R50;
}

View File

@ -1,16 +0,0 @@
/*
* @file MiniCooperR50.h
*
* @date Apr 9, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef MINICOOPERR50_H_
#define MINICOOPERR50_H_
#include "main.h"
#include "engine_configuration.h"
void setMiniCooperR50(engine_configuration_s *engineConfiguration);
#endif /* MINICOOPERR50_H_ */

View File

@ -1,20 +0,0 @@
/**
* @file acura_rsx.cpp
*
* set_engine_type 27
*
* @date Jan 16, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#include "acura_rsx.h"
void setAcuraRSX(engine_configuration_s *engineConfiguration) {
// http://injectordynamics.com/injectors/id1300-2/
engineConfiguration->injector.flow = 1300;
engineConfiguration->specs.cylindersCount = 4;
}

View File

@ -1,14 +0,0 @@
/**
* @file acura_rsx.h
*
* @date Jan 16, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef CONFIG_ENGINES_ACURA_RSX_H_
#define CONFIG_ENGINES_ACURA_RSX_H_
#include "engine_configuration.h"
void setAcuraRSX(engine_configuration_s *engineConfiguration);
#endif /* CONFIG_ENGINES_ACURA_RSX_H_ */

View File

@ -1,47 +0,0 @@
/**
* @file audi_aan.cpp
* @brief Audo AAN default engine configuration
*
* @date Nov 24, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*
* This file is part of rusEfi - see http://rusefi.com
*
* rusEfi is free software; you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "main.h"
#if EFI_ENGINE_AUDI_AAN || defined(__DOXYGEN__)
#include "engine_controller.h"
extern engine_configuration2_s engineConfiguration2;
static void configureShaftPositionEmulatorShapeWhat(PwmConfig *state) {
/**
* One signal per cam shaft revolution
*/
int pinStates0[] = { 1, 0 };
float switchTimes[] = { 0.8, 1 };
int *pinStates[2] = { pinStates0 };
weComplexInit("distributor", state, 0, 2, switchTimes, 1, pinStates);
}
void setDefaultEngineConfiguration(EngineConfiguration *engineConfiguration) {
engineConfiguration2.shaftPositionEventCount = 2;
}
#endif /* EFI_ENGINE_AUDI_AAN */

View File

@ -1,16 +0,0 @@
/**
* @file audi_aan.h
* @brief Audo AAN default engine configuration
*
* @date Nov 24, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef AUDI_AAN_H_
#define AUDI_AAN_H_
#if EFI_ENGINE_AUDI_AAN
#endif /* EFI_ENGINE_AUDI_AAN */
#endif /* AUDI_AAN_H_ */

View File

@ -1,166 +0,0 @@
/**
* @file bmw_e34.cpp
*
* set_engine_type 25
*
* Coil pairs: 1-6, 2-5, 3-4
*
* Injector groups: 1,2,3 & 4,5,6
*
* @date Nov 5, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "global.h"
#include "bmw_e34.h"
#include "thermistors.h"
#include "engine_math.h"
EXTERN_ENGINE
;
void setBmwE34(DECLARE_ENGINE_PARAMETER_F) {
// chartsize 450
engineConfiguration->engineChartSize = 450;
// setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
// engineConfiguration->trigger.type = TT_ONE_PLUS_TOOTHED_WHEEL_60_2;
// engineConfiguration->injectionMode = IM_SEQUENTIAL;
// boardConfiguration->triggerInputPins[0] = GPIOC_6;
// boardConfiguration->triggerInputPins[1] = GPIOA_5;
//Base engine setting
engineConfiguration->specs.cylindersCount = 6;
engineConfiguration->specs.displacement = 2.91;
engineConfiguration->specs.firingOrder = FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4;
engineConfiguration->injectionMode = IM_BATCH;
engineConfiguration->twoWireBatch = true;
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
engineConfiguration->useOnlyFrontForTrigger = true;
// Trigger configuration
// engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
engineConfiguration->globalTriggerAngleOffset = 84;
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
engineConfiguration->trigger.customTotalToothCount = 30;
engineConfiguration->trigger.customSkippedToothCount = 1;
// Injection settings
engineConfiguration->injector.lag = 1.15;
engineConfiguration->injector.flow = 750;
// General settings
boardConfiguration->tunerStudioSerialSpeed = 57600;
engineConfiguration->rpmHardLimit = 7000;
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
// for best performance at high RPM, we need to turn off 'Engine Sniffer' and 'Sensor Sniffer'
boardConfiguration->sensorChartMode = SC_OFF;
engineConfiguration->isEngineChartEnabled = false;
engineConfiguration->isCylinderCleanupEnabled = false;
engineConfiguration->isInjectionEnabled = true;
engineConfiguration->isIgnitionEnabled = true;
setConstantDwell(3 PASS_ENGINE_PARAMETER); // a bit shorter dwell
engineConfiguration->ignMathCalculateAtIndex = 14;
engineConfiguration->mapAveragingSchedulingAtIndex = 6;
// Cranking
engineConfiguration->cranking.rpm = 600;
engineConfiguration->crankingInjectionMode = IM_BATCH;
engineConfiguration->cranking.baseFuel = 7;
engineConfiguration->useConstantDwellDuringCranking = true;
engineConfiguration->ignitionDwellForCrankingMs = 6;
// Inputs configuration
engineConfiguration->analogInputDividerCoefficient = 1.52;
engineConfiguration->vbattDividerCoeff = 5.33;
engineConfiguration->vbattAdcChannel = EFI_ADC_15; // PC5
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
boardConfiguration->triggerInputPins[0] = GPIOA_5;
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
setWholeTimingTable(25 PASS_ENGINE_PARAMETER);
board_configuration_s *bc = &engineConfiguration->bc;
bc->malfunctionIndicatorPin = GPIO_UNASSIGNED;
// bc->isFastAdcEnabled = true;
bc->injectionPinMode = OM_INVERTED;
bc->injectionPins[0] = GPIOB_8; // #1
bc->injectionPins[1] = GPIOE_2; // #2
bc->injectionPins[2] = GPIOE_3; // #3
bc->injectionPins[3] = GPIOE_4; // #4
bc->injectionPins[4] = GPIOE_5; // #5
bc->injectionPins[5] = GPIOE_6; // #6
bc->ignitionPinMode = OM_INVERTED;
bc->ignitionPins[0] = GPIOB_5; // #1
bc->ignitionPins[2] = GPIOB_6; // #3
bc->ignitionPins[4] = GPIOB_7; // #5
bc->triggerErrorPin = GPIO_UNASSIGNED;
// clutch up
boardConfiguration->clutchUpPin = GPIOD_3;
boardConfiguration->clutchUpPinMode = PI_PULLUP;
// fuel pump
boardConfiguration->fuelPumpPin = GPIOD_4;
// idle
boardConfiguration->idle.solenoidPin = GPIOC_14;
boardConfiguration->idle.solenoidPinMode = OM_INVERTED;
boardConfiguration->idle.solenoidFrequency = 300;
boardConfiguration->idlePosition = 50; // set_idle_pwm 50
// disable sd_card
boardConfiguration->sdCardCsPin = GPIO_UNASSIGNED;
boardConfiguration->is_enabled_spi_2 = false;
boardConfiguration->is_enabled_spi_3 = false;
boardConfiguration->max31855spiDevice = SPI_NONE;
// turbocharger boost control solenoid: TODO output: GPIOE_6
// water injection #1 TODO GPIOD_7
// water injection #2 TODO GPIOE_2
/**
* emulating the 60-0 trigger takes some resources, let's keep it slow by default
* rpm 200
*/
bc->triggerSimulatorFrequency = 200;
// Configurating sensors:
// map
engineConfiguration->map.sensor.type = MT_MPX4250;
// thermistors
engineConfiguration->hasCltSensor = true;
engineConfiguration->hasIatSensor = true;
setThermistorConfiguration(&engineConfiguration->clt, -10, 9300, 20, 2500, 80, 335);
engineConfiguration->iat.config.bias_resistor = 2200;
setThermistorConfiguration(&engineConfiguration->iat, -10, 9300, 20, 2500, 80, 335);
engineConfiguration->clt.config.bias_resistor = 2200;
// /**
// * This saves a couple of ticks in trigger emulation methods
// * TODO: add some smart logic to detect unneeded trigger simulation pins?
// * TODO: but probably not worth it
// */
// bc->triggerSimulatorPins[1] = GPIO_UNASSIGNED;
boardConfiguration->triggerSimulatorPins[0] = GPIOD_1;
boardConfiguration->triggerSimulatorPins[1] = GPIOD_2;
bc->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
}

View File

@ -1,15 +0,0 @@
/**
* @file bmw_e34.h
*
* @date Nov 5, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef BMW_E34_H_
#define BMW_E34_H_
#include "engine.h"
void setBmwE34(DECLARE_ENGINE_PARAMETER_F);
#endif /* BMW_E34_H_ */

View File

@ -1,216 +0,0 @@
/**
* @file citroenBerlingoTU3JP.cpp
*
* CITROEN_TU3JP
* set_engine_type 15
* Board pin out for Frankenstein
*
* This config overrides some values of the default configuration which is set by setDefaultConfiguration() method
*
*
* @date Apr 15, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "engine_math.h"
#include "thermistors.h"
#include "citroenBerlingoTU3JP.h"
#include "settings.h"
void setLCD(board_configuration_s *boardConfiguration) {
boardConfiguration->HD44780_rs = GPIOE_7;
boardConfiguration->HD44780_e = GPIOE_9;
boardConfiguration->HD44780_db4 = GPIOE_11;
boardConfiguration->HD44780_db5 = GPIOE_13;
boardConfiguration->HD44780_db6 = GPIOE_15;
boardConfiguration->HD44780_db7 = GPIOB_10;
}
static const fuel_table_t tps_fuel_table = {
{/*0 engineLoad=0.00*/ /*0 800.0*/4.00, /*1 1213.0*/4.00, /*2 1626.0*/4.00, /*3 2040.0*/4.00, /*4 2453.0*/4.00, /*5 2866.0*/4.00, /*6 3280.0*/4.00, /*7 3693.0*/4.00, /*8 4106.0*/4.00, /*9 4520.0*/4.00, /*10 4933.0*/4.00, /*11 5346.0*/4.00, /*12 5760.0*/4.00, /*13 6173.0*/4.00, /*14 6586.0*/4.00, /*15 7000.0*/4.00},
{/*1 engineLoad=6.66*/ /*0 800.0*/5.07, /*1 1213.0*/5.07, /*2 1626.0*/5.07, /*3 2040.0*/5.07, /*4 2453.0*/5.07, /*5 2866.0*/5.07, /*6 3280.0*/5.07, /*7 3693.0*/5.07, /*8 4106.0*/5.07, /*9 4520.0*/5.07, /*10 4933.0*/5.07, /*11 5346.0*/5.07, /*12 5760.0*/5.07, /*13 6173.0*/5.07, /*14 6586.0*/5.07, /*15 7000.0*/5.07},
{/*2 engineLoad=13.33*/ /*0 800.0*/6.13, /*1 1213.0*/6.13, /*2 1626.0*/6.13, /*3 2040.0*/6.13, /*4 2453.0*/6.13, /*5 2866.0*/6.13, /*6 3280.0*/6.13, /*7 3693.0*/6.13, /*8 4106.0*/6.13, /*9 4520.0*/6.13, /*10 4933.0*/6.13, /*11 5346.0*/6.13, /*12 5760.0*/6.13, /*13 6173.0*/6.13, /*14 6586.0*/6.13, /*15 7000.0*/6.13},
{/*3 engineLoad=20.00*/ /*0 800.0*/7.20, /*1 1213.0*/7.20, /*2 1626.0*/7.20, /*3 2040.0*/7.20, /*4 2453.0*/7.20, /*5 2866.0*/7.20, /*6 3280.0*/7.20, /*7 3693.0*/7.20, /*8 4106.0*/7.20, /*9 4520.0*/7.20, /*10 4933.0*/7.20, /*11 5346.0*/7.20, /*12 5760.0*/7.20, /*13 6173.0*/7.20, /*14 6586.0*/7.20, /*15 7000.0*/7.20},
{/*4 engineLoad=26.66*/ /*0 800.0*/8.27, /*1 1213.0*/8.27, /*2 1626.0*/8.27, /*3 2040.0*/8.27, /*4 2453.0*/8.27, /*5 2866.0*/8.27, /*6 3280.0*/8.27, /*7 3693.0*/8.27, /*8 4106.0*/8.27, /*9 4520.0*/8.27, /*10 4933.0*/8.27, /*11 5346.0*/8.27, /*12 5760.0*/8.27, /*13 6173.0*/8.27, /*14 6586.0*/8.27, /*15 7000.0*/8.27},
{/*5 engineLoad=33.33*/ /*0 800.0*/9.33, /*1 1213.0*/9.33, /*2 1626.0*/9.33, /*3 2040.0*/9.33, /*4 2453.0*/9.33, /*5 2866.0*/9.33, /*6 3280.0*/9.33, /*7 3693.0*/9.33, /*8 4106.0*/9.33, /*9 4520.0*/9.33, /*10 4933.0*/9.33, /*11 5346.0*/9.33, /*12 5760.0*/9.33, /*13 6173.0*/9.33, /*14 6586.0*/9.33, /*15 7000.0*/9.33},
{/*6 engineLoad=40.00*/ /*0 800.0*/10.40, /*1 1213.0*/10.40, /*2 1626.0*/10.40, /*3 2040.0*/10.40, /*4 2453.0*/10.40, /*5 2866.0*/10.40, /*6 3280.0*/10.40, /*7 3693.0*/10.40, /*8 4106.0*/10.40, /*9 4520.0*/10.40, /*10 4933.0*/10.40, /*11 5346.0*/10.40, /*12 5760.0*/10.40, /*13 6173.0*/10.40, /*14 6586.0*/10.40, /*15 7000.0*/10.40},
{/*7 engineLoad=46.66*/ /*0 800.0*/11.47, /*1 1213.0*/11.47, /*2 1626.0*/11.47, /*3 2040.0*/11.47, /*4 2453.0*/11.47, /*5 2866.0*/11.47, /*6 3280.0*/11.47, /*7 3693.0*/11.47, /*8 4106.0*/11.47, /*9 4520.0*/11.47, /*10 4933.0*/11.47, /*11 5346.0*/11.47, /*12 5760.0*/11.47, /*13 6173.0*/11.47, /*14 6586.0*/11.47, /*15 7000.0*/11.47},
{/*8 engineLoad=53.33*/ /*0 800.0*/12.53, /*1 1213.0*/12.53, /*2 1626.0*/12.53, /*3 2040.0*/12.53, /*4 2453.0*/12.53, /*5 2866.0*/12.53, /*6 3280.0*/12.53, /*7 3693.0*/12.53, /*8 4106.0*/12.53, /*9 4520.0*/12.53, /*10 4933.0*/12.53, /*11 5346.0*/12.53, /*12 5760.0*/12.53, /*13 6173.0*/12.53, /*14 6586.0*/12.53, /*15 7000.0*/12.53},
{/*9 engineLoad=60.00*/ /*0 800.0*/12.60, /*1 1213.0*/13.60, /*2 1626.0*/13.60, /*3 2040.0*/13.60, /*4 2453.0*/13.60, /*5 2866.0*/13.60, /*6 3280.0*/13.60, /*7 3693.0*/13.60, /*8 4106.0*/13.60, /*9 4520.0*/13.60, /*10 4933.0*/13.60, /*11 5346.0*/13.60, /*12 5760.0*/13.60, /*13 6173.0*/13.60, /*14 6586.0*/13.60, /*15 7000.0*/13.60},
{/*10 engineLoad=66.66*/ /*0 800.0*/14.67, /*1 1213.0*/14.67, /*2 1626.0*/14.67, /*3 2040.0*/14.67, /*4 2453.0*/14.67, /*5 2866.0*/14.67, /*6 3280.0*/14.67, /*7 3693.0*/14.67, /*8 4106.0*/14.67, /*9 4520.0*/14.67, /*10 4933.0*/14.67, /*11 5346.0*/14.67, /*12 5760.0*/14.67, /*13 6173.0*/14.67, /*14 6586.0*/14.67, /*15 7000.0*/14.67},
{/*11 engineLoad=73.33*/ /*0 800.0*/15.73, /*1 1213.0*/15.73, /*2 1626.0*/15.73, /*3 2040.0*/15.73, /*4 2453.0*/15.73, /*5 2866.0*/15.73, /*6 3280.0*/15.73, /*7 3693.0*/15.73, /*8 4106.0*/15.73, /*9 4520.0*/15.73, /*10 4933.0*/15.73, /*11 5346.0*/15.73, /*12 5760.0*/15.73, /*13 6173.0*/15.73, /*14 6586.0*/15.73, /*15 7000.0*/15.73},
{/*12 engineLoad=80.00*/ /*0 800.0*/16.80, /*1 1213.0*/16.80, /*2 1626.0*/16.80, /*3 2040.0*/16.80, /*4 2453.0*/16.80, /*5 2866.0*/16.80, /*6 3280.0*/16.80, /*7 3693.0*/16.80, /*8 4106.0*/16.80, /*9 4520.0*/16.80, /*10 4933.0*/16.80, /*11 5346.0*/16.80, /*12 5760.0*/16.80, /*13 6173.0*/16.80, /*14 6586.0*/16.80, /*15 7000.0*/16.80},
{/*13 engineLoad=86.66*/ /*0 800.0*/17.87, /*1 1213.0*/17.87, /*2 1626.0*/17.87, /*3 2040.0*/17.87, /*4 2453.0*/17.87, /*5 2866.0*/17.87, /*6 3280.0*/17.87, /*7 3693.0*/17.87, /*8 4106.0*/17.87, /*9 4520.0*/17.87, /*10 4933.0*/17.87, /*11 5346.0*/17.87, /*12 5760.0*/17.87, /*13 6173.0*/17.87, /*14 6586.0*/17.87, /*15 7000.0*/17.87},
{/*14 engineLoad=93.33*/ /*0 800.0*/18.93, /*1 1213.0*/18.93, /*2 1626.0*/18.93, /*3 2040.0*/18.93, /*4 2453.0*/18.93, /*5 2866.0*/18.93, /*6 3280.0*/18.93, /*7 3693.0*/18.93, /*8 4106.0*/18.93, /*9 4520.0*/18.93, /*10 4933.0*/18.93, /*11 5346.0*/18.93, /*12 5760.0*/18.93, /*13 6173.0*/18.93, /*14 6586.0*/18.93, /*15 7000.0*/18.93},
{/*15 engineLoad=100.00*/ /*0 800.0*/20.00, /*1 1213.0*/20.00, /*2 1626.0*/20.00, /*3 2040.0*/20.00, /*4 2453.0*/20.00, /*5 2866.0*/20.00, /*6 3280.0*/20.00, /*7 3693.0*/20.00, /*8 4106.0*/20.00, /*9 4520.0*/20.00, /*10 4933.0*/20.00, /*11 5346.0*/20.00, /*12 5760.0*/20.00, /*13 6173.0*/20.00, /*14 6586.0*/20.00, /*15 7000.0*/20.00}
};
static const ignition_table_t tps_advance_table = {
{/*0 engineLoad=0.00*/ /*0 800.0*/+15.00, /*1 1213.0*/+16.33, /*2 1626.0*/+17.67, /*3 2040.0*/+19.00, /*4 2453.0*/+20.33, /*5 2866.0*/+21.67, /*6 3280.0*/+23.00, /*7 3693.0*/+24.33, /*8 4106.0*/+25.67, /*9 4520.0*/+27.00, /*10 4933.0*/+28.33, /*11 5346.0*/+29.67, /*12 5760.0*/+31.00, /*13 6173.0*/+32.33, /*14 6586.0*/+33.67, /*15 7000.0*/+35.00},
{/*1 engineLoad=6.66*/ /*0 800.0*/+14.80, /*1 1213.0*/+16.12, /*2 1626.0*/+17.45, /*3 2040.0*/+18.77, /*4 2453.0*/+20.10, /*5 2866.0*/+21.42, /*6 3280.0*/+22.75, /*7 3693.0*/+24.07, /*8 4106.0*/+25.40, /*9 4520.0*/+26.72, /*10 4933.0*/+28.04, /*11 5346.0*/+29.37, /*12 5760.0*/+30.69, /*13 6173.0*/+32.02, /*14 6586.0*/+33.34, /*15 7000.0*/+34.67},
{/*2 engineLoad=13.33*/ /*0 800.0*/+14.60, /*1 1213.0*/+15.92, /*2 1626.0*/+17.23, /*3 2040.0*/+18.55, /*4 2453.0*/+19.86, /*5 2866.0*/+21.18, /*6 3280.0*/+22.49, /*7 3693.0*/+23.81, /*8 4106.0*/+25.12, /*9 4520.0*/+26.44, /*10 4933.0*/+27.76, /*11 5346.0*/+29.07, /*12 5760.0*/+30.39, /*13 6173.0*/+31.70, /*14 6586.0*/+33.02, /*15 7000.0*/+34.33},
{/*3 engineLoad=20.00*/ /*0 800.0*/+14.40, /*1 1213.0*/+15.71, /*2 1626.0*/+17.01, /*3 2040.0*/+18.32, /*4 2453.0*/+19.63, /*5 2866.0*/+20.93, /*6 3280.0*/+22.24, /*7 3693.0*/+23.55, /*8 4106.0*/+24.85, /*9 4520.0*/+26.16, /*10 4933.0*/+27.47, /*11 5346.0*/+28.77, /*12 5760.0*/+30.08, /*13 6173.0*/+31.39, /*14 6586.0*/+32.69, /*15 7000.0*/+34.00},
{/*4 engineLoad=26.66*/ /*0 800.0*/+14.20, /*1 1213.0*/+15.50, /*2 1626.0*/+16.80, /*3 2040.0*/+18.09, /*4 2453.0*/+19.39, /*5 2866.0*/+20.69, /*6 3280.0*/+21.99, /*7 3693.0*/+23.28, /*8 4106.0*/+24.58, /*9 4520.0*/+25.88, /*10 4933.0*/+27.18, /*11 5346.0*/+28.48, /*12 5760.0*/+29.77, /*13 6173.0*/+31.07, /*14 6586.0*/+32.37, /*15 7000.0*/+33.67},
{/*5 engineLoad=33.33*/ /*0 800.0*/+14.00, /*1 1213.0*/+15.29, /*2 1626.0*/+16.58, /*3 2040.0*/+17.87, /*4 2453.0*/+19.16, /*5 2866.0*/+20.44, /*6 3280.0*/+21.73, /*7 3693.0*/+23.02, /*8 4106.0*/+24.31, /*9 4520.0*/+25.60, /*10 4933.0*/+26.89, /*11 5346.0*/+28.18, /*12 5760.0*/+29.47, /*13 6173.0*/+30.76, /*14 6586.0*/+32.04, /*15 7000.0*/+33.33},
{/*6 engineLoad=40.00*/ /*0 800.0*/+13.80, /*1 1213.0*/+15.08, /*2 1626.0*/+16.36, /*3 2040.0*/+17.64, /*4 2453.0*/+18.92, /*5 2866.0*/+20.20, /*6 3280.0*/+21.48, /*7 3693.0*/+22.76, /*8 4106.0*/+24.04, /*9 4520.0*/+25.32, /*10 4933.0*/+26.60, /*11 5346.0*/+27.88, /*12 5760.0*/+29.16, /*13 6173.0*/+30.44, /*14 6586.0*/+31.72, /*15 7000.0*/+33.00},
{/*7 engineLoad=46.66*/ /*0 800.0*/+13.60, /*1 1213.0*/+14.87, /*2 1626.0*/+16.14, /*3 2040.0*/+17.41, /*4 2453.0*/+18.68, /*5 2866.0*/+19.96, /*6 3280.0*/+21.23, /*7 3693.0*/+22.50, /*8 4106.0*/+23.77, /*9 4520.0*/+25.04, /*10 4933.0*/+26.31, /*11 5346.0*/+27.58, /*12 5760.0*/+28.85, /*13 6173.0*/+30.12, /*14 6586.0*/+31.40, /*15 7000.0*/+32.67},
{/*8 engineLoad=53.33*/ /*0 800.0*/+13.40, /*1 1213.0*/+14.66, /*2 1626.0*/+15.92, /*3 2040.0*/+17.19, /*4 2453.0*/+18.45, /*5 2866.0*/+19.71, /*6 3280.0*/+20.97, /*7 3693.0*/+22.24, /*8 4106.0*/+23.50, /*9 4520.0*/+24.76, /*10 4933.0*/+26.02, /*11 5346.0*/+27.28, /*12 5760.0*/+28.55, /*13 6173.0*/+29.81, /*14 6586.0*/+31.07, /*15 7000.0*/+32.33},
{/*9 engineLoad=60.00*/ /*0 800.0*/+13.20, /*1 1213.0*/+14.45, /*2 1626.0*/+15.71, /*3 2040.0*/+16.96, /*4 2453.0*/+18.21, /*5 2866.0*/+19.47, /*6 3280.0*/+20.72, /*7 3693.0*/+21.97, /*8 4106.0*/+23.23, /*9 4520.0*/+24.48, /*10 4933.0*/+25.73, /*11 5346.0*/+26.99, /*12 5760.0*/+28.24, /*13 6173.0*/+29.49, /*14 6586.0*/+30.75, /*15 7000.0*/+32.00},
{/*10 engineLoad=66.66*/ /*0 800.0*/+13.00, /*1 1213.0*/+14.24, /*2 1626.0*/+15.49, /*3 2040.0*/+16.73, /*4 2453.0*/+17.98, /*5 2866.0*/+19.22, /*6 3280.0*/+20.47, /*7 3693.0*/+21.71, /*8 4106.0*/+22.96, /*9 4520.0*/+24.20, /*10 4933.0*/+25.44, /*11 5346.0*/+26.69, /*12 5760.0*/+27.93, /*13 6173.0*/+29.18, /*14 6586.0*/+30.42, /*15 7000.0*/+31.67},
{/*11 engineLoad=73.33*/ /*0 800.0*/+12.80, /*1 1213.0*/+14.04, /*2 1626.0*/+15.27, /*3 2040.0*/+16.51, /*4 2453.0*/+17.74, /*5 2866.0*/+18.98, /*6 3280.0*/+20.21, /*7 3693.0*/+21.45, /*8 4106.0*/+22.68, /*9 4520.0*/+23.92, /*10 4933.0*/+25.16, /*11 5346.0*/+26.39, /*12 5760.0*/+27.63, /*13 6173.0*/+28.86, /*14 6586.0*/+30.10, /*15 7000.0*/+31.33},
{/*12 engineLoad=80.00*/ /*0 800.0*/+12.60, /*1 1213.0*/+13.83, /*2 1626.0*/+15.05, /*3 2040.0*/+16.28, /*4 2453.0*/+17.51, /*5 2866.0*/+18.73, /*6 3280.0*/+19.96, /*7 3693.0*/+21.19, /*8 4106.0*/+22.41, /*9 4520.0*/+23.64, /*10 4933.0*/+24.87, /*11 5346.0*/+26.09, /*12 5760.0*/+27.32, /*13 6173.0*/+28.55, /*14 6586.0*/+29.77, /*15 7000.0*/+31.00},
{/*13 engineLoad=86.66*/ /*0 800.0*/+12.40, /*1 1213.0*/+13.62, /*2 1626.0*/+14.84, /*3 2040.0*/+16.05, /*4 2453.0*/+17.27, /*5 2866.0*/+18.49, /*6 3280.0*/+19.71, /*7 3693.0*/+20.92, /*8 4106.0*/+22.14, /*9 4520.0*/+23.36, /*10 4933.0*/+24.58, /*11 5346.0*/+25.80, /*12 5760.0*/+27.01, /*13 6173.0*/+28.23, /*14 6586.0*/+29.45, /*15 7000.0*/+30.67},
{/*14 engineLoad=93.33*/ /*0 800.0*/+12.20, /*1 1213.0*/+13.41, /*2 1626.0*/+14.62, /*3 2040.0*/+15.83, /*4 2453.0*/+17.04, /*5 2866.0*/+18.24, /*6 3280.0*/+19.45, /*7 3693.0*/+20.66, /*8 4106.0*/+21.87, /*9 4520.0*/+23.08, /*10 4933.0*/+24.29, /*11 5346.0*/+25.50, /*12 5760.0*/+26.71, /*13 6173.0*/+27.92, /*14 6586.0*/+29.12, /*15 7000.0*/+30.33},
{/*15 engineLoad=100.00*/ /*0 800.0*/+12.00, /*1 1213.0*/+13.20, /*2 1626.0*/+14.40, /*3 2040.0*/+15.60, /*4 2453.0*/+16.80, /*5 2866.0*/+18.00, /*6 3280.0*/+19.20, /*7 3693.0*/+20.40, /*8 4106.0*/+21.60, /*9 4520.0*/+22.80, /*10 4933.0*/+24.00, /*11 5346.0*/+25.20, /*12 5760.0*/+26.40, /*13 6173.0*/+27.60, /*14 6586.0*/+28.80, /*15 7000.0*/+30.00}
};
//static const float rpmSteps[16] = {400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3600, 4000, 4400, 4800, 5200, 5600, 6000, 6400};
//static const float mapSteps[16] = {25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100};
EXTERN_ENGINE;
void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->engineType = CITROEN_TU3JP;
/**
* Base engine setting
*/
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
engineConfiguration->globalTriggerAngleOffset = 114;
engineConfiguration->specs.cylindersCount = 4;
engineConfiguration->specs.displacement = 1.360;
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
engineConfiguration->injectionMode = IM_BATCH;
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
engineConfiguration->rpmHardLimit = 5000;
engineConfiguration->cranking.rpm = 600;
// memcpy(config->ve2RpmBins, rpmSteps, sizeof(rpmSteps));
/**
* Cranking fuel setting
* TODO: they recomend using something like -40C for low point and +80C for high point
*/
engineConfiguration->cranking.baseFuel = 15;
/**
* Algorithm Alpha-N setting
*/
setAlgorithm(LM_ALPHA_N PASS_ENGINE_PARAMETER);
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER);
setTimingRpmBin(800, 7000 PASS_ENGINE_PARAMETER);
/**
* Outputs
*/
// Frankenstein lo-side output #1: PC14 Igniter 1-4
// Frankenstein lo-side output #2: PC15 Igniter 2-3
// Frankenstein lo-side output #3: PE6 Injector 1-4
// Frankenstein lo-side output #4: PC13 Injector 2-3
// Frankenstein lo-side output #5: PE4
// Frankenstein lo-side output #6: PE5
// Frankenstein lo-side output #7: PE2
// Frankenstein lo-side output #8: PE3
// Frankenstein lo-side output #9: PE0 Fan
// Frankenstein lo-side output #10: PE1 MIL
// Frankenstein lo-side output #11: PB8 Main relay
// Frankenstein lo-side output #12: PB9 Fuel pump
boardConfiguration->ignitionPins[0] = GPIOC_14;
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIOC_15;
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
engineConfiguration->injector.flow = 137; //SIEMENS DEKA VAZ20734
boardConfiguration->injectionPins[0] = GPIOE_6;
boardConfiguration->injectionPins[1] = GPIOC_13;
boardConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
boardConfiguration->fanPin = GPIOE_0;
boardConfiguration->fanPinMode = OM_DEFAULT;
boardConfiguration->malfunctionIndicatorPin = GPIOE_1;
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
boardConfiguration->mainRelayPin = GPIOB_8;
boardConfiguration->fuelPumpPin = GPIOB_9;
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
setLCD(boardConfiguration);
// boardConfiguration->o2heaterPin = GPIOC_13;
// boardConfiguration->logicAnalyzerPins[1] = GPIO_UNASSIGNED;
/**
* Inputs
*/
// See https://docs.google.com/spreadsheet/ccc?key=0Arl1FeMZcfisdEdGdUlHdWh6cVBoSzFIbkxqa1QtZ3c
// Frankenstein analog input #1: PA1 adc1 MAP
// Frankenstein analog input #2: PA3 adc3 TPS
// Frankenstein analog input #3: PC3 adc13 IAT
// Frankenstein analog input #4: PC1 adc11 CLT
// Frankenstein analog input #5: PA0 adc0 vBatt
// Frankenstein analog input #6: PC2 adc12 WBO
// Frankenstein analog input #7: PA4 adc4
// Frankenstein analog input #8: PA2 adc2
// Frankenstein analog input #9: PA6 adc6
// Frankenstein analog input #10: PA7 adc7
// Frankenstein analog input #11: PC4 adc14
// Frankenstein analog input #12: PC5|PA8 adc15 Speed Sensor
/**
* MAP <BOSCH 0 261 230 057>
*/
engineConfiguration->map.sensor.hwChannel = EFI_ADC_1;
engineConfiguration->map.sensor.type = MT_CUSTOM;
engineConfiguration->map.sensor.valueAt0 = 10;
engineConfiguration->map.sensor.valueAt5 = 110;
/**
* TPS <MAGNETI MARELLI>
*/
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
engineConfiguration->tpsMin = 108; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsMax = 812; // convert 12to10 bit (ADC/4)
/**
* IAT <OEM ECU>
*/
engineConfiguration->iat.adcChannel = EFI_ADC_13;
setThermistorConfiguration(&engineConfiguration->iat, -20.0, 15600.0, 23.0, 2250.0, 92.0, 240.0);
engineConfiguration->iat.config.bias_resistor = 2660;
/**
* CLT <LADA Samara>
*/
engineConfiguration->clt.adcChannel = EFI_ADC_11;
setThermistorConfiguration(&engineConfiguration->clt, -20.0, 28680.0, 25.0, 2796.0, 100.0, 177.0);
engineConfiguration->iat.config.bias_resistor = 2660;
/**
* vBatt
*/
engineConfiguration->vbattAdcChannel = EFI_ADC_0;
engineConfiguration->vbattDividerCoeff = ((float) (2.6 + 10.1)) / 2.6 * 2;
/**
* WBO Innovate LC-1
*/
engineConfiguration->afr.hwChannel = EFI_ADC_12;
/**
* Speed Sensor
*/
boardConfiguration->vehicleSpeedSensorInputPin = GPIOA_8;
engineConfiguration->hasVehicleSpeedSensor = true;
/**
* Other
*/
// engineConfiguration->mafAdcChannel = GPIO_UNASSIGNED;
copyFuelTable(tps_fuel_table, config->fuelTable);
copyTimingTable(tps_advance_table, config->ignitionTable);
}

View File

@ -1,15 +0,0 @@
/**
* @file citroenBerlingoTU3JP.h
*
* @date Apr 15, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef CITROENBERLINGOTU3JP_H_
#define CITROENBERLINGOTU3JP_H_
#include "engine.h"
void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_F);
#endif /* CITROENBERLINGOTU3JP_H_ */

View File

@ -1,114 +0,0 @@
/**
* @file custom_engine.cpp
*
* @date Jan 18, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef CONFIG_ENGINES_CUSTOM_ENGINE_CPP_
#define CONFIG_ENGINES_CUSTOM_ENGINE_CPP_
#include "custom_engine.h"
#include "honda_accord.h"
#include "allsensors.h"
EXTERN_ENGINE;
void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->trigger.type = TT_ONE_PLUS_ONE;
setFrankenso_01_LCD(boardConfiguration);
setFrankenso0_1_joystick(engineConfiguration);
/**
* Frankenso analog #1 PC2 ADC12 CLT
* Frankenso analog #2 PC1 ADC11 IAT
* Frankenso analog #3 PA0 ADC0 MAP
* Frankenso analog #4 PC3 ADC13 WBO / O2
* Frankenso analog #5 PA2 ADC2 TPS
* Frankenso analog #6 PA1 ADC1
* Frankenso analog #7 PA4 ADC4
* Frankenso analog #8 PA3 ADC3
* Frankenso analog #9 PA7 ADC7
* Frankenso analog #10 PA6 ADC6
* Frankenso analog #11 PC5 ADC15
* Frankenso analog #12 PC4 ADC14 VBatt
*/
engineConfiguration->tpsAdcChannel = EFI_ADC_2;
engineConfiguration->map.sensor.hwChannel = EFI_ADC_0;
engineConfiguration->clt.adcChannel = EFI_ADC_12;
engineConfiguration->iat.adcChannel = EFI_ADC_11;
engineConfiguration->afr.hwChannel = EFI_ADC_13;
setCommonNTCSensor(&engineConfiguration->clt);
engineConfiguration->clt.config.bias_resistor = 2700;
setCommonNTCSensor(&engineConfiguration->iat);
engineConfiguration->iat.config.bias_resistor = 2700;
/**
* http://rusefi.com/wiki/index.php?title=Manual:Hardware_Frankenso_board
*/
// Frankenso low out #1: PE6
// Frankenso low out #2: PE5
// Frankenso low out #3: PD7 Main Relay
// Frankenso low out #4: PC13 Idle valve solenoid
// Frankenso low out #5: PE3
// Frankenso low out #6: PE4 fuel pump relay
// Frankenso low out #7: PE1 (do not use with discovery!)
// Frankenso low out #8: PE2 injector #2
// Frankenso low out #9: PB9 injector #1
// Frankenso low out #10: PE0 (do not use with discovery!)
// Frankenso low out #11: PB8 injector #3
// Frankenso low out #12: PB7 injector #4
boardConfiguration->fuelPumpPin = GPIOE_4;
boardConfiguration->mainRelayPin = GPIOD_7;
boardConfiguration->idle.solenoidPin = GPIOC_13;
boardConfiguration->fanPin = GPIOE_5;
boardConfiguration->injectionPins[0] = GPIOB_9; // #1
boardConfiguration->injectionPins[1] = GPIOE_2; // #2
boardConfiguration->injectionPins[2] = GPIOB_8; // #3
boardConfiguration->injectionPins[3] = GPIOB_7; // #4
#if EFI_PWM_TESTER
boardConfiguration->injectionPins[4] = GPIOC_8; // #5
boardConfiguration->injectionPins[5] = GPIOD_10; // #6
boardConfiguration->injectionPins[6] = GPIOD_9;
boardConfiguration->injectionPins[7] = GPIOD_11;
boardConfiguration->injectionPins[8] = GPIOD_0;
boardConfiguration->injectionPins[9] = GPIOB_11;
boardConfiguration->injectionPins[10] = GPIOC_7;
boardConfiguration->injectionPins[11] = GPIOE_4;
/**
* We want to initialize all outputs for test
*/
engineConfiguration->specs.cylindersCount = 12;
engineConfiguration->displayMode = DM_NONE;
#else
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[6] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[7] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[8] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[9] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[10] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[11] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[0] = GPIOE_14;
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED; // todo: update this value
boardConfiguration->ignitionPins[2] = GPIOC_7;
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED; // todo: update this value
#endif
// todo: 8.2 or 10k?
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
}
#endif /* CONFIG_ENGINES_CUSTOM_ENGINE_CPP_ */

View File

@ -1,14 +0,0 @@
/**
* @file custom_engine.h
*
* @date Jan 18, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef CONFIG_ENGINES_CUSTOM_ENGINE_H_
#define CONFIG_ENGINES_CUSTOM_ENGINE_H_
#include "engine.h"
void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
#endif /* CONFIG_ENGINES_CUSTOM_ENGINE_H_ */

View File

@ -1,439 +0,0 @@
/**
* @file dodge_neon.cpp
*
* DODGE_NEON_1995 = 2
*
* DODGE_NEON_2003 = 23
* set_engine_type 23
*
* This config overrides some values of the default configuration which is set by setDefaultConfiguration() method
*
* @date Dec 16, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#if EFI_SUPPORT_DODGE_NEON || defined(__DOXYGEN__)
#include "dodge_neon.h"
#include "engine_configuration.h"
#include "thermistors.h"
#include "engine_math.h"
#include "fsio_impl.h"
#include "allsensors.h"
#if EFI_PROD_CODE
#include "HIP9011.h"
#endif
// setFrankenso_01_LCD
#include "honda_accord.h"
#define xxxxx 12
static const fuel_table_t alphaNfuel = {
{/*0 engineLoad=0.00*/ /*0 800.0*/003.7, /*1 1213.0*/003.6, /*2 1626.0*/003.6, /*3 2040.0*/004.0, /*4 2453.0*/004.0, /*5 2866.0*/004.0, /*6 3280.0*/006.0, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*1 engineLoad=6.66*/ /*0 800.0*/004.0, /*1 1213.0*/004.0, /*2 1626.0*/004.0, /*3 2040.0*/005.0, /*4 2453.0*/004.5, /*5 2866.0*/004.5, /*6 3280.0*/005.0, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*2 engineLoad=13.33*/ /*0 800.0*/005.0, /*1 1213.0*/005.0, /*2 1626.0*/006.0, /*3 2040.0*/007.0, /*4 2453.0*/004.5, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*3 engineLoad=20.00*/ /*0 800.0*/006.0, /*1 1213.0*/007.0, /*2 1626.0*/007.0, /*3 2040.0*/007.0, /*4 2453.0*/005.0, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*4 engineLoad=26.66*/ /*0 800.0*/007.0, /*1 1213.0*/008.0, /*2 1626.0*/008.0, /*3 2040.0*/008.0, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*5 engineLoad=33.33*/ /*0 800.0*/xxxxx, /*1 1213.0*/xxxxx, /*2 1626.0*/xxxxx, /*3 2040.0*/xxxxx, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*6 engineLoad=40.00*/ /*0 800.0*/xxxxx, /*1 1213.0*/xxxxx, /*2 1626.0*/xxxxx, /*3 2040.0*/xxxxx, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*7 engineLoad=46.66*/ /*0 800.0*/xxxxx, /*1 1213.0*/xxxxx, /*2 1626.0*/xxxxx, /*3 2040.0*/xxxxx, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*8 engineLoad=53.33*/ /*0 800.0*/xxxxx, /*1 1213.0*/xxxxx, /*2 1626.0*/xxxxx, /*3 2040.0*/xxxxx, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*9 engineLoad=60.00*/ /*0 800.0*/xxxxx, /*1 1213.0*/xxxxx, /*2 1626.0*/xxxxx, /*3 2040.0*/xxxxx, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*10 engineLoad=66.66*/ /*0 800.0*/xxxxx, /*1 1213.0*/xxxxx, /*2 1626.0*/xxxxx, /*3 2040.0*/xxxxx, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*11 engineLoad=73.33*/ /*0 800.0*/xxxxx, /*1 1213.0*/xxxxx, /*2 1626.0*/xxxxx, /*3 2040.0*/xxxxx, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*12 engineLoad=80.00*/ /*0 800.0*/xxxxx, /*1 1213.0*/xxxxx, /*2 1626.0*/xxxxx, /*3 2040.0*/xxxxx, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*13 engineLoad=86.66*/ /*0 800.0*/xxxxx, /*1 1213.0*/xxxxx, /*2 1626.0*/xxxxx, /*3 2040.0*/xxxxx, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*14 engineLoad=93.33*/ /*0 800.0*/xxxxx, /*1 1213.0*/xxxxx, /*2 1626.0*/xxxxx, /*3 2040.0*/xxxxx, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx},
{/*15 engineLoad=100.00*/ /*0 800.0*/xxxxx, /*1 1213.0*/xxxxx, /*2 1626.0*/xxxxx, /*3 2040.0*/xxxxx, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx}
};
//static const ignition_table_t fromDyno = {
// {/* 0 0.000 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 1 6.660 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 2 13.330 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 3 20.000 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 4 26.660 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 5 33.330 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 6 40.000 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 7 46.660 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 8 53.330 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 9 60.000 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 10 66.660 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 11 73.330 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 12 80.000 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 13 86.660 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 14 93.330 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
// {/* 15 100.000 *//* 0 800.0*/12.000, /* 1 1213.3281*/12.000, /* 2 1626.6562*/12.000, /* 3 2040.0*/26.000, /* 4 2453.3438*/29.000, /* 5 2866.6562*/31.000, /* 6 3280.0*/31.000, /* 7 3693.3438*/38.000, /* 8 4106.6875*/40.000, /* 9 4520.0*/40.000, /* 10 4933.3125*/40.000, /* 11 5346.6875*/42.000, /* 12 5760.0*/42.000, /* 13 6173.3125*/42.000, /* 14 6586.6875*/42.000, /* 15 7000.0*/42.000, },
//};
static const ignition_table_t fromODB = {
/* Generated by OBD2C on Tue Jun 30 18:47:52 EDT 2015*/
{/* 0 0.000 *//* 0 800.0*/10.000, /* 1 1213.0*/22.000, /* 2 1626.0*/22.000, /* 3 2040.0*/22.000, /* 4 2453.0*/24.000, /* 5 2866.0*/22.000, /* 6 3280.0*/23.000, /* 7 3693.0*/23.000, /* 8 4106.0*/22.000, /* 9 4520.0*/22.000, /* 10 4933.0*/22.000, /* 11 5346.0*/32.000, /* 12 5760.0*/22.000, /* 13 6173.0*/22.000, /* 14 6586.0*/20.000, /* 15 7000.0*/20.000, },
{/* 1 6.667 *//* 0 800.0*/10.000, /* 1 1213.0*/22.000, /* 2 1626.0*/22.000, /* 3 2040.0*/22.000, /* 4 2453.0*/24.000, /* 5 2866.0*/22.000, /* 6 3280.0*/22.500, /* 7 3693.0*/22.500, /* 8 4106.0*/22.500, /* 9 4520.0*/22.500, /* 10 4933.0*/22.500, /* 11 5346.0*/32.000, /* 12 5760.0*/22.500, /* 13 6173.0*/22.000, /* 14 6586.0*/20.000, /* 15 7000.0*/20.000, },
{/* 2 13.333 *//* 0 800.0*/10.000, /* 1 1213.0*/220.000, /* 2 1626.0*/22.500, /* 3 2040.0*/22.861, /* 4 2453.0*/24.243, /* 5 2866.0*/22.806, /* 6 3280.0*/24.270, /* 7 3693.0*/23.280, /* 8 4106.0*/21.143, /* 9 4520.0*/19.857, /* 10 4933.0*/18.000, /* 11 5346.0*/32.667, /* 12 5760.0*/22.500, /* 13 6173.0*/22.500, /* 14 6586.0*/22.500, /* 15 7000.0*/20.000, },
{/* 3 20.000 *//* 0 800.0*/10.000, /* 1 1213.0*/22.897, /* 2 1626.0*/21.810, /* 3 2040.0*/21.643, /* 4 2453.0*/22.500, /* 5 2866.0*/19.400, /* 6 3280.0*/13.750, /* 7 3693.0*/26.000, /* 8 4106.0*/35.000, /* 9 4520.0*/41.214, /* 10 4933.0*/45.125, /* 11 5346.0*/52.750, /* 12 5760.0*/51.000, /* 13 6173.0*/43.000, /* 14 6586.0*/40.000, /* 15 7000.0*/40.000, },
{/* 4 26.667 *//* 0 800.0*/11.912, /* 1 1213.0*/17.390, /* 2 1626.0*/26.200, /* 3 2040.0*/32.950, /* 4 2453.0*/35.111, /* 5 2866.0*/40.000, /* 6 3280.0*/49.711, /* 7 3693.0*/45.273, /* 8 4106.0*/43.500, /* 9 4520.0*/49.000, /* 10 4933.0*/46.176, /* 11 5346.0*/52.500, /* 12 5760.0*/45.500, /* 13 6173.0*/50.333, /* 14 6586.0*/40.000, /* 15 7000.0*/40.000, },
{/* 5 33.333 *//* 0 800.0*/7.373, /* 1 1213.0*/17.786, /* 2 1626.0*/26.923, /* 3 2040.0*/39.900, /* 4 2453.0*/29.500, /* 5 2866.0*/49.306, /* 6 3280.0*/49.861, /* 7 3693.0*/43.056, /* 8 4106.0*/44.708, /* 9 4520.0*/45.800, /* 10 4933.0*/43.375, /* 11 5346.0*/52.000, /* 12 5760.0*/48.667, /* 13 6173.0*/50.000, /* 14 6586.0*/40.000, /* 15 7000.0*/40.000, },
{/* 6 40.000 *//* 0 800.0*/8.224, /* 1 1213.0*/19.667, /* 2 1626.0*/35.318, /* 3 2040.0*/35.846, /* 4 2453.0*/39.857, /* 5 2866.0*/40.250, /* 6 3280.0*/43.000, /* 7 3693.0*/37.750, /* 8 4106.0*/42.250, /* 9 4520.0*/36.167, /* 10 4933.0*/43.000, /* 11 5346.0*/44.250, /* 12 5760.0*/47.500, /* 13 6173.0*/49.000, /* 14 6586.0*/40.000, /* 15 7000.0*/40.000, },
{/* 7 46.667 *//* 0 800.0*/8.930, /* 1 1213.0*/26.429, /* 2 1626.0*/30.750, /* 3 2040.0*/35.700, /* 4 2453.0*/41.000, /* 5 2866.0*/32.667, /* 6 3280.0*/30.500, /* 7 3693.0*/39.500, /* 8 4106.0*/38.000, /* 9 4520.0*/30.167, /* 10 4933.0*/41.583, /* 11 5346.0*/44.000, /* 12 5760.0*/45.500, /* 13 6173.0*/49.000, /* 14 6586.0*/49.000, /* 15 7000.0*/40.000, },
{/* 8 53.333 *//* 0 800.0*/7.568, /* 1 1213.0*/28.611, /* 2 1626.0*/29.850, /* 3 2040.0*/32.667, /* 4 2453.0*/27.333, /* 5 2866.0*/26.500, /* 6 3280.0*/43.000, /* 7 3693.0*/29.250, /* 8 4106.0*/39.400, /* 9 4520.0*/39.500, /* 10 4933.0*/41.000, /* 11 5346.0*/37.667, /* 12 5760.0*/42.750, /* 13 6173.0*/45.500, /* 14 6586.0*/46.500, /* 15 7000.0*/40.000, },
{/* 9 60.000 *//* 0 800.0*/7.500, /* 1 1213.0*/18.000, /* 2 1626.0*/23.938, /* 3 2040.0*/30.929, /* 4 2453.0*/24.500, /* 5 2866.0*/23.000, /* 6 3280.0*/39.167, /* 7 3693.0*/32.000, /* 8 4106.0*/29.333, /* 9 4520.0*/30.000, /* 10 4933.0*/40.000, /* 11 5346.0*/37.000, /* 12 5760.0*/40.000, /* 13 6173.0*/43.250, /* 14 6586.0*/40.000, /* 15 7000.0*/40.000, },
{/* 10 66.667 *//* 0 800.0*/8.000, /* 1 1213.0*/17.200, /* 2 1626.0*/23.917, /* 3 2040.0*/25.200, /* 4 2453.0*/23.000, /* 5 2866.0*/18.000, /* 6 3280.0*/34.000, /* 7 3693.0*/30.250, /* 8 4106.0*/28.000, /* 9 4520.0*/31.000, /* 10 4933.0*/38.000, /* 11 5346.0*/37.000, /* 12 5760.0*/40.000, /* 13 6173.0*/42.000, /* 14 6586.0*/43.000, /* 15 7000.0*/51.500, },
{/* 11 73.333 *//* 0 800.0*/15.250, /* 1 1213.0*/13.600, /* 2 1626.0*/15.583, /* 3 2040.0*/23.100, /* 4 2453.0*/21.500, /* 5 2866.0*/25.750, /* 6 3280.0*/29.750, /* 7 3693.0*/31.750, /* 8 4106.0*/28.000, /* 9 4520.0*/31.000, /* 10 4933.0*/38.000, /* 11 5346.0*/35.000, /* 12 5760.0*/40.000, /* 13 6173.0*/41.000, /* 14 6586.0*/30.750, /* 15 7000.0*/40.000, },
{/* 12 80.000 *//* 0 800.0*/12.250, /* 1 1213.0*/7.750, /* 2 1626.0*/16.750, /* 3 2040.0*/18.000, /* 4 2453.0*/25.250, /* 5 2866.0*/25.667, /* 6 3280.0*/27.500, /* 7 3693.0*/28.500, /* 8 4106.0*/24.500, /* 9 4520.0*/25.500, /* 10 4933.0*/36.000, /* 11 5346.0*/32.000, /* 12 5760.0*/37.000, /* 13 6173.0*/38.000, /* 14 6586.0*/37.750, /* 15 7000.0*/40.000, },
{/* 13 86.667 *//* 0 800.0*/4.000, /* 1 1213.0*/-2.750, /* 2 1626.0*/13.833, /* 3 2040.0*/7.500, /* 4 2453.0*/21.000, /* 5 2866.0*/25.000, /* 6 3280.0*/27.500, /* 7 3693.0*/26.000, /* 8 4106.0*/23.000, /* 9 4520.0*/23.000, /* 10 4933.0*/30.000, /* 11 5346.0*/30.000, /* 12 5760.0*/36.000, /* 13 6173.0*/33.000, /* 14 6586.0*/33.000, /* 15 7000.0*/33.000, },
{/* 14 93.333 *//* 0 800.0*/-7.500, /* 1 1213.0*/-1.167, /* 2 1626.0*/7.000, /* 3 2040.0*/11.750, /* 4 2453.0*/31.000, /* 5 2866.0*/18.167, /* 6 3280.0*/23.167, /* 7 3693.0*/23.500, /* 8 4106.0*/20.000, /* 9 4520.0*/25.000, /* 10 4933.0*/25.667, /* 11 5346.0*/28.000, /* 12 5760.0*/30.000, /* 13 6173.0*/30.500, /* 14 6586.0*/33.000, /* 15 7000.0*/33.000, },
{/* 15 100.000 *//* 0 800.0*/-5.714, /* 1 1213.0*/-2.694, /* 2 1626.0*/1.818, /* 3 2040.0*/4.891, /* 4 2453.0*/9.543, /* 5 2866.0*/12.825, /* 6 3280.0*/17.861, /* 7 3693.0*/19.500, /* 8 4106.0*/17.833, /* 9 4520.0*/17.857, /* 10 4933.0*/20.125, /* 11 5346.0*/21.000, /* 12 5760.0*/24.125, /* 13 6173.0*/31.000, /* 14 6586.0*/28.500, /* 15 7000.0*/33.000 }
};
// http://rusefi.com/forum/viewtopic.php?f=3&t=360&start=40
static float dodge_map_advance_table[16][16] = {
{/*0 engineLoad=1.2*//*0 800.0*/-4.498, /*1 1213.0*/-11.905, /*2 1626.0*/-23.418, /*3 2040.0*/-25.357, /*4 2453.0*/-25.441, /*5 2866.0*/-25.468, /*6 3280.0*/-29.425, /*7 3693.0*/-32.713, /*8 4106.0*/-35.556, /*9 4520.0*/-37.594, /*10 4933.0*/-36.165, /*11 5346.0*/-30.578, /*12 5760.0*/-29.145, /*13 6173.0*/-29.065, /*14 6586.0*/-27.071, /*15 7000.0*/-28.282},
{/*1 engineLoad=1.413333*//*0 800.0*/-4.87, /*1 1213.0*/-12.138, /*2 1626.0*/-23.389, /*3 2040.0*/-25.501, /*4 2453.0*/-25.441, /*5 2866.0*/-25.468, /*6 3280.0*/-29.125, /*7 3693.0*/-33.074, /*8 4106.0*/-34.203, /*9 4520.0*/-37.769, /*10 4933.0*/-35.899, /*11 5346.0*/-30.519, /*12 5760.0*/-28.88, /*13 6173.0*/-28.74, /*14 6586.0*/-27.189, /*15 7000.0*/-27.826},
{/*2 engineLoad=1.626666*//*0 800.0*/-4.817, /*1 1213.0*/-12.262, /*2 1626.0*/-23.925, /*3 2040.0*/-25.501, /*4 2453.0*/-25.5, /*5 2866.0*/-25.468, /*6 3280.0*/-29.364, /*7 3693.0*/-33.489, /*8 4106.0*/-34.839, /*9 4520.0*/-37.545, /*10 4933.0*/-35.875, /*11 5346.0*/-30.353, /*12 5760.0*/-29.052, /*13 6173.0*/-28.37, /*14 6586.0*/-27.072, /*15 7000.0*/-26.828},
{/*3 engineLoad=1.839999*//*0 800.0*/-4.537, /*1 1213.0*/-12.421, /*2 1626.0*/-23.214, /*3 2040.0*/-25.394, /*4 2453.0*/-25.412, /*5 2866.0*/-25.485, /*6 3280.0*/-29.425, /*7 3693.0*/-33.427, /*8 4106.0*/-34.091, /*9 4520.0*/-36.887, /*10 4933.0*/-36.047, /*11 5346.0*/-30.079, /*12 5760.0*/-28.453, /*13 6173.0*/-28.074, /*14 6586.0*/-27.189, /*15 7000.0*/-26.641},
{/*4 engineLoad=2.053332*//*0 800.0*/-4.522, /*1 1213.0*/-11.76, /*2 1626.0*/-23.915, /*3 2040.0*/-25.415, /*4 2453.0*/-25.551, /*5 2866.0*/-25.14, /*6 3280.0*/-29.346, /*7 3693.0*/-32.917, /*8 4106.0*/-34.815, /*9 4520.0*/-37.211, /*10 4933.0*/-35.817, /*11 5346.0*/-29.694, /*12 5760.0*/-28.799, /*13 6173.0*/-27.818, /*14 6586.0*/-28.098, /*15 7000.0*/-27.662},
{/*5 engineLoad=2.266665*//*0 800.0*/-4.678, /*1 1213.0*/-11.912, /*2 1626.0*/-23.486, /*3 2040.0*/-25.379, /*4 2453.0*/-25.551, /*5 2866.0*/-25.527, /*6 3280.0*/-29.856, /*7 3693.0*/-33.511, /*8 4106.0*/-34.786, /*9 4520.0*/-37.963, /*10 4933.0*/-35.917, /*11 5346.0*/-31.073, /*12 5760.0*/-28.361, /*13 6173.0*/-28.468, /*14 6586.0*/-27.188, /*15 7000.0*/-26.729},
{/*6 engineLoad=2.479998*//*0 800.0*/-4.517, /*1 1213.0*/-12.029, /*2 1626.0*/-23.477, /*3 2040.0*/-25.455, /*4 2453.0*/-25.382, /*5 2866.0*/-25.898, /*6 3280.0*/-29.147, /*7 3693.0*/-33.578, /*8 4106.0*/-34.12, /*9 4520.0*/-36.279, /*10 4933.0*/-36.432, /*11 5346.0*/-31.362, /*12 5760.0*/-28.084, /*13 6173.0*/-28.463, /*14 6586.0*/-27.691, /*15 7000.0*/-27.83},
{/*7 engineLoad=2.693331*//*0 800.0*/-4.532, /*1 1213.0*/-12.262, /*2 1626.0*/-23.935, /*3 2040.0*/-25.489, /*4 2453.0*/-25.595, /*5 2866.0*/-26.816, /*6 3280.0*/-30.251, /*7 3693.0*/-33.533, /*8 4106.0*/-34.794, /*9 4520.0*/-37.882, /*10 4933.0*/-36.104, /*11 5346.0*/-30.079, /*12 5760.0*/-28.545, /*13 6173.0*/-29.304, /*14 6586.0*/-27.07, /*15 7000.0*/-28.324},
{/*8 engineLoad=2.906664*//*0 800.0*/-4.532, /*1 1213.0*/-12.036, /*2 1626.0*/-23.418, /*3 2040.0*/-25.513, /*4 2453.0*/-25.382, /*5 2866.0*/-25.357, /*6 3280.0*/-29.934, /*7 3693.0*/-33.467, /*8 4106.0*/-34.748, /*9 4520.0*/-37.288, /*10 4933.0*/-36.38, /*11 5346.0*/-29.516, /*12 5760.0*/-28.799, /*13 6173.0*/-28.407, /*14 6586.0*/-26.951, /*15 7000.0*/-28.203},
{/*9 engineLoad=3.119997*//*0 800.0*/-4.532, /*1 1213.0*/-11.978, /*2 1626.0*/-23.73, /*3 2040.0*/-25.501, /*4 2453.0*/-25.624, /*5 2866.0*/-26.328, /*6 3280.0*/-30.015, /*7 3693.0*/-33.187, /*8 4106.0*/-34.881, /*9 4520.0*/-38.044, /*10 4933.0*/-35.81, /*11 5346.0*/-29.843, /*12 5760.0*/-29.306, /*13 6173.0*/-28.997, /*14 6586.0*/-27.109, /*15 7000.0*/-29.339},
{/*10 engineLoad=3.33333*//*0 800.0*/-4.527, /*1 1213.0*/-12.131, /*2 1626.0*/-23.486, /*3 2040.0*/-25.43, /*4 2453.0*/-25.551, /*5 2866.0*/-26.276, /*6 3280.0*/-29.639, /*7 3693.0*/-33.005, /*8 4106.0*/-34.253, /*9 4520.0*/-37.788, /*10 4933.0*/-36.077, /*11 5346.0*/-30.188, /*12 5760.0*/-29.087, /*13 6173.0*/-28.481, /*14 6586.0*/-27.348, /*15 7000.0*/-27.777},
{/*11 engineLoad=3.546663*//*0 800.0*/-4.889, /*1 1213.0*/-12.175, /*2 1626.0*/-23.271, /*3 2040.0*/-25.357, /*4 2453.0*/-25.551, /*5 2866.0*/-25.485, /*6 3280.0*/-29.899, /*7 3693.0*/-32.802, /*8 4106.0*/-34.786, /*9 4520.0*/-38.686, /*10 4933.0*/-35.722, /*11 5346.0*/-31.347, /*12 5760.0*/-28.891, /*13 6173.0*/-28.333, /*14 6586.0*/-27.149, /*15 7000.0*/-27.236},
{/*12 engineLoad=3.759996*//*0 800.0*/-4.537, /*1 1213.0*/-12.073, /*2 1626.0*/-23.896, /*3 2040.0*/-25.525, /*4 2453.0*/-25.595, /*5 2866.0*/-25.451, /*6 3280.0*/-30.428, /*7 3693.0*/-33.714, /*8 4106.0*/-34.08, /*9 4520.0*/-37.526, /*10 4933.0*/-35.817, /*11 5346.0*/-30.733, /*12 5760.0*/-28.718, /*13 6173.0*/-28.518, /*14 6586.0*/-27.518, /*15 7000.0*/-26.561},
{/*13 engineLoad=3.973329*//*0 800.0*/-4.86, /*1 1213.0*/-11.883, /*2 1626.0*/-23.428, /*3 2040.0*/-25.489, /*4 2453.0*/-25.536, /*5 2866.0*/-25.613, /*6 3280.0*/-29.895, /*7 3693.0*/-33.648, /*8 4106.0*/-34.758, /*9 4520.0*/-37.988, /*10 4933.0*/-36.047, /*11 5346.0*/-30.225, /*12 5760.0*/-28.698, /*13 6173.0*/-28.487, /*14 6586.0*/-27.111, /*15 7000.0*/-27.708},
{/*14 engineLoad=4.186662*//*0 800.0*/-4.683, /*1 1213.0*/-11.898, /*2 1626.0*/-23.506, /*3 2040.0*/-25.562, /*4 2453.0*/-25.61, /*5 2866.0*/-25.519, /*6 3280.0*/-29.95, /*7 3693.0*/-33.582, /*8 4106.0*/-34.548, /*9 4520.0*/-36.201, /*10 4933.0*/-35.788, /*11 5346.0*/-30.053, /*12 5760.0*/-28.292, /*13 6173.0*/-28.259, /*14 6586.0*/-27.269, /*15 7000.0*/-26.863},
{/*15 engineLoad=4.3999950000000005*//*0 800.0*/-4.85, /*1 1213.0*/-12.24, /*2 1626.0*/-24.091, /*3 2040.0*/-25.394, /*4 2453.0*/-25.323, /*5 2866.0*/-25.544, /*6 3280.0*/-29.915, /*7 3693.0*/-33.104, /*8 4106.0*/-36.016, /*9 4520.0*/-37.933, /*10 4933.0*/-36.254, /*11 5346.0*/-29.712, /*12 5760.0*/-28.651, /*13 6173.0*/-28.045, /*14 6586.0*/-27.228, /*15 7000.0*/-27.784}
};
static const fuel_table_t veDefaultTable = {
/* Generated by TS2C on Fri Jun 12 20:12:10 EDT 2015*/
{/* 0 0.000 *//* 0 800.0*/65.000, /* 1 1213.3281*/65.000, /* 2 1626.6562*/71.583, /* 3 2040.0*/81.958, /* 4 2453.3438*/72.681, /* 5 2866.6562*/63.117, /* 6 3280.0*/80.958, /* 7 3693.3438*/92.231, /* 8 4106.6875*/84.994, /* 9 4520.0*/79.394, /* 10 4933.3125*/84.473, /* 11 5346.6875*/79.501, /* 12 5760.0*/66.256, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000 },
{/* 1 6.660 *//* 0 800.0*/65.000, /* 1 1213.3281*/68.319, /* 2 1626.6562*/70.066, /* 3 2040.0*/76.505, /* 4 2453.3438*/70.682, /* 5 2866.6562*/61.771, /* 6 3280.0*/69.354, /* 7 3693.3438*/76.628, /* 8 4106.6875*/74.881, /* 9 4520.0*/69.985, /* 10 4933.3125*/67.129, /* 11 5346.6875*/65.000, /* 12 5760.0*/63.548, /* 13 6173.3125*/64.151, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000 },
{/* 2 13.330 *//* 0 800.0*/63.337, /* 1 1213.3281*/63.141, /* 2 1626.6562*/62.413, /* 3 2040.0*/67.463, /* 4 2453.3438*/67.996, /* 5 2866.6562*/64.892, /* 6 3280.0*/73.735, /* 7 3693.3438*/71.103, /* 8 4106.6875*/70.928, /* 9 4520.0*/69.645, /* 10 4933.3125*/66.696, /* 11 5346.6875*/65.000, /* 12 5760.0*/65.000, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 3 20.000 *//* 0 800.0*/64.981, /* 1 1213.3281*/62.534, /* 2 1626.6562*/64.200, /* 3 2040.0*/64.263, /* 4 2453.3438*/67.188, /* 5 2866.6562*/65.203, /* 6 3280.0*/74.144, /* 7 3693.3438*/68.697, /* 8 4106.6875*/67.542, /* 9 4520.0*/64.122, /* 10 4933.3125*/65.000, /* 11 5346.6875*/65.000, /* 12 5760.0*/65.000, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 4 26.660 *//* 0 800.0*/79.456, /* 1 1213.3281*/68.161, /* 2 1626.6562*/65.749, /* 3 2040.0*/65.897, /* 4 2453.3438*/65.729, /* 5 2866.6562*/63.020, /* 6 3280.0*/70.429, /* 7 3693.3438*/68.337, /* 8 4106.6875*/65.632, /* 9 4520.0*/66.161, /* 10 4933.3125*/65.884, /* 11 5346.6875*/65.000, /* 12 5760.0*/65.000, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 5 33.330 *//* 0 800.0*/73.806, /* 1 1213.3281*/69.843, /* 2 1626.6562*/68.664, /* 3 2040.0*/67.639, /* 4 2453.3438*/65.939, /* 5 2866.6562*/64.313, /* 6 3280.0*/67.534, /* 7 3693.3438*/67.136, /* 8 4106.6875*/66.067, /* 9 4520.0*/65.000, /* 10 4933.3125*/67.173, /* 11 5346.6875*/67.919, /* 12 5760.0*/65.000, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 6 40.000 *//* 0 800.0*/75.770, /* 1 1213.3281*/75.383, /* 2 1626.6562*/67.496, /* 3 2040.0*/64.699, /* 4 2453.3438*/66.258, /* 5 2866.6562*/65.045, /* 6 3280.0*/67.375, /* 7 3693.3438*/66.887, /* 8 4106.6875*/67.638, /* 9 4520.0*/65.950, /* 10 4933.3125*/67.792, /* 11 5346.6875*/67.666, /* 12 5760.0*/65.000, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 7 46.660 *//* 0 800.0*/75.436, /* 1 1213.3281*/74.563, /* 2 1626.6562*/69.240, /* 3 2040.0*/65.546, /* 4 2453.3438*/67.013, /* 5 2866.6562*/65.683, /* 6 3280.0*/66.192, /* 7 3693.3438*/67.664, /* 8 4106.6875*/69.391, /* 9 4520.0*/67.002, /* 10 4933.3125*/68.592, /* 11 5346.6875*/66.540, /* 12 5760.0*/65.729, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 8 53.330 *//* 0 800.0*/74.583, /* 1 1213.3281*/73.537, /* 2 1626.6562*/68.734, /* 3 2040.0*/67.995, /* 4 2453.3438*/69.053, /* 5 2866.6562*/66.242, /* 6 3280.0*/67.313, /* 7 3693.3438*/70.623, /* 8 4106.6875*/71.299, /* 9 4520.0*/70.246, /* 10 4933.3125*/69.689, /* 11 5346.6875*/66.708, /* 12 5760.0*/65.529, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 9 60.000 *//* 0 800.0*/68.523, /* 1 1213.3281*/71.390, /* 2 1626.6562*/66.799, /* 3 2040.0*/68.182, /* 4 2453.3438*/71.106, /* 5 2866.6562*/68.484, /* 6 3280.0*/66.322, /* 7 3693.3438*/69.185, /* 8 4106.6875*/70.371, /* 9 4520.0*/69.260, /* 10 4933.3125*/68.101, /* 11 5346.6875*/67.820, /* 12 5760.0*/64.426, /* 13 6173.3125*/62.572, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 10 66.660 *//* 0 800.0*/65.000, /* 1 1213.3281*/65.000, /* 2 1626.6562*/65.000, /* 3 2040.0*/65.000, /* 4 2453.3438*/65.000, /* 5 2866.6562*/65.000, /* 6 3280.0*/65.000, /* 7 3693.3438*/65.588, /* 8 4106.6875*/65.533, /* 9 4520.0*/65.000, /* 10 4933.3125*/64.054, /* 11 5346.6875*/65.000, /* 12 5760.0*/65.000, /* 13 6173.3125*/64.423, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 11 73.330 *//* 0 800.0*/65.000, /* 1 1213.3281*/65.000, /* 2 1626.6562*/65.000, /* 3 2040.0*/65.000, /* 4 2453.3438*/65.000, /* 5 2866.6562*/65.000, /* 6 3280.0*/65.000, /* 7 3693.3438*/65.000, /* 8 4106.6875*/65.000, /* 9 4520.0*/65.000, /* 10 4933.3125*/65.000, /* 11 5346.6875*/65.000, /* 12 5760.0*/65.000, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 12 80.000 *//* 0 800.0*/65.000, /* 1 1213.3281*/65.000, /* 2 1626.6562*/65.000, /* 3 2040.0*/65.000, /* 4 2453.3438*/65.000, /* 5 2866.6562*/65.000, /* 6 3280.0*/65.000, /* 7 3693.3438*/65.000, /* 8 4106.6875*/65.000, /* 9 4520.0*/65.000, /* 10 4933.3125*/65.000, /* 11 5346.6875*/65.000, /* 12 5760.0*/65.000, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 13 86.660 *//* 0 800.0*/65.000, /* 1 1213.3281*/65.000, /* 2 1626.6562*/65.000, /* 3 2040.0*/65.000, /* 4 2453.3438*/65.000, /* 5 2866.6562*/65.000, /* 6 3280.0*/65.000, /* 7 3693.3438*/65.000, /* 8 4106.6875*/65.000, /* 9 4520.0*/65.000, /* 10 4933.3125*/65.000, /* 11 5346.6875*/65.000, /* 12 5760.0*/65.000, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 14 93.330 *//* 0 800.0*/65.000, /* 1 1213.3281*/65.000, /* 2 1626.6562*/65.000, /* 3 2040.0*/65.000, /* 4 2453.3438*/65.000, /* 5 2866.6562*/65.000, /* 6 3280.0*/65.000, /* 7 3693.3438*/65.000, /* 8 4106.6875*/65.000, /* 9 4520.0*/65.000, /* 10 4933.3125*/65.000, /* 11 5346.6875*/65.000, /* 12 5760.0*/65.000, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, },
{/* 15 100.000 *//* 0 800.0*/65.000, /* 1 1213.3281*/65.000, /* 2 1626.6562*/65.000, /* 3 2040.0*/65.000, /* 4 2453.3438*/65.000, /* 5 2866.6562*/65.000, /* 6 3280.0*/65.000, /* 7 3693.3438*/65.000, /* 8 4106.6875*/65.000, /* 9 4520.0*/65.000, /* 10 4933.3125*/65.000, /* 11 5346.6875*/65.000, /* 12 5760.0*/65.000, /* 13 6173.3125*/65.000, /* 14 6586.6875*/65.000, /* 15 7000.0*/65.000, }
};
EXTERN_ENGINE;
void setDodgeNeon1995EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->trigger.type = TT_DODGE_NEON_1995;
engineConfiguration->algorithm = LM_ALPHA_N;
engineConfiguration->hasIatSensor = false;
// set_rpm_hard_limit 4000
engineConfiguration->rpmHardLimit = 4000; // yes, 4k. let's play it safe for now
// set_cranking_rpm 550
engineConfiguration->cranking.rpm = 550;
// set_cranking_fuel 5
engineConfiguration->cranking.baseFuel = 5;
// todo: finish implementation for 'useRiseEdge'
// engineConfiguration->useOnlyFrontForTrigger = true;
/**
* that's 1995 config
*/
// set_whole_fuel_map 9
setWholeFuelMap(9 PASS_ENGINE_PARAMETER);
setWholeTimingTable(12 PASS_ENGINE_PARAMETER);
// set_cranking_injection_mode 0
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
// set_injection_mode 1
engineConfiguration->injectionMode = IM_SEQUENTIAL;
// set_ignition_mode 2
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
// set_firing_order 2
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
// set_global_trigger_offset_angle 497
engineConfiguration->globalTriggerAngleOffset = 497;
// set_ignition_offset 350
engineConfiguration->ignitionOffset = 350;
// set_injection_offset 510
engineConfiguration->injectionOffset = 510 + 497;
/**
* that's 1995 config
*/
// set_cranking_charge_angle 70
engineConfiguration->crankingChargeAngle = 70;
// set_cranking_timing_angle 0
engineConfiguration->crankingTimingAngle = 0;
// Frankenstein: low side - out #1: PC14
// Frankenstein: low side - out #2: PC15
// Frankenstein: low side - out #3: PE6
// Frankenstein: low side - out #4: PC13
// Frankenstein: low side - out #5: PE4
// Frankenstein: low side - out #6: PE5
// Frankenstein: low side - out #7: PE2
// Frankenstein: low side - out #8: PE3
// Frankenstein: low side - out #9: PE0
// Frankenstein: low side - out #10: PE1
// Frankenstein: low side - out #11: PB8
// Frankenstein: low side - out #12: PB9
boardConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
boardConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
boardConfiguration->injectionPins[2] = GPIOE_3; // Frankenstein: low side - out #8
boardConfiguration->injectionPins[3] = GPIOE_5; // Frankenstein: low side - out #6
boardConfiguration->fuelPumpPin = GPIOC_13; // Frankenstein: low side - out #4
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
// set_injection_pin_mode 0
boardConfiguration->injectionPinMode = OM_DEFAULT;
// Frankenstein: high side #1: PE8
// Frankenstein: high side #2: PE10
boardConfiguration->ignitionPins[0] = GPIOE_8; // Frankenstein: high side #1
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIOE_10; // // Frankenstein: high side #2
// set_ignition_pin_mode 0
boardConfiguration->ignitionPinMode = OM_DEFAULT;
setThermistorConfiguration(&engineConfiguration->clt, 0, 32500, 30, 7550, 100, 700);
engineConfiguration->clt.config.bias_resistor = 2700;
engineConfiguration->sensorChartFrequency = 7;
}
void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->trigger.type = TT_DODGE_NEON_2003;
setFrankenso_01_LCD(boardConfiguration);
setFrankenso0_1_joystick(engineConfiguration);
// set_whole_timing_map 10
// set_global_trigger_offset_angle 38
engineConfiguration->globalTriggerAngleOffset = 38;
// set_injection_offset 0
engineConfiguration->injectionOffset = 0;
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
engineConfiguration->injectionMode = IM_SEQUENTIAL;
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
engineConfiguration->specs.displacement = 1.996;
engineConfiguration->specs.cylindersCount = 4;
/**
* that's NGC config
*
* set_cranking_fuel 5
*/
engineConfiguration->cranking.baseFuel = 5;
/**
* 77C
* 1200 rpm
* fuel 3
*
* 88C
* fuel 2.8
*
* set_whole_fuel_map 12
*/
//setWholeFuelMap(12 PASS_ENGINE_PARAMETER);
copyFuelTable(alphaNfuel, config->fuelTable);
//setWholeTimingTable(12 PASS_ENGINE_PARAMETER);
copyTimingTable(fromODB, config->ignitionTable);
copyFuelTable(veDefaultTable, config->veTable);
// set_cranking_charge_angle 70
engineConfiguration->crankingChargeAngle = 70;
// set_cranking_timing_angle 710
engineConfiguration->crankingTimingAngle = -710;
/**
* bosch 4G1139
* http://forum.2gn.org/viewtopic.php?t=21657
*/
engineConfiguration->injector.flow = 199;
// I want to start with a simple Alpha-N
engineConfiguration->algorithm = LM_ALPHA_N;
// engineConfiguration->algorithm = LM_SPEED_DENSITY;
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
setTimingLoadBin(0, 100 PASS_ENGINE_PARAMETER);
boardConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
/**
* PA4 Wideband O2 Sensor
*/
engineConfiguration->afr.hwChannel = EFI_ADC_4;
commonFrankensoAnalogInputs(engineConfiguration);
engineConfiguration->vbattDividerCoeff = ((float) (8.2 + 33)) / 8.2 * 2;
/**
* http://rusefi.com/wiki/index.php?title=Manual:Hardware_Frankenso_board
*/
// Frankenso low out #1: PE6 main relay
// Frankenso low out #2: PE5 alternator field control
// Frankenso low out #3: PD7 coolant fan relay
// Frankenso low out #4: PC13 idle valve solenoid
// Frankenso low out #5: PE3 fuel pump relay
// Frankenso low out #6: PE4
// Frankenso low out #7: PE1 (do not use with discovery!)
// Frankenso low out #8: PE2 injector #3
// Frankenso low out #9: PB9 injector #2
// Frankenso low out #10: PE0 (do not use with discovery!)
// Frankenso low out #11: PB8 injector #1
// Frankenso low out #12: PB7 injector #4
boardConfiguration->fanPin = GPIOD_7;
boardConfiguration->injectionPins[0] = GPIOB_8;
boardConfiguration->injectionPins[1] = GPIOB_9;
boardConfiguration->injectionPins[2] = GPIOE_2;
boardConfiguration->injectionPins[3] = GPIOB_7;
boardConfiguration->ignitionPins[0] = GPIOC_9;
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIOE_8;
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
boardConfiguration->mainRelayPin = GPIOE_6;
boardConfiguration->idle.solenoidPin = GPIOC_13;
boardConfiguration->idle.solenoidFrequency = 300;
boardConfiguration->fuelPumpPin = GPIOE_3;
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
boardConfiguration->triggerInputPins[0] = GPIOA_5;
boardConfiguration->triggerInputPins[1] = GPIOC_6;
/**
* Frankenso analog #1 PC2 ADC12 CLT
* Frankenso analog #2 PC1 ADC11 IAT
* Frankenso analog #3 PA0 ADC0 MAP
* Frankenso analog #4 PC3 ADC13
* Frankenso analog #5 PA2 ADC2 TPS
* Frankenso analog #6 PA1 ADC1
* Frankenso analog #7 PA4 ADC4 WBO AFR
* Frankenso analog #8 PA3 ADC3
* Frankenso analog #9 PA7 ADC7
* Frankenso analog #10 PA6 ADC6
* Frankenso analog #11 PC5 ADC15
* Frankenso analog #12 PC4 ADC14 VBatt
*/
setDodgeSensor(&engineConfiguration->clt);
engineConfiguration->clt.config.bias_resistor = 10000;
setDodgeSensor(&engineConfiguration->iat);
engineConfiguration->iat.config.bias_resistor = 10000;
/**
* MAP PA0
*/
engineConfiguration->map.sensor.hwChannel = EFI_ADC_0; // PA0
/**
* TPS
*/
engineConfiguration->tpsAdcChannel = EFI_ADC_2;
engineConfiguration->tpsMin = 125; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsMax = 625; // convert 12to10 bit (ADC/4)
/**
* IAT D15/W7
*/
engineConfiguration->iat.adcChannel = EFI_ADC_11;
/**
* CLT D13/W9
*/
engineConfiguration->clt.adcChannel = EFI_ADC_12;
boardConfiguration->sensorChartMode = SC_MAP;
boardConfiguration->isFastAdcEnabled = true;
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
#if EFI_HIP_9011 || defined(__DOXYGEN__)
setHip9011FrankensoPinout();
#endif
engineConfiguration->cylinderBore = 87.5;
// boardConfiguration->clutchDownPin = GPIOC_12;
boardConfiguration->clutchDownPinMode = PI_PULLUP;
boardConfiguration->clutchUpPin = GPIOD_3;
boardConfiguration->clutchUpPinMode = PI_PULLUP;
// alt GPIOC_12
/**
* set_fsio_setting 0 0.11
*/
engineConfiguration->bc.fsio_setting[0] = 0.2;
#if EFI_FSIO || defined(__DOXYGEN__)
boardConfiguration->fsio_setting[0] = 0.55;
setFsioExt(0, GPIOE_5, "0 fsio_setting", 400 PASS_ENGINE_PARAMETER);
#endif
boardConfiguration->vehicleSpeedSensorInputPin = GPIOA_8;
engineConfiguration->hasVehicleSpeedSensor = true;
engineConfiguration->fanOnTemperature = 85;
engineConfiguration->fanOffTemperature = 80;
// boardConfiguration->tunerStudioSerialSpeed = 9600;
boardConfiguration->tunerStudioSerialSpeed = 19200;
engineConfiguration->algorithm = LM_SPEED_DENSITY;
boardConfiguration->alternatorControlPin = GPIOD_5;
engineConfiguration->alternatorControlPFactor = 22;
// engineConfiguration->isCanEnabled = true;
boardConfiguration->canTxPin = GPIOB_6;
boardConfiguration->canRxPin = GPIOB_12;
engineConfiguration->canWriteEnabled = true;
engineConfiguration->canReadEnabled = false;
engineConfiguration->canNbcType = CAN_BUS_NBC_BMW;
// engineConfiguration->canNbcType = CAN_BUS_MAZDA_RX8;
engineConfiguration->mapAccelLength = 12;
engineConfiguration->mapAccelEnrichmentThreshold = 5; // kPa
engineConfiguration->mapAccelEnrichmentMultiplier = 0;
engineConfiguration->tpsAccelLength = 12;
engineConfiguration->tpsAccelEnrichmentThreshold = 10;
engineConfiguration->tpsAccelEnrichmentMultiplier = 0.15;
}
#endif /* EFI_SUPPORT_DODGE_NEON */

View File

@ -1,22 +0,0 @@
/**
* @file dodge_neon.h
* @brief 1995 Dodge Neon default engine configuration
*
* @date Dec 16, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef DODGE_NEON_H_
#define DODGE_NEON_H_
#if EFI_SUPPORT_DODGE_NEON
#include "engine.h"
void setDodgeNeon1995EngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
#endif /* EFI_SUPPORT_DODGE_NEON */
#endif /* DODGE_NEON_H_ */

View File

@ -1,91 +0,0 @@
/*
* @file dodge_ram.cpp
*
* set_engine_type 31
*
* @date Apr 22, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#include "dodge_ram.h"
#include "custom_engine.h"
#include "allsensors.h"
EXTERN_ENGINE
;
void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_F) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_F);
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
engineConfiguration->trigger.type = TT_DODGE_RAM;
engineConfiguration->injector.flow = 243.6; // 23.2lb/h
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
engineConfiguration->algorithm = LM_SPEED_DENSITY;
// set_cranking_charge_angle 30
engineConfiguration->crankingChargeAngle = 30;
// set_whole_fuel_map 6
setWholeFuelMap(6 PASS_ENGINE_PARAMETER);
//Base engine setting
engineConfiguration->specs.cylindersCount = 8;
engineConfiguration->specs.firingOrder = FO_1_8_4_3_6_5_7_2;
engineConfiguration->specs.displacement = 5.2;
boardConfiguration->triggerInputPins[0] = GPIOC_6;
boardConfiguration->triggerInputPins[1] = GPIOA_5;
boardConfiguration->injectionPins[0] = GPIOE_2;
boardConfiguration->injectionPins[1] = GPIOB_9;
boardConfiguration->injectionPins[2] = GPIOD_5;
boardConfiguration->injectionPins[3] = GPIOB_8;
boardConfiguration->injectionPins[4] = GPIOB_7;
boardConfiguration->injectionPins[5] = GPIOE_3;
boardConfiguration->injectionPins[6] = GPIOE_4;
boardConfiguration->injectionPins[7] = GPIOD_3;
boardConfiguration->ignitionPins[0] = GPIOC_9;
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
boardConfiguration->mainRelayPin = GPIOE_5;
boardConfiguration->fuelPumpPin = GPIOE_6;
boardConfiguration->fanPin = GPIO_UNASSIGNED;
engineConfiguration->engineChartSize = 450;
// set_cranking_fuel 7
engineConfiguration->cranking.baseFuel = 7;
// set_global_trigger_offset_angle -50
engineConfiguration->globalTriggerAngleOffset = -50;
// set_global_fuel_correction 1
// set_whole_timing_map 10
setWholeTimingTable(10 PASS_ENGINE_PARAMETER);
boardConfiguration->alternatorControlPin = GPIOD_7;
engineConfiguration->alternatorControlPFactor = 22;
boardConfiguration->idle.solenoidPin = GPIOC_13;
boardConfiguration->idle.solenoidFrequency = 300;
engineConfiguration->vbattAdcChannel = EFI_ADC_14;
// engineConfiguration->vbattDividerCoeff = ((float) (8.93 + 41.27)) / 8.93 * 2;
engineConfiguration->vbattDividerCoeff = 9.6;
setDodgeSensor(&engineConfiguration->clt);
engineConfiguration->clt.config.bias_resistor = 2700;
setDodgeSensor(&engineConfiguration->iat);
engineConfiguration->iat.config.bias_resistor = 2700;
boardConfiguration->useStepperIdle = true;
}

View File

@ -1,15 +0,0 @@
/*
* @file dodge_ram.h
*
* @date Apr 22, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef CONFIG_ENGINES_DODGE_RAM_H_
#define CONFIG_ENGINES_DODGE_RAM_H_
#include "engine.h"
void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_F);
#endif /* CONFIG_ENGINES_DODGE_RAM_H_ */

View File

@ -1,31 +0,0 @@
ENGINES_SRC =
ENGINES_SRC_CPP = $(PROJECT_DIR)/config/engines/ford_aspire.cpp \
$(PROJECT_DIR)/config/engines/custom_engine.cpp \
$(PROJECT_DIR)/config/engines/MiniCooperR50.cpp \
$(PROJECT_DIR)/config/engines/acura_rsx.cpp \
$(PROJECT_DIR)/config/engines/audi_aan.cpp \
$(PROJECT_DIR)/config/engines/bmw_e34.cpp \
$(PROJECT_DIR)/config/engines/mazda_miata.cpp \
$(PROJECT_DIR)/config/engines/citroenBerlingoTU3JP.cpp \
$(PROJECT_DIR)/config/engines/dodge_neon.cpp \
$(PROJECT_DIR)/config/engines/ford_fiesta.cpp \
$(PROJECT_DIR)/config/engines/ford_1995_inline_6.cpp \
$(PROJECT_DIR)/config/engines/nissan_primera.cpp \
$(PROJECT_DIR)/config/engines/mazda_miata_nb.cpp \
$(PROJECT_DIR)/config/engines/honda_accord.cpp \
$(PROJECT_DIR)/config/engines/subaru.cpp \
$(PROJECT_DIR)/config/engines/snow_blower.cpp \
$(PROJECT_DIR)/config/engines/GY6_139QMB.cpp \
$(PROJECT_DIR)/config/engines/rover_v8.cpp \
$(PROJECT_DIR)/config/engines/mazda_323.cpp \
$(PROJECT_DIR)/config/engines/mazda_626.cpp \
$(PROJECT_DIR)/config/engines/saturn_ion.cpp \
$(PROJECT_DIR)/config/engines/sachs.cpp \
$(PROJECT_DIR)/config/engines/test_engine.cpp \
$(PROJECT_DIR)/config/engines/mitsubishi.cpp \
$(PROJECT_DIR)/config/engines/gm_2_2.cpp \
$(PROJECT_DIR)/config/engines/dodge_ram.cpp \
$(PROJECT_DIR)/config/engines/vw.cpp

View File

@ -1,109 +0,0 @@
/**
* @file ford_1995_inline_6.cpp
* @brief Default engine configuration for a 1995 Ford inline 6 engine
*
* http://rusefi.com/forum/viewtopic.php?f=3&t=469
*
* This config overrides some values of the default configuration which is set by setDefaultConfiguration() method
*
* FORD_INLINE_6_1995 = 7
* set_engine_type 7
*
* @date Feb 12, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#include "ford_1995_inline_6.h"
#include "engine_math.h"
#include "allsensors.h"
#if EFI_SUPPORT_1995_FORD_INLINE_6 || defined(__DOXYGEN__)
EXTERN_ENGINE;
/**
* @brief Default values for persistent properties
*/
void setFordInline6(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->specs.cylindersCount = 6;
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
engineConfiguration->ignitionMode = IM_ONE_COIL;
engineConfiguration->specs.firingOrder = FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4;
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
engineConfiguration->injectionMode = IM_BATCH;
engineConfiguration->twoWireBatch = true;
/**
* 0.5ms dweel time just to be sure it would fit within camshaft revolution, dwell is not controlled by us anyway
*/
setConstantDwell(0.5 PASS_ENGINE_PARAMETER);
/**
* We treat the trigger as 6/0 toothed wheel
*/
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
engineConfiguration->trigger.customTotalToothCount = 6;
engineConfiguration->trigger.customSkippedToothCount = 0;
engineConfiguration->globalTriggerAngleOffset = 0;
engineConfiguration->ignitionOffset = 13;
engineConfiguration->injectionOffset = 207.269999;
setThermistorConfiguration(&engineConfiguration->clt, -10.0, 160310.0, 60.0, 7700.0, 120.0, 1180.0);
engineConfiguration->clt.config.bias_resistor = 2700;
setThermistorConfiguration(&engineConfiguration->iat, -10.0, 160310.0, 60.0, 7700.0, 120.0, 1180.0);
engineConfiguration->iat.config.bias_resistor = 2700;
// 12ch analog board pinout:
// input channel 3 is PA7, that's ADC7
// input channel 5 is PA4, that's ADC4
// input channel 6 is PA3, that's ADC3
// input channel 7 is PA2, that's ADC2
// input channel 8 is PA1, that's ADC1
// input channel 9 is PA0, that's ADC0
// input channel 10 is PC3, that's ADC13
// input channel 12 is PC1, that's ADC11
engineConfiguration->tpsAdcChannel = EFI_ADC_4;
engineConfiguration->iat.adcChannel = EFI_ADC_2;
engineConfiguration->clt.adcChannel = EFI_ADC_1;
engineConfiguration->afr.hwChannel = EFI_ADC_11;
engineConfiguration->map.sensor.type = MT_MPX4250;
engineConfiguration->map.sensor.hwChannel = EFI_ADC_15;
engineConfiguration->baroSensor.type = MT_MPX4250;
engineConfiguration->baroSensor.hwChannel = EFI_ADC_7;
// 6 channel output board
// output 1 is PB9
// output 3 is PE3
// output 5 is PC13
// output 6 is PC15
boardConfiguration->fuelPumpPin = GPIOC_13;
boardConfiguration->injectionPins[0] = GPIOB_9;
boardConfiguration->injectionPins[1] = GPIOE_3;
boardConfiguration->ignitionPins[0] = GPIOC_15;
boardConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
boardConfiguration->fanPin = GPIO_UNASSIGNED;
engineConfiguration->tpsMin = convertVoltageTo10bitADC(1.250);
engineConfiguration->tpsMax = convertVoltageTo10bitADC(4.538);
// engineConfiguration->vbattAdcChannel = 0; //
engineConfiguration->mafAdcChannel = EFI_ADC_1;
engineConfiguration->hasMafSensor = true;
boardConfiguration->triggerInputPins[0] = GPIOA_8;
boardConfiguration->triggerInputPins[1] = GPIOA_5;
boardConfiguration->logicAnalyzerPins[0] = GPIOC_6;
boardConfiguration->logicAnalyzerPins[1] = GPIOE_5;
}
#endif /* EFI_SUPPORT_1995_FORD_INLINE_6 */

View File

@ -1,15 +0,0 @@
/*
* @file ford_1995_inline_6.h
*
* @date Feb 12, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef FORD_1995_INLINE_6_H_
#define FORD_1995_INLINE_6_H_
#include "engine_configuration.h"
void setFordInline6(DECLARE_ENGINE_PARAMETER_F);
#endif /* FORD_1995_INLINE_6_H_ */

View File

@ -1,153 +0,0 @@
/**
* @file ford_aspire.cpp
* @brief 1996 Ford Aspire default engine configuration
*
* FORD_ASPIRE_1996 = 3
* set_engine_type 3
*
* @date Sep 9, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#include "ford_aspire.h"
#include "allsensors.h"
#include "engine_math.h"
#include "advance_map.h"
#include "engine_configuration.h"
#if EFI_SUPPORT_FORD_ASPIRE || defined(__DOXYGEN__)
/**
* This is just the default map which is stored into flash memory in case flash is empty
* The convenient way to override these default would be to tune this map using TunerStudio software
* with which rusEfi is integrated
*/
static const fuel_table_t default_aspire_fuel_table = {
/* RPM 800.000000 1213.333374 1626.666748 2040.000000 2453.333496 2866.666748 3280.000000 3693.333496 4106.666992 4520.000000 4933.333496 5346.666992 5760.000000 6173.333496 6586.666992 7000.000000*/
/* Load 1.200000 */{ 1.542000, 1.547600, 1.551867, 1.570000, 1.550000, 0.908666, 0.794800, 0.775200, 0.791733, 0.800000, 0.798667, 0.805733, 0.810000, 0.810000, 0.810000, 0.810000},
/* Load 1.413333 */{ 1.532133, 1.565325, 1.551244, 1.552773, 1.546018, 0.802089, 0.810000, 0.788507, 0.808898, 0.744987, 0.701378, 0.711404, 0.744667, 0.810000, 0.810000, 0.810000},
/* Load 1.626667 */{ 1.543600, 1.545573, 1.555956, 1.545973, 1.415333, 0.115288, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000},
/* Load 1.840000 */{ 1.538800, 1.741893, 1.558426, 1.591440, 1.228773, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000},
/* Load 2.053333 */{ 2.322933, 3.439928, 2.818523, 2.242266, 2.125839, 1.194041, 0.488959, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000},
/* Load 2.266667 */{ 7.696667, 5.957510, 4.700978, 3.879200, 3.099600, 2.403111, 2.458666, 1.790979, 2.190533, 2.074667, 1.368887, 1.287556, 0.000000, 0.000000, 0.000000, 0.000000},
/* Load 2.480000 */{ 14.330001, 8.710773, 6.558134, 5.491520, 5.117494, 4.308798, 3.185521, 3.339520, 2.883200, 2.840399, 2.643334, 2.505092, 2.296640, 0.000000, 0.000000, 0.000000},
/* Load 2.693333 */{ 21.354004, 15.415981, 10.953371, 8.779520, 5.866481, 5.038577, 5.113254, 4.395565, 4.537200, 3.559386, 3.828622, 3.147404, 3.377706, 2.780000, 2.780000, 2.780000},
/* Load 2.906667 */{ 20.020401, 16.311201, 17.209972, 15.600482, 10.950183, 7.773465, 6.243252, 7.400613, 6.672044, 6.133946, 5.529999, 4.769466, 4.528134, 4.010000, 4.010000, 4.010000},
/* Load 3.120000 */{ 18.264000, 15.464134, 15.595227, 15.395760, 12.987042, 13.339199, 8.897678, 8.927333, 8.032880, 6.769040, 5.823335, 6.413146, 6.089281, 5.730000, 5.730000, 5.730000},
/* Load 3.333333 */{ 17.414667, 15.366401, 15.187378, 15.338401, 15.306623, 15.386889, 14.470800, 11.941733, 10.985557, 9.956400, 9.019111, 8.441555, 7.515199, 6.900000, 6.900000, 6.900000},
/* Load 3.546667 */{ 17.005333, 15.372302, 15.188160, 15.278268, 15.325876, 15.561645, 15.638906, 15.415441, 13.630393, 10.918774, 11.508314, 10.660010, 9.551816, 9.230000, 9.230000, 9.230000},
/* Load 3.760000 */{ 16.978800, 15.360346, 15.170587, 15.301680, 15.331520, 15.684401, 15.810480, 15.702454, 15.828107, 15.114964, 14.666001, 11.908847, 12.046723, 9.230000, 9.230000, 9.230000},
/* Load 3.973333 */{ 16.975599, 15.343084, 15.305715, 15.287172, 15.288801, 15.484089, 15.928854, 15.780366, 15.669041, 15.836693, 16.123335, 15.054674, 14.972587, 14.610000, 14.610000, 14.610000},
/* Load 4.186667 */{ 16.961868, 15.368391, 15.210348, 15.290641, 15.263707, 15.485778, 15.827333, 15.802435, 15.677885, 15.827120, 15.997155, 16.027468, 15.478480, 15.190000, 15.190000, 15.190000},
/* Load 4.400000 */{ 17.010000, 15.250000, 15.680000, 15.440000, 15.270000, 15.470000, 15.800000, 15.730000, 15.600000, 15.790000, 16.120001, 16.110001, 15.630000, 15.150000, 15.150000, 15.150000}
};
static const ignition_table_t default_aspire_timing_table = {
/* RPM 800.000000 1213.333374 1626.666748 2040.000000 2453.333496 2866.666748 3280.000000 3693.333496 4106.666992 4520.000000 4933.333496 5346.666992 5760.000000 6173.333496 6586.666992 7000.000000*/
/* Load 1.200000 */{ -0.662000, +7.730000, +16.722000, +23.139999, +29.398001, +31.268000, +32.108002, +30.436001, +30.896000, +26.656000, +24.704000, +25.108000, +25.132000, +25.459999, +25.459999, +25.459999},
/* Load 1.413333 */{ -0.546000, +7.662000, +16.882000, +23.482000, +29.520000, +31.323999, +32.108002, +30.656000, +30.468000, +26.879999, +24.746000, +24.742001, +29.032000, +25.562000, +25.562000, +25.562000},
/* Load 1.626667 */{ -0.584000, +7.870000, +16.714001, +23.025999, +29.542000, +31.166000, +32.175999, +30.540001, +30.268000, +26.416000, +24.134001, +25.007999, +24.698000, +26.167999, +26.167999, +26.167999},
/* Load 1.840000 */{ -0.584000, +7.658000, +16.714001, +23.254000, +29.351999, +30.978001, +32.141998, +30.874001, +30.896000, +26.507999, +24.558001, +24.389999, +25.761999, +35.492001, +35.492001, +35.492001},
/* Load 2.053333 */{ -0.584000, +7.862000, +16.538000, +23.254000, +29.232000, +31.296000, +32.520000, +30.142000, +30.388000, +25.903999, +24.370001, +24.082001, +24.792000, +24.351999, +24.351999, +24.351999},
/* Load 2.266667 */{ +1.364000, +7.726000, +16.806000, +23.254000, +29.639999, +31.006001, +32.298000, +30.912001, +29.882000, +26.392000, +24.664000, +27.233999, +25.374001, +25.417999, +25.417999, +25.417999},
/* Load 2.480000 */{ -1.364000, +10.490000, +16.705999, +22.441999, +28.101999, +30.238001, +32.363998, +30.719999, +30.896000, +26.608000, +24.664000, +24.431999, +24.500000, +25.510000, +25.510000, +25.510000},
/* Load 2.693333 */{ -9.864000, +10.416000, +11.680000, +19.150000, +25.754000, +27.936001, +32.554001, +30.656000, +30.153999, +27.184000, +25.252001, +22.812000, +24.452000, +25.219999, +25.219999, +25.219999},
/* Load 2.906667 */{ -9.866000, -5.452000, -2.854000, +17.212000, +17.552000, +20.688000, +25.660000, +27.809999, +27.691999, +27.224001, +25.882000, +25.360001, +26.100000, +27.992001, +27.992001, +27.992001},
/* Load 3.120000 */{ -9.864000, -5.452000, -2.854000, +0.342000, +12.526000, +16.218000, +21.364000, +27.590000, +25.780001, +24.170000, +24.664000, +25.584000, +26.490000, +31.968000, +31.968000, +31.968000},
/* Load 3.333333 */{ -9.864000, -5.516000, -2.854000, +0.226000, +2.738000, +3.816000, +11.924000, +18.808001, +21.038000, +21.538000, +21.209999, +22.228001, +25.046000, +25.156000, +25.156000, +25.156000},
/* Load 3.546667 */{ -9.866000, -5.518000, -2.854000, -0.000000, +3.022000, +3.816000, +6.428000, +7.788000, +19.426001, +20.860001, +19.966000, +21.030001, +21.396000, +21.570000, +21.570000, +21.570000},
/* Load 3.760000 */{ -9.864000, -5.516000, -2.772000, +0.226000, +2.732000, +3.500000, +6.798000, +8.102000, +8.660000, +9.500000, +11.788000, +20.132000, +20.072001, +20.510000, +20.510000, +20.510000},
/* Load 3.973333 */{ -9.864000, -5.518000, -2.854000, -0.000000, +2.880000, +3.816000, +6.420000, +8.320000, +8.426000, +8.532000, +11.470000, +11.442000, +13.610000, +12.022000, +12.022000, +12.022000},
/* Load 4.186667 */{ -9.750000, -5.518000, -2.604000, -0.000000, +2.880000, +3.654000, +6.050000, +6.888000, +8.372000, +9.364000, +11.764000, +11.732000, +11.864000, +12.376000, +12.376000, +12.376000},
/* Load 4.400000 */{ -0.350000, -5.590000, -0.502000, -0.910000, -0.864000, -0.954000, -1.324000, +7.436000, -1.170000, -1.054000, -2.058000, -2.098000, -2.636000, +12.352000, +12.352000, +12.352000}
};
EXTERN_ENGINE;
static void setDefaultAspireMaps(DECLARE_ENGINE_PARAMETER_F) {
setFuelLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER);
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER);
setTimingLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER);
setTimingRpmBin(800, 7000 PASS_ENGINE_PARAMETER);
copyFuelTable(default_aspire_fuel_table, config->fuelTable);
copyTimingTable(default_aspire_timing_table, config->ignitionTable);
}
void setFordAspireEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->tpsMin = 100;
engineConfiguration->tpsMax = 750;
engineConfiguration->rpmHardLimit = 7000;
/**
* 18K Ohm @ -20C
* 2.1K Ohm @ 24C
* 1K Ohm @ 49C
*/
setThermistorConfiguration(&engineConfiguration->clt, -20, 18000, 23.8889, 2100, 48.8889, 1000);
engineConfiguration->clt.config.bias_resistor = 3300; // that's my custom resistor value!
engineConfiguration->cranking.baseFuel = 3;
// engineConfiguration->ignitionPinMode = OM_INVERTED;
engineConfiguration->specs.cylindersCount = 4;
engineConfiguration->specs.displacement = 1.3;
// Denso 195500-2110
engineConfiguration->injector.flow = 119.8;
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
engineConfiguration->globalTriggerAngleOffset = 175;
engineConfiguration->ignitionOffset = 87;
engineConfiguration->injectionOffset = 54 + 360;
setDefaultAspireMaps(PASS_ENGINE_PARAMETER_F);
// set_cranking_rpm 550
engineConfiguration->cranking.rpm = 550;
// set_cranking_charge_angle 70
engineConfiguration->crankingChargeAngle = 70;
// set_cranking_timing_angle 37
engineConfiguration->crankingTimingAngle = -37;
setSingleCoilDwell(engineConfiguration);
engineConfiguration->ignitionMode = IM_ONE_COIL;
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
engineConfiguration->useOnlyFrontForTrigger = true;
engineConfiguration->trigger.type = TT_FORD_ASPIRE;
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
engineConfiguration->HD44780width = 20;
engineConfiguration->HD44780height = 4;
// Frankenstein analog input #1: adc1
// Frankenstein analog input #2: adc3
// Frankenstein analog input #3: adc13
// Frankenstein analog input #4: adc11
// Frankenstein analog input #5: adc
// Frankenstein analog input #6: adc
// Frankenstein analog input #7: adc
// Frankenstein analog input #8: adc
// Frankenstein analog input #9: adc
// Frankenstein analog input #10: adc
// Frankenstein analog input #11: adc
// Frankenstein analog input #12: adc
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
engineConfiguration->vbattAdcChannel = EFI_ADC_0;
engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
engineConfiguration->mafAdcChannel = EFI_ADC_1;
engineConfiguration->clt.adcChannel = EFI_ADC_11;
// engineConfiguration->iat.adcChannel =
engineConfiguration->map.sensor.type = MT_DENSO183;
}
#endif /* EFI_SUPPORT_FORD_ASPIRE */

View File

@ -1,19 +0,0 @@
/**
* @file ford_aspire.h
* @brief 1996 Ford Aspire default engine configuration
*
* @date Aug 30, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*
* http://rusefi.com/forum/viewtopic.php?t=375
*
*/
#ifndef FORD_ASPIRE_H_
#define FORD_ASPIRE_H_
#include "engine.h"
void setFordAspireEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
#endif /* FORD_ASPIRE_H_ */

View File

@ -1,43 +0,0 @@
/**
* @file ford_fiesta.cpp
* @brief European 1990 Ford Fiesta
*
* FORD_FIESTA = 4
* set_engine_type 4
*
* @date Nov 22, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#if EFI_SUPPORT_FORD_FIESTA || defined(__DOXYGEN__)
#include "ford_fiesta.h"
#include "engine_math.h"
EXTERN_ENGINE;
void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->rpmHardLimit = 7000;
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_1;
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
engineConfiguration->hasMafSensor = true;
engineConfiguration->mafAdcChannel = EFI_ADC_14;
// engineConfiguration->mafAdcChannel = EFI_ADC_NONE; this would kill functional tests
// etb testing
// boardConfiguration->clutchUpPin
boardConfiguration->etbControlPin1 = GPIOD_3;
engineConfiguration->pedalPositionChannel = EFI_ADC_1;
engineConfiguration->tpsMin = 337;
engineConfiguration->tpsMax = 896;
}
#endif /* EFI_SUPPORT_FORD_FIESTA */

View File

@ -1,17 +0,0 @@
/**
* @file ford_fiesta.h
*
* @date Nov 22, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef FORD_FIESTA_H_
#define FORD_FIESTA_H_
#if EFI_SUPPORT_FORD_FIESTA || defined(__DOXYGEN__)
#include "engine.h"
void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
#endif /* EFI_SUPPORT_FORD_FIESTA */
#endif /* FORD_FIESTA_H_ */

View File

@ -1,22 +0,0 @@
/*
* @file gm_2_2.cpp
*
* set_engine_type 30
*
* @date Apr 9, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "global.h"
#include "gm_2_2.h"
EXTERN_ENGINE
;
void setGm2_2(DECLARE_ENGINE_PARAMETER_F) {
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
engineConfiguration->trigger.type = TT_ONE_PLUS_TOOTHED_WHEEL_60_2;
boardConfiguration->triggerInputPins[0] = GPIOC_6;
boardConfiguration->triggerInputPins[1] = GPIOA_8;
}

View File

@ -1,15 +0,0 @@
/*
* @file gm_2_2.h
*
* @date Apr 9, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef CONFIG_ENGINES_GM_2_2_H_
#define CONFIG_ENGINES_GM_2_2_H_
#include "engine.h"
void setGm2_2(DECLARE_ENGINE_PARAMETER_F);
#endif /* CONFIG_ENGINES_GM_2_2_H_ */

View File

@ -1,195 +0,0 @@
/**
* @file honda_accord.cpp
*
* 1993 Honda Prelude 1993
* http://rusefi.com/wiki/index.php?title=Vehicle:Honda_Prelude_1993
* http://rusefi.com/forum/viewtopic.php?f=3&t=887
*
* 1995 Honda Accord EX
* http://rusefi.com/wiki/index.php?title=Vehicle:Honda_Accord_1995
* http://rusefi.com/forum/viewtopic.php?f=3&t=621
*
* set_engine_type 6
* set_engine_type 17
*
* @date Jan 12, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#include "trigger_decoder.h"
#include "thermistors.h"
#include "honda_accord.h"
#include "engine_math.h"
#include "settings.h"
void setFrankenso_01_LCD(board_configuration_s *boardConfiguration) {
boardConfiguration->HD44780_rs = GPIOE_7;
boardConfiguration->HD44780_e = GPIOE_9;
boardConfiguration->HD44780_db4 = GPIOE_11;
boardConfiguration->HD44780_db5 = GPIOE_13;
boardConfiguration->HD44780_db6 = GPIOE_15;
boardConfiguration->HD44780_db7 = GPIOB_10;
}
EXTERN_ENGINE;
static void setHondaAccordConfigurationCommon(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->map.sensor.type = MT_DENSO183;
boardConfiguration->isFastAdcEnabled = true;
engineConfiguration->ignitionMode = IM_ONE_COIL;
engineConfiguration->injectionMode = IM_BATCH;
engineConfiguration->idleMode = IM_MANUAL;
engineConfiguration->HD44780height = 4;
engineConfiguration->specs.cylindersCount = 4;
engineConfiguration->specs.displacement = 2.156;
// Keihin 06164-P0A-A00
engineConfiguration->injector.flow = 248;
// engineConfiguration->algorithm = LM_SPEED_DENSITY;
// I want to start with a simple Alpha-N
setAlgorithm(LM_ALPHA_N PASS_ENGINE_PARAMETER);
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
/**
* 18K Ohm @ -20C
* 2.1K Ohm @ 24C
* 100 Ohm @ 120C
*/
setCommonNTCSensor(&engineConfiguration->clt);
engineConfiguration->clt.config.bias_resistor = 1500; // same as OEM ECU
setCommonNTCSensor(&engineConfiguration->iat);
engineConfiguration->iat.config.bias_resistor = 1500; // same as OEM ECU
// set_cranking_charge_angle 35
engineConfiguration->crankingChargeAngle = 70;
// set_cranking_timing_angle 0
engineConfiguration->crankingTimingAngle = -45;
// set_global_trigger_offset_angle 34
engineConfiguration->globalTriggerAngleOffset = 34;
// set_rpm_hard_limit 4000
engineConfiguration->rpmHardLimit = 4000; // yes, 4k. let's play it safe for now
// set_cranking_rpm 2000
engineConfiguration->cranking.rpm = 500;
// set_ignition_offset 350
// engineConfiguration->ignitionOffset = 350;
// set_injection_offset 510
// engineConfiguration->injectionOffset = 510;
/**
* ADC inputs:
*
* Inp1/ADC12 PC2: CLT
* Inp2/ADC11 PC1: AIT/IAT
* Inp3/ADC0 PA0: MAP
* Inp4/ADC13 PC3: AFR green wire
* Inp6/ADC1 PA1: TPS
* Inp12/ADC14 PC4: VBatt
*/
/**
* wideband O2 Sensor
*/
engineConfiguration->afr.hwChannel = EFI_ADC_13;
/**
* VBatt
*/
engineConfiguration->vbattAdcChannel = EFI_ADC_14;
engineConfiguration->vbattDividerCoeff = ((float) (10 + 39)) / 10 * 2;
// todo engineConfiguration->afr.hwChannel = 14;
/**
* MAP D17/W5 blue wire
*/
engineConfiguration->map.sensor.hwChannel = EFI_ADC_0;
/**
* IAT D15/W7 green wire
*/
engineConfiguration->iat.adcChannel = EFI_ADC_11;
/**
* CLT D13/W9 yellow wire
*/
engineConfiguration->clt.adcChannel = EFI_ADC_12;
/**
* TPS D11/W11 blue wire
*/
engineConfiguration->tpsAdcChannel = EFI_ADC_1;
/**
* Outputs
*/
// Frankenso low out #1: PE6
// Frankenso low out #2: PE5
// Frankenso low out #3: PD7
// Frankenso low out #4: PC13
// Frankenso low out #5: PE3 Fuel Relay
// Frankenso low out #6: PE4 radiator fan - blue wire
// Frankenso low out #7: PD3 idle air valve solenoid - green wire
// Frankenso low out #8: PE2 MIL - white wire
// Frankenso low out #9: PB9 Injector #2
// Frankenso low out #10: PD5 Injector #3
// Frankenso low out #11: PB8 injector #1
// Frankenso low out #12: PB7 injector #4
boardConfiguration->fuelPumpPin = GPIOE_3;
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
boardConfiguration->malfunctionIndicatorPin = GPIOE_2;
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
boardConfiguration->fanPin = GPIOE_4; // blue wire
boardConfiguration->idle.solenoidPin = GPIOD_3; // green wire
boardConfiguration->injectionPins[0] = GPIOB_8;
boardConfiguration->injectionPins[1] = GPIOB_9;
boardConfiguration->injectionPins[2] = GPIOD_5;
boardConfiguration->injectionPins[3] = GPIOB_7;
boardConfiguration->ignitionPins[0] = GPIOE_12; // white wire
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
setFrankenso_01_LCD(boardConfiguration);
setFrankenso0_1_joystick(engineConfiguration);
boardConfiguration->idle.solenoidFrequency = 500;
}
void setHondaAccordConfigurationTwoWires(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->engineType = HONDA_ACCORD_CD_TWO_WIRES;
engineConfiguration->trigger.type = TT_HONDA_ACCORD_CD_TWO_WIRES;
setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_F);
}
void setHondaAccordConfigurationThreeWires(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->engineType = HONDA_ACCORD_CD;
engineConfiguration->trigger.type = TT_HONDA_ACCORD_CD;
setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_F);
}
void setHondaAccordConfigurationDip(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->engineType = HONDA_ACCORD_CD_DIP;
engineConfiguration->trigger.type = TT_HONDA_ACCORD_CD_DIP;
setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_F);
}
void setHondaAccordConfiguration1_24(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->engineType = HONDA_ACCORD_CD_DIP;
engineConfiguration->trigger.type = TT_HONDA_ACCORD_1_24;
setHondaAccordConfigurationCommon(PASS_ENGINE_PARAMETER_F);
}

View File

@ -1,19 +0,0 @@
/**
* @file honda_accord.h
*
* @date Jan 12, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef HONDA_ACCORD_H_
#define HONDA_ACCORD_H_
#include "engine.h"
void setFrankenso_01_LCD(board_configuration_s *boardConfiguration);
void setHondaAccordConfigurationTwoWires(DECLARE_ENGINE_PARAMETER_F);
void setHondaAccordConfigurationThreeWires(DECLARE_ENGINE_PARAMETER_F);
void setHondaAccordConfigurationDip(DECLARE_ENGINE_PARAMETER_F);
void setHondaAccordConfiguration1_24(DECLARE_ENGINE_PARAMETER_F);
#endif /* HONDA_ACCORD_H_ */

View File

@ -1,20 +0,0 @@
/**
* @file mazda_323.cpp
*
* @date Mar 8, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "mazda_323.h"
void setMazda323EngineConfiguration(engine_configuration_s *engineConfiguration) {
engineConfiguration->specs.cylindersCount = 4;
engineConfiguration->specs.displacement = 1.6;
engineConfiguration->ignitionMode = IM_ONE_COIL;
/**
* We treat the trigger as 4/0 toothed wheel
*/
// setToothedWheelConfiguration(engineConfiguration, 4, 0);
}

View File

@ -1,20 +0,0 @@
/**
* @file mazda_323.h
*
* 90-94 Mazda 323 (1.6l SOHC)
* 90-93 Ford Festiva (1.3l SOHC)
*
* http://rusefi.com/forum/viewtopic.php?f=3&t=498
*
* @date Mar 8, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef MAZDA_323_H_
#define MAZDA_323_H_
#include "engine_configuration.h"
void setMazda323EngineConfiguration(engine_configuration_s *engineConfiguration);
#endif /* MAZDA_323_H_ */

View File

@ -1,86 +0,0 @@
/**
* @file mazda_626.cpp
* MAZDA_626
* set_engine_type 28
*
* @date Jan 16, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#include "mazda_626.h"
#include "engine_math.h"
#include "honda_accord.h"
#include "custom_engine.h"
#include "allsensors.h"
#include "fsio_impl.h"
#include "settings.h"
EXTERN_ENGINE;
void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_F);
engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
engineConfiguration->engineChartSize = 150;
boardConfiguration->sensorChartMode = SC_TRIGGER;
engineConfiguration->sensorChartFrequency = 2;
engineConfiguration->injector.flow = 330;
engineConfiguration->specs.displacement = 2.0;
// set_global_trigger_offset_angle -42
engineConfiguration->globalTriggerAngleOffset = -42;
// set_cranking_timing_angle 15
engineConfiguration->crankingTimingAngle = 8;
engineConfiguration->crankingChargeAngle = 70;
// set_cranking_fuel 9
engineConfiguration->cranking.baseFuel = 9;
engineConfiguration->rpmHardLimit = 6000;
engineConfiguration->tpsMin = 80;
engineConfiguration->tpsMax = 764;
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
// set_whole_fuel_map 9
setWholeFuelMap(9 PASS_ENGINE_PARAMETER);
// set_whole_timing_map 10
setWholeTimingTable(10 PASS_ENGINE_PARAMETER);
// http://i.imgur.com/fclVzvu.jpg
setCommonNTCSensor(&engineConfiguration->clt);
// http://i.imgur.com/2hI67yW.jpg
setThermistorConfiguration(&engineConfiguration->iat, 13, 56000, 50, 9000, 80.0, 2700);
engineConfiguration->iat.config.bias_resistor = 18000;
commonFrankensoAnalogInputs(engineConfiguration);
// engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
engineConfiguration->mafAdcChannel = EFI_ADC_0;
// todo: 8.2 or 10k?
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
engineConfiguration->map.sensor.type = MT_SUBY_DENSO;
// todo engineConfiguration->afr.hwChannel = EFI_ADC_3;
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER);
#if EFI_FSIO || defined(__DOXYGEN__)
// backup main relay pin
setFsio(0, GPIOE_6, "1" PASS_ENGINE_PARAMETER);
#endif
engineConfiguration->externalKnockSenseAdc = EFI_ADC_4;
}

View File

@ -1,16 +0,0 @@
/**
* @file mazda_626.h
*
* set_engine_type 28
*
* @date Jan 16, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef CONFIG_ENGINES_MAZDA_626_H_
#define CONFIG_ENGINES_MAZDA_626_H_
#include "engine.h"
void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
#endif /* CONFIG_ENGINES_MAZDA_626_H_ */

View File

@ -1,531 +0,0 @@
/**
* @file mazda_miata.cpp
*
* FORD_ESCORT_GT = 14
* set_engine_type 14
* http://rusefi.com/wiki/index.php?title=Vehicle:Mazda_Protege_1993
*
* MIATA_1990 = 19
* MIATA_1994_DEVIATOR = 20
* MIATA_1996 = 21
* MIATA_1994_SPAGS = 24
* set_engine_type 24
*
* @date Apr 11, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "fsio_impl.h"
#include "mazda_miata.h"
#include "engine_math.h"
#include "advance_map.h"
#include "allsensors.h"
#include "honda_accord.h"
static const fuel_table_t miata_maf_fuel_table = { {/*0 engineLoad=1.2*//*0 800.0*/1.53, /*1 1213.0*/0.92, /*2 1626.0*/
0.74, /*3 2040.0*/0.69, /*4 2453.0*/0.69, /*5 2866.0*/0.67, /*6 3280.0*/0.67, /*7 3693.0*/0.67, /*8 4106.0*/
0.67, /*9 4520.0*/1.02, /*10 4933.0*/0.98, /*11 5346.0*/0.98, /*12 5760.0*/0.92, /*13 6173.0*/0.89, /*14 6586.0*/
0.82, /*15 7000.0*/0.87 }, {/*1 engineLoad=1.413333*//*0 800.0*/2.98, /*1 1213.0*/2.07, /*2 1626.0*/1.74, /*3 2040.0*/
1.55, /*4 2453.0*/1.43, /*5 2866.0*/1.18, /*6 3280.0*/0.0, /*7 3693.0*/0.0, /*8 4106.0*/0.0, /*9 4520.0*/0.0, /*10 4933.0*/
0.0, /*11 5346.0*/0.0, /*12 5760.0*/0.0, /*13 6173.0*/0.0, /*14 6586.0*/0.0, /*15 7000.0*/0.0 }, {/*2 engineLoad=1.626666*//*0 800.0*/
4.9, /*1 1213.0*/3.45, /*2 1626.0*/2.76, /*3 2040.0*/2.35, /*4 2453.0*/2.08, /*5 2866.0*/1.84, /*6 3280.0*/0.0, /*7 3693.0*/
0.0, /*8 4106.0*/0.0, /*9 4520.0*/0.0, /*10 4933.0*/0.0, /*11 5346.0*/0.0, /*12 5760.0*/0.0, /*13 6173.0*/0.0, /*14 6586.0*/
0.0, /*15 7000.0*/0.0 }, {/*3 engineLoad=1.839999*//*0 800.0*/6.94, /*1 1213.0*/4.81, /*2 1626.0*/3.79, /*3 2040.0*/
3.14, /*4 2453.0*/2.72, /*5 2866.0*/2.42, /*6 3280.0*/1.93, /*7 3693.0*/1.8, /*8 4106.0*/0.0, /*9 4520.0*/0.0, /*10 4933.0*/
0.0, /*11 5346.0*/0.0, /*12 5760.0*/0.0, /*13 6173.0*/0.0, /*14 6586.0*/0.0, /*15 7000.0*/0.0 }, {/*4 engineLoad=2.053332*//*0 800.0*/
11.94, /*1 1213.0*/6.67, /*2 1626.0*/5.15, /*3 2040.0*/4.23, /*4 2453.0*/3.63, /*5 2866.0*/3.19, /*6 3280.0*/
2.83, /*7 3693.0*/2.59, /*8 4106.0*/2.39, /*9 4520.0*/2.24, /*10 4933.0*/0.0, /*11 5346.0*/0.0, /*12 5760.0*/
0.0, /*13 6173.0*/0.0, /*14 6586.0*/0.0, /*15 7000.0*/0.0 }, {/*5 engineLoad=2.266665*//*0 800.0*/12.63, /*1 1213.0*/
10.51, /*2 1626.0*/6.91, /*3 2040.0*/5.63, /*4 2453.0*/4.8, /*5 2866.0*/4.21, /*6 3280.0*/3.75, /*7 3693.0*/3.4, /*8 4106.0*/
3.09, /*9 4520.0*/2.87, /*10 4933.0*/2.8, /*11 5346.0*/2.68, /*12 5760.0*/2.52, /*13 6173.0*/2.38, /*14 6586.0*/
2.29, /*15 7000.0*/0.0 }, {/*6 engineLoad=2.479998*//*0 800.0*/12.11, /*1 1213.0*/12.5, /*2 1626.0*/10.04, /*3 2040.0*/
7.24, /*4 2453.0*/6.11, /*5 2866.0*/5.32, /*6 3280.0*/4.73, /*7 3693.0*/4.28, /*8 4106.0*/3.89, /*9 4520.0*/
3.61, /*10 4933.0*/3.54, /*11 5346.0*/3.32, /*12 5760.0*/3.13, /*13 6173.0*/2.92, /*14 6586.0*/2.82, /*15 7000.0*/
0.0 }, {/*7 engineLoad=2.693331*//*0 800.0*/12.09, /*1 1213.0*/12.19, /*2 1626.0*/12.43, /*3 2040.0*/10.69, /*4 2453.0*/
7.92, /*5 2866.0*/6.87, /*6 3280.0*/6.09, /*7 3693.0*/5.49, /*8 4106.0*/4.97, /*9 4520.0*/4.59, /*10 4933.0*/
4.44, /*11 5346.0*/4.21, /*12 5760.0*/3.97, /*13 6173.0*/3.7, /*14 6586.0*/3.55, /*15 7000.0*/0.0 }, {/*8 engineLoad=2.906664*//*0 800.0*/
12.09, /*1 1213.0*/12.18, /*2 1626.0*/12.34, /*3 2040.0*/12.48, /*4 2453.0*/11.36, /*5 2866.0*/9.48, /*6 3280.0*/
7.68, /*7 3693.0*/6.89, /*8 4106.0*/6.23, /*9 4520.0*/5.76, /*10 4933.0*/5.65, /*11 5346.0*/5.32, /*12 5760.0*/
4.97, /*13 6173.0*/4.6, /*14 6586.0*/4.4, /*15 7000.0*/0.0 }, {/*9 engineLoad=3.119997*//*0 800.0*/12.08, /*1 1213.0*/
12.17, /*2 1626.0*/12.34, /*3 2040.0*/12.41, /*4 2453.0*/12.76, /*5 2866.0*/12.47, /*6 3280.0*/11.02, /*7 3693.0*/
9.67, /*8 4106.0*/8.29, /*9 4520.0*/7.23, /*10 4933.0*/7.0, /*11 5346.0*/6.82, /*12 5760.0*/6.44, /*13 6173.0*/
6.06, /*14 6586.0*/5.76, /*15 7000.0*/0.0 }, {/*10 engineLoad=3.33333*//*0 800.0*/12.08, /*1 1213.0*/12.18, /*2 1626.0*/
12.34, /*3 2040.0*/12.43, /*4 2453.0*/12.7, /*5 2866.0*/12.93, /*6 3280.0*/12.78, /*7 3693.0*/12.4, /*8 4106.0*/
11.4, /*9 4520.0*/10.16, /*10 4933.0*/9.44, /*11 5346.0*/9.01, /*12 5760.0*/8.36, /*13 6173.0*/7.83, /*14 6586.0*/
7.45, /*15 7000.0*/0.0 }, {/*11 engineLoad=3.546663*//*0 800.0*/12.09, /*1 1213.0*/12.17, /*2 1626.0*/12.34, /*3 2040.0*/
12.43, /*4 2453.0*/12.7, /*5 2866.0*/12.89, /*6 3280.0*/12.72, /*7 3693.0*/12.55, /*8 4106.0*/12.98, /*9 4520.0*/
12.96, /*10 4933.0*/12.3, /*11 5346.0*/11.59, /*12 5760.0*/10.9, /*13 6173.0*/10.07, /*14 6586.0*/9.59, /*15 7000.0*/
0.0 }, {/*12 engineLoad=3.759996*//*0 800.0*/12.08, /*1 1213.0*/12.18, /*2 1626.0*/12.34, /*3 2040.0*/12.43, /*4 2453.0*/
12.7, /*5 2866.0*/12.93, /*6 3280.0*/12.72, /*7 3693.0*/12.63, /*8 4106.0*/12.87, /*9 4520.0*/13.56, /*10 4933.0*/
14.76, /*11 5346.0*/14.62, /*12 5760.0*/14.14, /*13 6173.0*/13.39, /*14 6586.0*/12.19, /*15 7000.0*/0.0 }, {/*13 engineLoad=3.973329*//*0 800.0*/
12.09, /*1 1213.0*/12.17, /*2 1626.0*/12.34, /*3 2040.0*/12.43, /*4 2453.0*/12.71, /*5 2866.0*/12.92, /*6 3280.0*/
12.74, /*7 3693.0*/12.57, /*8 4106.0*/12.88, /*9 4520.0*/13.82, /*10 4933.0*/15.15, /*11 5346.0*/15.57, /*12 5760.0*/
16.22, /*13 6173.0*/16.05, /*14 6586.0*/15.59, /*15 7000.0*/0.0 }, {/*14 engineLoad=4.186662*//*0 800.0*/12.08, /*1 1213.0*/
12.18, /*2 1626.0*/12.34, /*3 2040.0*/12.4, /*4 2453.0*/12.71, /*5 2866.0*/12.92, /*6 3280.0*/12.71, /*7 3693.0*/
12.53, /*8 4106.0*/12.97, /*9 4520.0*/13.55, /*10 4933.0*/14.87, /*11 5346.0*/15.67, /*12 5760.0*/16.16, /*13 6173.0*/
16.2, /*14 6586.0*/15.89, /*15 7000.0*/0.0 }, {/*15 engineLoad=4.399995*//*0 800.0*/12.08, /*1 1213.0*/12.17, /*2 1626.0*/
12.34, /*3 2040.0*/12.43, /*4 2453.0*/12.74, /*5 2866.0*/12.91, /*6 3280.0*/12.71, /*7 3693.0*/12.54, /*8 4106.0*/
12.97, /*9 4520.0*/13.53, /*10 4933.0*/14.87, /*11 5346.0*/15.48, /*12 5760.0*/16.1, /*13 6173.0*/16.18, /*14 6586.0*/
15.93, /*15 7000.0*/0.0 } };
static const ignition_table_t miata_maf_advance_table = { {/*0 engineLoad=1.200*//*0 800.0*/+4.498, /*1 1213.0*/+11.905, /*2 1626.0*/
+23.418, /*3 2040.0*/+25.357, /*4 2453.0*/+25.441, /*5 2866.0*/+25.468, /*6 3280.0*/+29.425, /*7 3693.0*/
+32.713, /*8 4106.0*/+35.556, /*9 4520.0*/+37.594, /*10 4933.0*/+36.165, /*11 5346.0*/+30.578, /*12 5760.0*/
+29.145, /*13 6173.0*/+29.065, /*14 6586.0*/+27.071, /*15 7000.0*/+28.282 }, {/*1 engineLoad=1.413*//*0 800.0*/
+4.87, /*1 1213.0*/+12.138, /*2 1626.0*/+23.389, /*3 2040.0*/+25.501, /*4 2453.0*/+25.441, /*5 2866.0*/+25.468, /*6 3280.0*/
+29.125, /*7 3693.0*/+33.074, /*8 4106.0*/+34.203, /*9 4520.0*/+37.769, /*10 4933.0*/+35.899, /*11 5346.0*/
+30.519, /*12 5760.0*/+28.88, /*13 6173.0*/+28.74, /*14 6586.0*/+27.189, /*15 7000.0*/+27.826 }, {/*2 engineLoad=1.626*//*0 800.0*/
+4.817, /*1 1213.0*/+12.262, /*2 1626.0*/+23.925, /*3 2040.0*/+25.501, /*4 2453.0*/+25.5, /*5 2866.0*/+25.468, /*6 3280.0*/
+29.364, /*7 3693.0*/+33.489, /*8 4106.0*/+34.839, /*9 4520.0*/+37.545, /*10 4933.0*/+35.875, /*11 5346.0*/
+30.353, /*12 5760.0*/+29.052, /*13 6173.0*/+28.37, /*14 6586.0*/+27.072, /*15 7000.0*/+26.828 }, {/*3 engineLoad=1.839*//*0 800.0*/
+4.537, /*1 1213.0*/+12.421, /*2 1626.0*/+23.214, /*3 2040.0*/+25.394, /*4 2453.0*/+25.412, /*5 2866.0*/+25.485, /*6 3280.0*/
+29.425, /*7 3693.0*/+33.427, /*8 4106.0*/+34.091, /*9 4520.0*/+36.887, /*10 4933.0*/+36.047, /*11 5346.0*/
+30.079, /*12 5760.0*/+28.453, /*13 6173.0*/+28.074, /*14 6586.0*/+27.189, /*15 7000.0*/+26.641 }, {/*4 engineLoad=2.053*//*0 800.0*/
+4.522, /*1 1213.0*/+11.76, /*2 1626.0*/+23.915, /*3 2040.0*/+25.415, /*4 2453.0*/+25.551, /*5 2866.0*/+25.14, /*6 3280.0*/
+29.346, /*7 3693.0*/+32.917, /*8 4106.0*/+34.815, /*9 4520.0*/+37.211, /*10 4933.0*/+35.817, /*11 5346.0*/
+29.694, /*12 5760.0*/+28.799, /*13 6173.0*/+27.818, /*14 6586.0*/+28.098, /*15 7000.0*/+27.662 }, {/*5 engineLoad=2.266*//*0 800.0*/
+4.678, /*1 1213.0*/+11.912, /*2 1626.0*/+23.486, /*3 2040.0*/+25.379, /*4 2453.0*/+25.551, /*5 2866.0*/+25.527, /*6 3280.0*/
+29.856, /*7 3693.0*/+33.511, /*8 4106.0*/+34.786, /*9 4520.0*/+37.963, /*10 4933.0*/+35.917, /*11 5346.0*/
+31.073, /*12 5760.0*/+28.361, /*13 6173.0*/+28.468, /*14 6586.0*/+27.188, /*15 7000.0*/+26.729 }, {/*6 engineLoad=2.479*//*0 800.0*/
+4.517, /*1 1213.0*/+12.029, /*2 1626.0*/+23.477, /*3 2040.0*/+25.455, /*4 2453.0*/+25.382, /*5 2866.0*/+25.898, /*6 3280.0*/
+29.147, /*7 3693.0*/+33.578, /*8 4106.0*/+34.12, /*9 4520.0*/+36.279, /*10 4933.0*/+36.432, /*11 5346.0*/
+31.362, /*12 5760.0*/+28.084, /*13 6173.0*/+28.463, /*14 6586.0*/+27.691, /*15 7000.0*/+27.83 }, {/*7 engineLoad=2.693*//*0 800.0*/
+4.532, /*1 1213.0*/+12.262, /*2 1626.0*/+23.935, /*3 2040.0*/+25.489, /*4 2453.0*/+25.595, /*5 2866.0*/+26.816, /*6 3280.0*/
+30.251, /*7 3693.0*/+33.533, /*8 4106.0*/+34.794, /*9 4520.0*/+37.882, /*10 4933.0*/+36.104, /*11 5346.0*/
+30.079, /*12 5760.0*/+28.545, /*13 6173.0*/+29.304, /*14 6586.0*/+27.07, /*15 7000.0*/+28.324 }, {/*8 engineLoad=2.906*//*0 800.0*/
+4.532, /*1 1213.0*/+12.036, /*2 1626.0*/+23.418, /*3 2040.0*/+25.513, /*4 2453.0*/+25.382, /*5 2866.0*/+25.357, /*6 3280.0*/
+29.934, /*7 3693.0*/+33.467, /*8 4106.0*/+34.748, /*9 4520.0*/+37.288, /*10 4933.0*/+36.38, /*11 5346.0*/
+29.516, /*12 5760.0*/+28.799, /*13 6173.0*/+28.407, /*14 6586.0*/+26.951, /*15 7000.0*/+28.203 }, {/*9 engineLoad=3.119997*//*0 800.0*/
+4.532, /*1 1213.0*/+11.978, /*2 1626.0*/+23.73, /*3 2040.0*/+25.501, /*4 2453.0*/+25.624, /*5 2866.0*/+26.328, /*6 3280.0*/
+30.015, /*7 3693.0*/+33.187, /*8 4106.0*/+34.881, /*9 4520.0*/+38.044, /*10 4933.0*/+35.81, /*11 5346.0*/
+29.843, /*12 5760.0*/+29.306, /*13 6173.0*/+28.997, /*14 6586.0*/+27.109, /*15 7000.0*/+29.339 }, {/*10 engineLoad=3.33333*//*0 800.0*/
+4.527, /*1 1213.0*/+12.131, /*2 1626.0*/+23.486, /*3 2040.0*/+25.43, /*4 2453.0*/+25.551, /*5 2866.0*/+26.276, /*6 3280.0*/
+29.639, /*7 3693.0*/+33.005, /*8 4106.0*/+34.253, /*9 4520.0*/+37.788, /*10 4933.0*/+36.077, /*11 5346.0*/
+30.188, /*12 5760.0*/+29.087, /*13 6173.0*/+28.481, /*14 6586.0*/+27.348, /*15 7000.0*/+27.777 }, {/*11 engineLoad=3.546663*//*0 800.0*/
+4.889, /*1 1213.0*/+12.175, /*2 1626.0*/+23.271, /*3 2040.0*/+25.357, /*4 2453.0*/+25.551, /*5 2866.0*/+25.485, /*6 3280.0*/
+29.899, /*7 3693.0*/+32.802, /*8 4106.0*/+34.786, /*9 4520.0*/+38.686, /*10 4933.0*/+35.722, /*11 5346.0*/
+31.347, /*12 5760.0*/+28.891, /*13 6173.0*/+28.333, /*14 6586.0*/+27.149, /*15 7000.0*/+27.236 }, {/*12 engineLoad=3.759996*//*0 800.0*/
+4.537, /*1 1213.0*/+12.073, /*2 1626.0*/+23.896, /*3 2040.0*/+25.525, /*4 2453.0*/+25.595, /*5 2866.0*/+25.451, /*6 3280.0*/
+30.428, /*7 3693.0*/+33.714, /*8 4106.0*/+34.08, /*9 4520.0*/+37.526, /*10 4933.0*/+35.817, /*11 5346.0*/
+30.733, /*12 5760.0*/+28.718, /*13 6173.0*/+28.518, /*14 6586.0*/+27.518, /*15 7000.0*/+26.561 }, {/*13 engineLoad=3.973329*//*0 800.0*/
+4.86, /*1 1213.0*/+11.883, /*2 1626.0*/+23.428, /*3 2040.0*/+25.489, /*4 2453.0*/+25.536, /*5 2866.0*/+25.613, /*6 3280.0*/
+29.895, /*7 3693.0*/+33.648, /*8 4106.0*/+34.758, /*9 4520.0*/+37.988, /*10 4933.0*/+36.047, /*11 5346.0*/
+30.225, /*12 5760.0*/+28.698, /*13 6173.0*/+28.487, /*14 6586.0*/+27.111, /*15 7000.0*/+27.708 }, {/*14 engineLoad=4.186662*//*0 800.0*/
+4.683, /*1 1213.0*/+11.898, /*2 1626.0*/+23.506, /*3 2040.0*/+25.562, /*4 2453.0*/+25.61, /*5 2866.0*/+25.519, /*6 3280.0*/
+29.95, /*7 3693.0*/+33.582, /*8 4106.0*/+34.548, /*9 4520.0*/+36.201, /*10 4933.0*/+35.788, /*11 5346.0*/
+30.053, /*12 5760.0*/+28.292, /*13 6173.0*/+28.259, /*14 6586.0*/+27.269, /*15 7000.0*/+26.863 }, {/*15 engineLoad=4.399*//*0 800.0*/
+4.85, /*1 1213.0*/+12.24, /*2 1626.0*/+24.091, /*3 2040.0*/+25.394, /*4 2453.0*/+25.323, /*5 2866.0*/+25.544, /*6 3280.0*/
+29.915, /*7 3693.0*/+33.104, /*8 4106.0*/+36.016, /*9 4520.0*/+37.933, /*10 4933.0*/+36.254, /*11 5346.0*/
+29.712, /*12 5760.0*/+28.651, /*13 6173.0*/+28.045, /*14 6586.0*/+27.228, /*15 7000.0*/+27.784 } };
static void setDefaultCrankingFuel(engine_configuration_s *engineConfiguration) {
// todo: set cranking parameters method based on injectors and displacement?
// set_cranking_fuel 5
engineConfiguration->cranking.baseFuel = 5;
}
EXTERN_ENGINE;
static void commonMiataNa(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA;
engineConfiguration->engineChartSize = 100;
boardConfiguration->triggerInputPins[0] = GPIOC_6; // 2G YEL/BLU
boardConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
setFuelLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER);
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER);
boardConfiguration->idle.solenoidFrequency = 160;
engineConfiguration->globalTriggerAngleOffset = 294;
// Frankenstein: high side #1 is PE8
// Frankenstein: high side #2 is PE10
// Frankenstein: high side #3 is PE12
// Frankenstein: high side #4 is PE14
// Frankenstein: high side #5 is PC9
// Frankenstein: high side #6 is PC7
boardConfiguration->ignitionPins[0] = GPIOE_12; // Frankenstein: high side #3
boardConfiguration->ignitionPins[1] = GPIOE_14; // Frankenstein: high side #4
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPinMode = OM_DEFAULT;
setDefaultCrankingFuel(engineConfiguration);
boardConfiguration->triggerSimulatorPinModes[0] = OM_OPENDRAIN;
boardConfiguration->triggerSimulatorPinModes[1] = OM_OPENDRAIN;
setCommonNTCSensor(&engineConfiguration->clt);
engineConfiguration->clt.config.bias_resistor = 2700;
setCommonNTCSensor(&engineConfiguration->iat);
engineConfiguration->iat.config.bias_resistor = 2700;
}
static void common079721_2351(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
engineConfiguration->engineChartSize = 150;
engineConfiguration->specs.cylindersCount = 4;
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
boardConfiguration->fuelPumpPin = GPIO_UNASSIGNED; // fuel pump is not controlled by ECU on this engine
// set_cranking_injection_mode 0
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
// set_injection_mode 2
engineConfiguration->injectionMode = IM_BATCH;
// Frankenstein analog input #1: adc1
// Frankenstein analog input #2: adc3
// Frankenstein analog input #3: adc13
// Frankenstein analog input #4: adc11
// todo: see https://docs.google.com/spreadsheet/ccc?key=0Arl1FeMZcfisdEdGdUlHdWh6cVBoSzFIbkxqa1QtZ3c
// Frankenstein analog input #5: adc
// Frankenstein analog input #6: adc
// Frankenstein analog input #7: adc
// Frankenstein analog input #8: adc
// Frankenstein analog input #9: adc
// Frankenstein analog input #10: adc
// Frankenstein analog input #11: adc
// Frankenstein analog input #12: adc
engineConfiguration->mafAdcChannel = EFI_ADC_1;
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
engineConfiguration->clt.adcChannel = EFI_ADC_11;
}
void setMiata1990(DECLARE_ENGINE_PARAMETER_F) {
common079721_2351(engineConfiguration, boardConfiguration);
commonMiataNa(PASS_ENGINE_PARAMETER_F);
// Frankenstein: low side - out #1: PC14
// Frankenstein: low side - out #2: PC15
// Frankenstein: low side - out #3: PE6
// Frankenstein: low side - out #4: PC13
// Frankenstein: low side - out #5: PE4
// Frankenstein: low side - out #6: PE5
// Frankenstein: low side - out #7: PE2
// Frankenstein: low side - out #8: PE3
// Frankenstein: low side - out #9: PE0
// Frankenstein: low side - out #10: PE1
// Frankenstein: low side - out #11: PB8
// Frankenstein: low side - out #12: PB9
boardConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
boardConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
boardConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
boardConfiguration->injectionPinMode = OM_DEFAULT;
// todo: idleValvePin
}
/**
* pin 1I/W9 - extra +5v
* set_engine_type 14
*/
void setFordEscortGt(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
common079721_2351(engineConfiguration, boardConfiguration);
setFrankenso_01_LCD(boardConfiguration);
setFrankenso0_1_joystick(engineConfiguration);
setDensoTODO(config);
engineConfiguration->globalFuelCorrection = 0.75;
engineConfiguration->specs.displacement = 1.839;
// engineConfiguration->algorithm = LM_PLAIN_MAF;
engineConfiguration->algorithm = LM_SPEED_DENSITY;
// engineConfiguration->algorithm = LM_REAL_MAF;
boardConfiguration->tunerStudioSerialSpeed = 9600;
setFuelLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER);
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER);
// boardConfiguration->triggerInputPins[0] = GPIOC_6; // 2G YEL/BLU
// boardConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
// in case of SOHC distributor we only have one signal
// boardConfiguration->triggerInputPins[0] = GPIOA_5; // 2E White CKP
// boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
// in case of SOHC distributor we only have one signal
boardConfiguration->triggerInputPins[0] = GPIOC_6;
boardConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
// Denso 195500-2180
engineConfiguration->injector.flow = 265;
engineConfiguration->hasBaroSensor = false;
engineConfiguration->hasMapSensor = true;
boardConfiguration->isFastAdcEnabled = true;
engineConfiguration->map.sensor.type = MT_DENSO183;
engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
setEgoSensor(ES_BPSX_D1 PASS_ENGINE_PARAMETER);
engineConfiguration->afr.hwChannel = EFI_ADC_2;
// set_global_trigger_offset_angle -40
engineConfiguration->globalTriggerAngleOffset = -40;
// set_ignition_offset 0
engineConfiguration->ignitionOffset = 0;
// set_injection_offset 0
engineConfiguration->injectionOffset = 0;
// todo: change to 15?
// set_cranking_timing_angle 3
engineConfiguration->crankingTimingAngle = 3;
engineConfiguration->crankingChargeAngle = 70;
setWholeTimingTable(10 PASS_ENGINE_PARAMETER);
// set_whole_fuel_map 5
setWholeFuelMap(5 PASS_ENGINE_PARAMETER);
setSingleCoilDwell(engineConfiguration);
engineConfiguration->ignitionMode = IM_ONE_COIL;
boardConfiguration->triggerSimulatorPinModes[0] = OM_OPENDRAIN;
boardConfiguration->triggerSimulatorPinModes[1] = OM_OPENDRAIN;
boardConfiguration->ignitionPins[0] = GPIOE_14; // Frankenso high side - pin 1G
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPinMode = OM_DEFAULT;
/**
* Outputs
*/
// Frankenso low out #1: PE6
// Frankenso low out #2: PE5 MIL
// Frankenso low out #3:
// Frankenso low out #4:
// Frankenso low out #5: PE3
// Frankenso low out #6: PE4
// Frankenso low out #7: PE0<>PD5
// Frankenso low out #8: PE2 INJ
// Frankenso low out #9: PB9 IDLE
// Frankenso low out #10: PE1<>PD3 INJ 1&3
// Frankenso low out #11: PB8
// Frankenso low out #12: PB7
boardConfiguration->injectionPins[0] = GPIOD_3;
boardConfiguration->injectionPins[1] = GPIOE_2;
//setDefaultCrankingFuel(engineConfiguration);
engineConfiguration->cranking.baseFuel = 5;
// 40% idle is good default
boardConfiguration->idle.solenoidFrequency = 300;
boardConfiguration->idle.solenoidPin = GPIOB_9;
boardConfiguration->malfunctionIndicatorPin = GPIOE_5;
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
boardConfiguration->tunerStudioSerialSpeed = 9600;
commonFrankensoAnalogInputs(engineConfiguration);
setCommonNTCSensor(&engineConfiguration->clt);
engineConfiguration->clt.config.bias_resistor = 2700;
setCommonNTCSensor(&engineConfiguration->iat);
engineConfiguration->iat.config.bias_resistor = 2700;
engineConfiguration->hasTpsSensor = false;
engineConfiguration->tpsAdcChannel = EFI_ADC_NONE;
// engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
engineConfiguration->mafAdcChannel = EFI_ADC_0;
engineConfiguration->clt.adcChannel = EFI_ADC_12;
engineConfiguration->iat.adcChannel = EFI_ADC_11;
// todo: 8.2 or 10k?
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
// end of Ford Escort GT config
}
static void setMiata1994_common(DECLARE_ENGINE_PARAMETER_F) {
commonMiataNa(PASS_ENGINE_PARAMETER_F);
engineConfiguration->specs.displacement = 1.839;
// set_cranking_timing_angle 0
engineConfiguration->crankingTimingAngle = 0;
engineConfiguration->crankingChargeAngle = 70;
copyFuelTable(miata_maf_fuel_table, config->fuelTable);
copyTimingTable(miata_maf_advance_table, config->ignitionTable);
// boardConfiguration->triggerSimulatorPins[0] = GPIOD_2; // 2G - YEL/BLU
// boardConfiguration->triggerSimulatorPins[1] = GPIOB_3; // 2E - WHT - four times
// boardConfiguration->triggerSimulatorPinModes[0] = OM_OPENDRAIN;
// boardConfiguration->triggerSimulatorPinModes[1] = OM_OPENDRAIN;
//
// boardConfiguration->triggerInputPins[0] = GPIO_UNASSIGNED;
// boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
//
// boardConfiguration->is_enabled_spi_1 = false;
// boardConfiguration->is_enabled_spi_2 = false;
// boardConfiguration->is_enabled_spi_3 = false;
/**
* Outputs
*/
// Frankenso low out #: PE6
// Frankenso low out #: PE5
// Frankenso low out #:
// Frankenso low out #:
// Frankenso low out #5: PE3
// Frankenso low out #6: PE4
// Frankenso low out #7: PE1 (do not use with discovery!)
// Frankenso low out #8:
// Frankenso low out #9: PB9
// Frankenso low out #10: PE0 (do not use with discovery!)
// Frankenso low out #11: PB8
// Frankenso low out #12: PB7
boardConfiguration->fanPin = GPIOE_6;
boardConfiguration->o2heaterPin = GPIO_UNASSIGNED;
boardConfiguration->fuelPumpPin = GPIOE_4;
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
boardConfiguration->injectionPinMode = OM_DEFAULT;
boardConfiguration->idle.solenoidPin = GPIOB_9;
boardConfiguration->ignitionPins[0] = GPIOE_14; // Frankenso high side - pin 1G
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIOC_7; // Frankenso high side - pin 1H
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPinMode = OM_DEFAULT;
setFrankenso_01_LCD(boardConfiguration);
commonFrankensoAnalogInputs(engineConfiguration);
engineConfiguration->tpsAdcChannel = EFI_ADC_2;
engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
engineConfiguration->mafAdcChannel = EFI_ADC_0;
engineConfiguration->clt.adcChannel = EFI_ADC_12;
engineConfiguration->iat.adcChannel = EFI_ADC_11;
// end of 1994 commond
}
/**
* Frankenso board
* set_engine_type 20
*/
void setMiata1994_d(DECLARE_ENGINE_PARAMETER_F) {
setMiata1994_common(PASS_ENGINE_PARAMETER_F);
engineConfiguration->vbattDividerCoeff = ((float) (8.2 + 33)) / 8.2 * 2;
/**
* This board was avoiding PE0 & PE1 mosfets altogether
*/
boardConfiguration->injectionPins[0] = GPIOD_7; // avoiding PE1
boardConfiguration->injectionPins[1] = GPIOE_2;
boardConfiguration->injectionPins[2] = GPIOB_8;
boardConfiguration->injectionPins[3] = GPIOB_7;
// todo: add the diode? change idle valve logic?
boardConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
}
void setMiata1994_s(DECLARE_ENGINE_PARAMETER_F) {
setMiata1994_common(PASS_ENGINE_PARAMETER_F);
engineConfiguration->vbattDividerCoeff = ((float) (10.0 + 33)) / 10 * 2;
boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
engineConfiguration->acSwitchAdc = EFI_ADC_1; // PA1, W50 on Frankenso
engineConfiguration->afr.hwChannel = EFI_ADC_3;
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER);
/**
* This board has PE0<>PD5 & PE1<>PD3 rewired in order to avoid Discovery issue
*/
boardConfiguration->injectionPins[0] = GPIOD_3; // avoiding PE1
boardConfiguration->injectionPins[1] = GPIOE_2; // injector #2
boardConfiguration->injectionPins[2] = GPIOB_8; // injector #3
boardConfiguration->injectionPins[3] = GPIOB_7; // injector #4
// setFsio(engineConfiguration, 0, GPIOD_11, "coolant 80 >");
boardConfiguration->idle.solenoidFrequency = 500;
engineConfiguration->acCutoffLowRpm = 400;
engineConfiguration->acCutoffHighRpm = 4500;
engineConfiguration->acIdleRpmBump = 200;
//engineConfiguration->idleMode != IM_AUTO;
engineConfiguration->targetIdleRpm = 800;
engineConfiguration->fanOffTemperature = 90;
engineConfiguration->fanOnTemperature = 95;
engineConfiguration->tpsMin = 86;
engineConfiguration->tpsMax = 596;
boardConfiguration->malfunctionIndicatorPin = GPIOE_5;
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
engineConfiguration->algorithm = LM_REAL_MAF;
setMazdaMiataNAMaf(config);
engineConfiguration->injector.flow = 230;
}
/**
* Tom tomiata, Frankenstein board
*/
void setMiata1996(DECLARE_ENGINE_PARAMETER_F) {
commonMiataNa(PASS_ENGINE_PARAMETER_F);
engineConfiguration->specs.displacement = 1.839;
copyFuelTable(miata_maf_fuel_table, config->fuelTable);
copyTimingTable(miata_maf_advance_table, config->ignitionTable);
// upside down
boardConfiguration->triggerInputPins[0] = GPIOA_5;
boardConfiguration->triggerInputPins[1] = GPIOC_6;
boardConfiguration->fuelPumpPin = GPIOE_4;
boardConfiguration->idle.solenoidPin = GPIOE_5;
engineConfiguration->mafAdcChannel = EFI_ADC_1;
engineConfiguration->clt.adcChannel = EFI_ADC_11;
engineConfiguration->tpsAdcChannel = EFI_ADC_13;
boardConfiguration->ignitionPins[0] = GPIOE_12; // Frankenstein: high side #3
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIOE_14; // Frankenstein: high side #4
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPinMode = OM_DEFAULT;
// harness is sequential but we have a limited board
engineConfiguration->crankingInjectionMode = IM_BATCH;
engineConfiguration->injectionMode = IM_BATCH;
boardConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
boardConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
boardConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
boardConfiguration->injectionPinMode = OM_DEFAULT;
}

View File

@ -1,23 +0,0 @@
/**
* @file mazda_miata.h
* @brief Mazda Miata NA, also 1993 Ford Escort GT engine configuration. The US Escort.
*
* @date Oct 31, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*
* http://rusefi.com/forum/viewtopic.php?t=537
* Injectors: Denso 195500-2180, 230-265cc (?), tan, 13.9 ohms
*/
#ifndef MAZDA_MIATA_H_
#define MAZDA_MIATA_H_
#include "engine.h"
void setFordEscortGt(DECLARE_ENGINE_PARAMETER_F);
void setMiata1990(DECLARE_ENGINE_PARAMETER_F);
void setMiata1994_d(DECLARE_ENGINE_PARAMETER_F);
void setMiata1994_s(DECLARE_ENGINE_PARAMETER_F);
void setMiata1996(DECLARE_ENGINE_PARAMETER_F);
#endif /* MAZDA_MIATA_H_ */

View File

@ -1,79 +0,0 @@
/**
* @file mazda_miata_nb.cpp
*
* MAZDA_MIATA_NB = 9
*
* @date Feb 18, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "mazda_miata_nb.h"
#include "thermistors.h"
EXTERN_ENGINE;
void setMazdaMiataNbEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
// set_rpm_hard_limit 3000
engineConfiguration->rpmHardLimit = 3000; // yes, 3k. let's play it safe for now
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NB;
engineConfiguration->globalTriggerAngleOffset = 276;
// set_cranking_injection_mode 0
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
// set_injection_mode 1
engineConfiguration->injectionMode = IM_SEQUENTIAL;
// set_ignition_mode 2
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
// set_firing_order 2
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
setThermistorConfiguration(&engineConfiguration->clt, 0, 32500, 30, 7550, 100, 700);
engineConfiguration->clt.config.bias_resistor = 2700;
setThermistorConfiguration(&engineConfiguration->iat, -10, 160310, 60, 7700, 120.00, 1180);
engineConfiguration->iat.config.bias_resistor = 2700;
engineConfiguration->tpsAdcChannel = EFI_ADC_3; // 15 is the old value
engineConfiguration->vbattAdcChannel = EFI_ADC_0; // 1 is the old value
// engineConfiguration->map.channel = 1;
engineConfiguration->mafAdcChannel = EFI_ADC_1;
engineConfiguration->clt.adcChannel = EFI_ADC_11;
engineConfiguration->iat.adcChannel = EFI_ADC_13;
engineConfiguration->afr.hwChannel = EFI_ADC_2;
boardConfiguration->idle.solenoidPin = GPIOE_0;
boardConfiguration->idle.solenoidPinMode = OM_DEFAULT;
boardConfiguration->fuelPumpPin = GPIOC_14; // Frankenstein: low side - out #4
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
boardConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
boardConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
boardConfiguration->injectionPins[2] = GPIOE_3; // Frankenstein: low side - out #8
boardConfiguration->injectionPins[3] = GPIOE_5; // Frankenstein: low side - out #6
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
boardConfiguration->injectionPinMode = OM_DEFAULT;
boardConfiguration->ignitionPins[0] = GPIOE_10; // Frankenstein: high side #1
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIOC_9; // // Frankenstein: high side #2
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPinMode = OM_INVERTED;
boardConfiguration->malfunctionIndicatorPin = GPIOE_1;
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
boardConfiguration->fanPin = GPIOE_6;
boardConfiguration->fanPinMode = OM_DEFAULT;
boardConfiguration->clutchDownPin = GPIO_UNASSIGNED;
// set_whole_fuel_map 3
setWholeFuelMap(3 PASS_ENGINE_PARAMETER);
// 10 deg before TDC is default timing
}

View File

@ -1,15 +0,0 @@
/**
* @file mazda_miata_nb.h
*
* @date Feb 18, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef MAZDA_MIATA_NB_H_
#define MAZDA_MIATA_NB_H_
#include "engine.h"
void setMazdaMiataNbEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
#endif /* MAZDA_MIATA_NB_H_ */

View File

@ -1,94 +0,0 @@
/**
* @file mitsubishi.cpp
*
* MITSU_4G93 16
*
* set_engine_type 16
*
* @date Aug 5, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "fsio_impl.h"
#include "mitsubishi.h"
#include "allsensors.h"
EXTERN_ENGINE;
void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->engineType = MITSU_4G93;
engineConfiguration->trigger.type = TT_MITSU;
engineConfiguration->specs.cylindersCount = 4;
engineConfiguration->specs.displacement = 1.800;
// set_ignition_mode 2
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
// set_global_trigger_offset_angle 671
engineConfiguration->globalTriggerAngleOffset = 671;
// set_cranking_rpm 550
engineConfiguration->cranking.rpm = 550;
// set_cranking_charge_angle 70
engineConfiguration->crankingChargeAngle = 70;
// set_cranking_timing_angle 715
engineConfiguration->crankingTimingAngle = -715;
// set_whole_fuel_map 3
setWholeFuelMap(3 PASS_ENGINE_PARAMETER);
// set_cranking_fuel 4
engineConfiguration->cranking.baseFuel = 4;
// /**
// * 29150 Ohm @ 40C
// * 10160 Ohm @ 70C
// * 1270 Ohm @ 150C
// */
// setThermistorConfiguration(&engineConfiguration->clt, 40, 29150, 70, 10160, 150, 1270);
setCommonNTCSensor(&engineConfiguration->clt);
engineConfiguration->clt.config.bias_resistor = 2700;
// Frankenstein: low side - out #1: PC14
// Frankenstein: low side - out #2: PC15
// Frankenstein: low side - out #3: PE6
// Frankenstein: low side - out #4: PC13
// Frankenstein: low side - out #5: PE4
// Frankenstein: low side - out #6: PE5
// Frankenstein: low side - out #7: PE2
// Frankenstein: low side - out #8: PE3
// Frankenstein: low side - out #9: PE0
// Frankenstein: low side - out #10: PE1
// Frankenstein: low side - out #11: PB8
// Frankenstein: low side - out #12: PB9
boardConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
boardConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
boardConfiguration->injectionPins[2] = GPIOE_3; // Frankenstein: low side - out #8
boardConfiguration->injectionPins[3] = GPIOE_5; // Frankenstein: low side - out #6
// Frankenstein: high side #1: PE8
// Frankenstein: high side #2: PE10
boardConfiguration->ignitionPins[0] = GPIOE_8; // Frankenstein: high side #1
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIOE_10; // // Frankenstein: high side #2
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
engineConfiguration->HD44780width = 20;
engineConfiguration->HD44780height = 4;
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER);
#if EFI_FSIO || defined(__DOXYGEN__)
setFsio(0, GPIOD_11, "rpm 5500 >" PASS_ENGINE_PARAMETER);
#endif
}

View File

@ -1,14 +0,0 @@
/**
* @file mitsubishi.h
*
* @date Aug 5, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef MITSUBISHI_H_
#define MITSUBISHI_H_
#include "engine.h"
void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_F);
#endif /* MITSUBISHI_H_ */

View File

@ -1,19 +0,0 @@
/**
* @file nissan_primera.cpp
*
* engine_type 5
*
* @date Oct 14, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#if EFI_SUPPORT_NISSAN_PRIMERA || defined(__DOXYGEN__)
#include "nissan_primera.h"
void setNissanPrimeraEngineConfiguration(engine_configuration_s *engineConfiguration) {
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
}
#endif /* EFI_SUPPORT_NISSAN_PRIMERA */

View File

@ -1,21 +0,0 @@
/**
* @file nissan_primera.h
*
* @date Oct 14, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "efifeatures.h"
#ifndef NISSAN_PRIMERA_H_
#define NISSAN_PRIMERA_H_
#if EFI_SUPPORT_NISSAN_PRIMERA
#include "engine_configuration.h"
void setNissanPrimeraEngineConfiguration(engine_configuration_s *engineConfiguration);
#endif /* EFI_SUPPORT_NISSAN_PRIMERA */
#endif /* NISSAN_PRIMERA_H_ */

View File

@ -1,84 +0,0 @@
/**
* @file rover_v8.cpp
*
* V8, firing order 18436572
*
* This config overrides some values of the default configuration which is set by setDefaultConfiguration() method
*
* set_engine_type 10
*
* ROVER_V8 = 10
*
* @date Jun 27, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#include "rover_v8.h"
void setFrankenstein_01_LCD(board_configuration_s *boardConfiguration) {
boardConfiguration->HD44780_rs = GPIOE_9;
boardConfiguration->HD44780_e = GPIOE_11;
boardConfiguration->HD44780_db4 = GPIOE_13;
boardConfiguration->HD44780_db5 = GPIOE_15;
boardConfiguration->HD44780_db6 = GPIOB_11;
boardConfiguration->HD44780_db7 = GPIOB_13;
}
EXTERN_ENGINE;
void setRoverv8(DECLARE_ENGINE_PARAMETER_F) {
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_1;
engineConfiguration->specs.displacement = 3.528;
engineConfiguration->specs.cylindersCount = 8;
engineConfiguration->specs.firingOrder = FO_1_8_4_3_6_5_7_2;
// set_rpm_hard_limit 4000
engineConfiguration->rpmHardLimit = 4000; // yes, 4k. let's play it safe for now
// set_cranking_rpm 550
engineConfiguration->cranking.rpm = 550;
// set_whole_fuel_map 3
setWholeFuelMap(3 PASS_ENGINE_PARAMETER);
// set_cranking_injection_mode 0
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
// set_injection_mode 1
engineConfiguration->injectionMode = IM_SEQUENTIAL;
// set_ignition_mode 2
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
// Frankenstein: low side - out #1: PC14
// Frankenstein: low side - out #2: PC15
// Frankenstein: low side - out #3: PE6
// Frankenstein: low side - out #4: PC13
// Frankenstein: low side - out #5: PE4
// Frankenstein: low side - out #6: PE5
// Frankenstein: low side - out #7: PE2
// Frankenstein: low side - out #8: PE3
// Frankenstein: low side - out #9: PE0
// Frankenstein: low side - out #10: PE1
// Frankenstein: low side - out #11: PB8
// Frankenstein: low side - out #12: PB9
boardConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
boardConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
boardConfiguration->injectionPins[2] = GPIOE_3; // Frankenstein: low side - out #8
boardConfiguration->injectionPins[3] = GPIOE_5; // Frankenstein: low side - out #6
boardConfiguration->fuelPumpPin = GPIOC_13; // Frankenstein: low side - out #4
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
// set_injection_pin_mode 0
boardConfiguration->injectionPinMode = OM_DEFAULT;
boardConfiguration->canTxPin = GPIOB_6;
boardConfiguration->canRxPin = GPIOB_12;
engineConfiguration->canWriteEnabled = true;
engineConfiguration->canReadEnabled = false;
engineConfiguration->isCanEnabled = true;
engineConfiguration->canNbcType = CAN_BUS_MAZDA_RX8;
}

View File

@ -1,15 +0,0 @@
/**
* @file rover_v8.h
*
* @date Jun 27, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef ROVER_V8_H_
#define ROVER_V8_H_
#include "engine.h"
void setFrankenstein_01_LCD(board_configuration_s *boardConfiguration);
void setRoverv8(DECLARE_ENGINE_PARAMETER_F);
#endif /* ROVER_V8_H_ */

View File

@ -1,98 +0,0 @@
/**
* @file sachs.cpp
*
* set_engine_type 29
* http://rusefi.com/forum/viewtopic.php?f=3&t=396
*
* @date Jan 26, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "sachs.h"
#include "allsensors.h"
#include "engine_math.h"
EXTERN_ENGINE;
void setSachs(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->specs.displacement = 0.1; // 100cc
engineConfiguration->specs.cylindersCount = 1;
engineConfiguration->engineCycle = 360;
setOperationMode(engineConfiguration, TWO_STROKE);
engineConfiguration->specs.firingOrder = FO_ONE_CYLINDER;
engineConfiguration->engineChartSize = 400;
// set_injection_offset 0
engineConfiguration->injectionOffset = 0;
/**
* 50/2 trigger
*/
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
engineConfiguration->trigger.customTotalToothCount = 50;
engineConfiguration->trigger.customSkippedToothCount = 2;
engineConfiguration->hasIatSensor = false;
engineConfiguration->hasMapSensor = false;
engineConfiguration->hasBaroSensor = false;
engineConfiguration->hasAfrSensor = false;
engineConfiguration->hasCltSensor = false;
boardConfiguration->useSerialPort = false;
// Frankenstein analog input #1: PA1 adc1 MAP
// Frankenstein analog input #2: PA3 adc3 TPS
// Frankenstein analog input #3: PC3 adc13 IAT
// Frankenstein analog input #4: PC1 adc11 CLT
// Frankenstein analog input #5: PA0 adc0 O2
// Frankenstein analog input #6: PC2 adc12
// Frankenstein analog input #7: PA4 adc4
// Frankenstein analog input #8: PA2 adc2
// Frankenstein analog input #9: PA6 adc6
// Frankenstein analog input #10: PA7 adc7
// Frankenstein analog input #11: PC4 adc14
// Frankenstein analog input #12: PC5 adc15
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
engineConfiguration->vbattAdcChannel = EFI_ADC_NONE;
/**
* TPS 0% 0.9v
* TPS 100% 2.34v
*/
engineConfiguration->tpsMin = convertVoltageTo10bitADC(1.250);
engineConfiguration->tpsMax = convertVoltageTo10bitADC(4.538);
// Frankenstein: low side - out #1: PC14
// Frankenstein: low side - out #2: PC15
// Frankenstein: low side - out #3: PE6
// Frankenstein: low side - out #4: PC13
// Frankenstein: low side - out #5: PE4
// Frankenstein: low side - out #6: PE5
// Frankenstein: low side - out #7: PE2
// Frankenstein: low side - out #8: PE3
// Frankenstein: low side - out #9: PE0
// Frankenstein: low side - out #10: PE1
// Frankenstein: low side - out #11: PB8
// Frankenstein: low side - out #12: PB9
boardConfiguration->triggerInputPins[0] = GPIOA_5;
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
boardConfiguration->injectionPins[0] = GPIOC_15;
boardConfiguration->fuelPumpPin = GPIOE_6;
// todo: extract a method? figure out something smarter
setFuelRpmBin(800, 15000 PASS_ENGINE_PARAMETER);
setTimingRpmBin(800, 15000 PASS_ENGINE_PARAMETER);
setTableBin2(config->veRpmBins, FUEL_RPM_COUNT, 15000, 7000, 1);
setTableBin2(config->afrRpmBins, FUEL_RPM_COUNT, 15000, 7000, 1);
engineConfiguration->hasFrequencyReportingMapSensor = true;
boardConfiguration->frequencyReportingMapInputPin = GPIOC_6;
boardConfiguration->mapFrequency100Kpa = 159;
boardConfiguration->mapFrequency0Kpa = 80;
}

View File

@ -1,14 +0,0 @@
/**
* @file sachs.h
*
* @date Jan 26, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef CONFIG_ENGINES_SACHS_H_
#define CONFIG_ENGINES_SACHS_H_
#include "engine.h"
void setSachs(DECLARE_ENGINE_PARAMETER_F);
#endif /* CONFIG_ENGINES_SACHS_H_ */

View File

@ -1,16 +0,0 @@
/**
* @file saturn_ion.cpp
*
* SATURN_ION_2004 = 12
*
* 7x GM DIS trigger
*
* @date Mar 28, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "saturn_ion.h"
void setSaturnIonEngineConfiguration(engine_configuration_s *engineConfiguration) {
engineConfiguration->trigger.type = TT_GM_7X;
}

View File

@ -1,25 +0,0 @@
/**
* @file saturn_ion.h
*
* @date Mar 28, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef SATURN_ION_H_
#define SATURN_ION_H_
#include "engine_configuration.h"
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
void setSaturnIonEngineConfiguration(engine_configuration_s *engineConfiguration);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SATURN_ION_H_ */

View File

@ -1,9 +0,0 @@
/**
* @file snow_blower.cpp
* @brief Default configuration of a single-cylinder engine
*
* @date Sep 9, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"

View File

@ -1,29 +0,0 @@
/**
* @file snow_blower.h
* @brief Default configuration of a single-cylinder engine
* @date Sep 8, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef SNOW_BLOWER_H_
#define SNOW_BLOWER_H_
#if EFI_ENGINE_SNOW_BLOWER
#define NUMBER_OF_CYLINDERS 1
#define EFI_ENGINE_ID "Snow Blower"
#define RPM_MULT (1)
#define getCoolantTemperature() 0
#define getIntakeAirTemperature() 0
#define getMaf() 0
#define getTPS() 0
#define getAfr() 0
#endif /* EFI_ENGINE_SNOW_BLOWER */
#endif /* SNOW_BLOWER_H_ */

View File

@ -1,25 +0,0 @@
/**
* @file subaru.cpp
*
* SUBARU_2003_WRX
* set_engine_type 22
*
* @date Sep 14, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "subaru.h"
#include "honda_accord.h"
EXTERN_ENGINE;
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_F) {
setFrankenso_01_LCD(boardConfiguration);
setFrankenso0_1_joystick(engineConfiguration);
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
engineConfiguration->trigger.customTotalToothCount = 5;
engineConfiguration->trigger.customSkippedToothCount = 1;
engineConfiguration->sensorChartFrequency = 2;
}

View File

@ -1,14 +0,0 @@
/**
* @file subaru.h
*
* @date Sep 14, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef SUBARU_H_
#define SUBARU_H_
#include "engine.h"
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_F);
#endif /* SUBARU_H_ */

View File

@ -1,53 +0,0 @@
/**
* @file test_engine.cpp
*
* set_engine_type 26
*
* @date Nov 14, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "engine.h"
#include "test_engine.h"
EXTERN_ENGINE;
void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
// setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
// engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
engineConfiguration->trigger.type = TT_ONE_PLUS_ONE;
trigger_config_s *triggerConfig = &engineConfiguration->trigger;
triggerConfig->customTotalToothCount = 60;
triggerConfig->customSkippedToothCount = 0;
engineConfiguration->useOnlyFrontForTrigger = true;
engineConfiguration->mafAdcChannel = EFI_ADC_NONE;
engineConfiguration->vbattAdcChannel = EFI_ADC_NONE;
setWholeIatCorrTimingTable(0 PASS_ENGINE_PARAMETER);
engineConfiguration->ignitionMode = IM_ONE_COIL;
setConstantDwell(3 PASS_ENGINE_PARAMETER); // 50% duty cycle @ 5000 rpm
board_configuration_s *bc = &engineConfiguration->bc;
bc->malfunctionIndicatorPin = GPIO_UNASSIGNED;
bc->ignitionPins[0] = GPIOC_7; // #1
bc->ignitionPins[1] = GPIO_UNASSIGNED; // #2
bc->ignitionPins[2] = GPIO_UNASSIGNED; // #3
bc->ignitionPins[3] = GPIO_UNASSIGNED; // #4
bc->ignitionPins[4] = GPIO_UNASSIGNED; // #5
bc->ignitionPins[5] = GPIO_UNASSIGNED; // #6
bc->logicAnalyzerPins[0] = GPIO_UNASSIGNED;
bc->logicAnalyzerPins[1] = GPIO_UNASSIGNED;
bc->logicAnalyzerPins[2] = GPIO_UNASSIGNED;
bc->logicAnalyzerPins[3] = GPIO_UNASSIGNED;
engineConfiguration->hasCltSensor = false;
engineConfiguration->hasIatSensor = false;
}

View File

@ -1,14 +0,0 @@
/**
* @file test_engine.h
*
* @date Nov 14, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef TEST_ENGINE_H_
#define TEST_ENGINE_H_
#include "engine_configuration.h"
void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_F);
#endif /* TEST_ENGINE_H_ */

View File

@ -1,58 +0,0 @@
/*
* @file vw.cpp
*
* set_engine_type 32
*
* @date May 24, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#include "vw.h"
#include "custom_engine.h"
#include "ego.h"
EXTERN_ENGINE;
void setVwAba(DECLARE_ENGINE_PARAMETER_F) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_F);
setWholeTimingTable(20 PASS_ENGINE_PARAMETER);
engineConfiguration->cranking.baseFuel = 12;
// set_cranking_timing_angle 0
engineConfiguration->crankingTimingAngle = 20;
// set_whole_fuel_map 12
setWholeFuelMap(12 PASS_ENGINE_PARAMETER);
// set_global_trigger_offset_angle 90
engineConfiguration->globalTriggerAngleOffset = 90;
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
// engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
engineConfiguration->trigger.type = TT_60_2_VW;
engineConfiguration->mafAdcChannel = EFI_ADC_1;
//Base engine setting
engineConfiguration->specs.cylindersCount = 4;
engineConfiguration->specs.displacement = 2.5;
engineConfiguration->injector.flow = 320; // 30lb/h
// set_algorithm 3
engineConfiguration->algorithm = LM_SPEED_DENSITY;
engineConfiguration->map.sensor.type = MT_GM_3_BAR;
engineConfiguration->ignitionMode = IM_ONE_COIL;
boardConfiguration->ignitionPins[0] = GPIOE_14; // Frankenso high side - pin 1G
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPinMode = OM_DEFAULT;
setEgoSensor(ES_PLX PASS_ENGINE_PARAMETER);
}

View File

@ -1,15 +0,0 @@
/*
* @file vw.h
*
* @date May 24, 2015
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef CONFIG_ENGINES_VW_H_
#define CONFIG_ENGINES_VW_H_
#include "engine.h"
void setVwAba(DECLARE_ENGINE_PARAMETER_F);
#endif /* CONFIG_ENGINES_VW_H_ */

View File

@ -1,149 +0,0 @@
/*
ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
* ST32F051x8 memory setup.
*/
__main_stack_size__ = 0x0400;
__process_stack_size__ = 0x0400;
MEMORY
{
flash : org = 0x08000000, len = 64k
ram : org = 0x20000000, len = 8k
}
__ram_start__ = ORIGIN(ram);
__ram_size__ = LENGTH(ram);
__ram_end__ = __ram_start__ + __ram_size__;
ENTRY(ResetHandler)
SECTIONS
{
. = 0;
_text = .;
startup : ALIGN(16) SUBALIGN(16)
{
KEEP(*(vectors))
} > flash
constructors : ALIGN(4) SUBALIGN(4)
{
PROVIDE(__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE(__init_array_end = .);
} > flash
destructors : ALIGN(4) SUBALIGN(4)
{
PROVIDE(__fini_array_start = .);
KEEP(*(.fini_array))
KEEP(*(SORT(.fini_array.*)))
PROVIDE(__fini_array_end = .);
} > flash
.text : ALIGN(16) SUBALIGN(16)
{
*(.text.startup.*)
*(.text)
*(.text.*)
*(.rodata)
*(.rodata.*)
*(.glue_7t)
*(.glue_7)
*(.gcc*)
} > flash
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > flash
.ARM.exidx : {
PROVIDE(__exidx_start = .);
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
PROVIDE(__exidx_end = .);
} > flash
.eh_frame_hdr :
{
*(.eh_frame_hdr)
} > flash
.eh_frame : ONLY_IF_RO
{
*(.eh_frame)
} > flash
.textalign : ONLY_IF_RO
{
. = ALIGN(8);
} > flash
. = ALIGN(4);
_etext = .;
_textdata = _etext;
.stacks :
{
. = ALIGN(8);
__main_stack_base__ = .;
. += __main_stack_size__;
. = ALIGN(8);
__main_stack_end__ = .;
__process_stack_base__ = .;
__main_thread_stack_base__ = .;
. += __process_stack_size__;
. = ALIGN(8);
__process_stack_end__ = .;
__main_thread_stack_end__ = .;
} > ram
.data :
{
. = ALIGN(4);
PROVIDE(_data = .);
*(.data)
. = ALIGN(4);
*(.data.*)
. = ALIGN(4);
*(.ramtext)
. = ALIGN(4);
PROVIDE(_edata = .);
} > ram AT > flash
.bss :
{
. = ALIGN(4);
PROVIDE(_bss_start = .);
*(.bss)
. = ALIGN(4);
*(.bss.*)
. = ALIGN(4);
*(COMMON)
. = ALIGN(4);
PROVIDE(_bss_end = .);
} > ram
}
PROVIDE(end = .);
_end = .;
__heap_base__ = _end;
__heap_end__ = __ram_end__;

View File

@ -1,534 +0,0 @@
/*
ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* @file templates/chconf.h
* @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config
* @details Kernel related settings and hooks.
* @{
*/
#ifndef _CHCONF_H_
#define _CHCONF_H_
#define ON_LOCK_HOOK
#define ON_UNLOCK_HOOK
/*===========================================================================*/
/**
* @name Kernel parameters and options
* @{
*/
/*===========================================================================*/
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
#if !defined(CH_FREQUENCY) || defined(__DOXYGEN__)
#define CH_FREQUENCY 1000
#endif
/**
* @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero
* disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
*
* @note Disabling the round robin preemption makes the kernel more compact
* and generally faster.
*/
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20
#endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_USE_MEMCORE.
*/
#if !defined(CH_MEMCORE_SIZE) || defined(__DOXYGEN__)
#define CH_MEMCORE_SIZE 0
#endif
/**
* @brief Idle thread automatic spawn suppression.
* @details When this option is activated the function @p chSysInit()
* does not spawn the idle thread automatically. The application has
* then the responsibility to do one of the following:
* - Spawn a custom idle thread at priority @p IDLEPRIO.
* - Change the main() thread priority to @p IDLEPRIO then enter
* an endless loop. In this scenario the @p main() thread acts as
* the idle thread.
* .
* @note Unless an idle thread is spawned the @p main() thread must not
* enter a sleep state.
*/
#if !defined(CH_NO_IDLE_THREAD) || defined(__DOXYGEN__)
#define CH_NO_IDLE_THREAD FALSE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Performance options
* @{
*/
/*===========================================================================*/
/**
* @brief OS optimization.
* @details If enabled then time efficient rather than space efficient code
* is used when two possible implementations exist.
*
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
#if !defined(CH_OPTIMIZE_SPEED) || defined(__DOXYGEN__)
#define CH_OPTIMIZE_SPEED TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Subsystem options
* @{
*/
/*===========================================================================*/
/**
* @brief Threads registry APIs.
* @details If enabled then the registry APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_REGISTRY) || defined(__DOXYGEN__)
#define CH_USE_REGISTRY TRUE
#endif
/**
* @brief Threads synchronization APIs.
* @details If enabled then the @p chThdWait() function is included in
* the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_WAITEXIT) || defined(__DOXYGEN__)
#define CH_USE_WAITEXIT TRUE
#endif
/**
* @brief Semaphores APIs.
* @details If enabled then the Semaphores APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_SEMAPHORES) || defined(__DOXYGEN__)
#define CH_USE_SEMAPHORES TRUE
#endif
/**
* @brief Semaphores queuing mode.
* @details If enabled then the threads are enqueued on semaphores by
* priority rather than in FIFO order.
*
* @note The default is @p FALSE. Enable this if you have special requirements.
* @note Requires @p CH_USE_SEMAPHORES.
*/
#if !defined(CH_USE_SEMAPHORES_PRIORITY) || defined(__DOXYGEN__)
#define CH_USE_SEMAPHORES_PRIORITY FALSE
#endif
/**
* @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_SEMAPHORES.
*/
#if !defined(CH_USE_SEMSW) || defined(__DOXYGEN__)
#define CH_USE_SEMSW TRUE
#endif
/**
* @brief Mutexes APIs.
* @details If enabled then the mutexes APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_MUTEXES) || defined(__DOXYGEN__)
#define CH_USE_MUTEXES TRUE
#endif
/**
* @brief Conditional Variables APIs.
* @details If enabled then the conditional variables APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MUTEXES.
*/
#if !defined(CH_USE_CONDVARS) || defined(__DOXYGEN__)
#define CH_USE_CONDVARS TRUE
#endif
/**
* @brief Conditional Variables APIs with timeout.
* @details If enabled then the conditional variables APIs with timeout
* specification are included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_CONDVARS.
*/
#if !defined(CH_USE_CONDVARS_TIMEOUT) || defined(__DOXYGEN__)
#define CH_USE_CONDVARS_TIMEOUT TRUE
#endif
/**
* @brief Events Flags APIs.
* @details If enabled then the event flags APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_EVENTS) || defined(__DOXYGEN__)
#define CH_USE_EVENTS TRUE
#endif
/**
* @brief Events Flags APIs with timeout.
* @details If enabled then the events APIs with timeout specification
* are included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_EVENTS.
*/
#if !defined(CH_USE_EVENTS_TIMEOUT) || defined(__DOXYGEN__)
#define CH_USE_EVENTS_TIMEOUT TRUE
#endif
/**
* @brief Synchronous Messages APIs.
* @details If enabled then the synchronous messages APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_MESSAGES) || defined(__DOXYGEN__)
#define CH_USE_MESSAGES TRUE
#endif
/**
* @brief Synchronous Messages queuing mode.
* @details If enabled then messages are served by priority rather than in
* FIFO order.
*
* @note The default is @p FALSE. Enable this if you have special requirements.
* @note Requires @p CH_USE_MESSAGES.
*/
#if !defined(CH_USE_MESSAGES_PRIORITY) || defined(__DOXYGEN__)
#define CH_USE_MESSAGES_PRIORITY FALSE
#endif
/**
* @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are
* included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_SEMAPHORES.
*/
#if !defined(CH_USE_MAILBOXES) || defined(__DOXYGEN__)
#define CH_USE_MAILBOXES TRUE
#endif
/**
* @brief I/O Queues APIs.
* @details If enabled then the I/O queues APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_QUEUES) || defined(__DOXYGEN__)
#define CH_USE_QUEUES TRUE
#endif
/**
* @brief Core Memory Manager APIs.
* @details If enabled then the core memory manager APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_MEMCORE) || defined(__DOXYGEN__)
#define CH_USE_MEMCORE TRUE
#endif
/**
* @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MEMCORE and either @p CH_USE_MUTEXES or
* @p CH_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
#if !defined(CH_USE_HEAP) || defined(__DOXYGEN__)
#define CH_USE_HEAP FALSE
#endif
/**
* @brief C-runtime allocator.
* @details If enabled the the heap allocator APIs just wrap the C-runtime
* @p malloc() and @p free() functions.
*
* @note The default is @p FALSE.
* @note Requires @p CH_USE_HEAP.
* @note The C-runtime may or may not require @p CH_USE_MEMCORE, see the
* appropriate documentation.
*/
#if !defined(CH_USE_MALLOC_HEAP) || defined(__DOXYGEN__)
#define CH_USE_MALLOC_HEAP FALSE
#endif
/**
* @brief Memory Pools Allocator APIs.
* @details If enabled then the memory pools allocator APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_MEMPOOLS) || defined(__DOXYGEN__)
#define CH_USE_MEMPOOLS TRUE
#endif
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Debug options
* @{
*/
/*===========================================================================*/
/**
* @brief Debug option, system state check.
* @details If enabled the correct call protocol for system APIs is checked
* at runtime.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
#endif
/**
* @brief Debug option, parameters checks.
* @details If enabled then the checks on the API functions input
* parameters are activated.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_CHECKS) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_CHECKS FALSE
#endif
/**
* @brief Debug option, consistency checks.
* @details If enabled then all the assertions in the kernel code are
* activated. This includes consistency checks inside the kernel,
* runtime anomalies and port-defined checks.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_ASSERTS) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_ASSERTS FALSE
#endif
/**
* @brief Debug option, trace buffer.
* @details If enabled then the context switch circular trace buffer is
* activated.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_TRACE) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_TRACE FALSE
#endif
/**
* @brief Debug option, stack checks.
* @details If enabled then a runtime stack check is performed.
*
* @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way.
* It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
#endif
/**
* @brief Debug option, stacks initialization.
* @details If enabled then the threads working area is filled with a byte
* value when a thread is created. This can be useful for the
* runtime measurement of the used stack.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_FILL_THREADS) || defined(__DOXYGEN__)
#define CH_DBG_FILL_THREADS FALSE
#endif
/**
* @brief Debug option, threads profiling.
* @details If enabled then a field is added to the @p Thread structure that
* counts the system ticks occurred while executing the thread.
*
* @note The default is @p TRUE.
* @note This debug option is defaulted to TRUE because it is required by
* some test cases into the test suite.
*/
#if !defined(CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__)
#define CH_DBG_THREADS_PROFILING TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Kernel hooks
* @{
*/
/*===========================================================================*/
/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p Thread structure.
*/
#if !defined(THREAD_EXT_FIELDS) || defined(__DOXYGEN__)
#define THREAD_EXT_FIELDS \
/* Add threads custom fields here.*/
#endif
/**
* @brief Threads initialization hook.
* @details User initialization code added to the @p chThdInit() API.
*
* @note It is invoked from within @p chThdInit() and implicitly from all
* the threads creation APIs.
*/
#if !defined(THREAD_EXT_INIT_HOOK) || defined(__DOXYGEN__)
#define THREAD_EXT_INIT_HOOK(tp) { \
/* Add threads initialization code here.*/ \
}
#endif
/**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
*
* @note It is inserted into lock zone.
* @note It is also invoked when the threads simply return in order to
* terminate.
*/
#if !defined(THREAD_EXT_EXIT_HOOK) || defined(__DOXYGEN__)
#define THREAD_EXT_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
}
#endif
/**
* @brief Context switch hook.
* @details This hook is invoked just before switching between threads.
*/
#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__)
#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \
/* System halt code here.*/ \
}
#endif
/**
* @brief Idle Loop hook.
* @details This hook is continuously invoked by the idle thread loop.
*/
#if !defined(IDLE_LOOP_HOOK) || defined(__DOXYGEN__)
#define IDLE_LOOP_HOOK() { \
/* Idle loop code here.*/ \
}
#endif
/**
* @brief System tick event hook.
* @details This hook is invoked in the system tick handler immediately
* after processing the virtual timers queue.
*/
#if !defined(SYSTEM_TICK_EVENT_HOOK) || defined(__DOXYGEN__)
#define SYSTEM_TICK_EVENT_HOOK() { \
/* System tick event code here.*/ \
}
#endif
/**
* @brief System halt hook.
* @details This hook is invoked in case to a system halting error before
* the system is halted.
*/
#if !defined(SYSTEM_HALT_HOOK) || defined(__DOXYGEN__)
#define SYSTEM_HALT_HOOK() { \
/* System halt code here.*/ \
}
#endif
/** @} */
/*===========================================================================*/
/* Port-specific settings (override port settings defaulted in chcore.h). */
/*===========================================================================*/
#endif /* _CHCONF_H_ */
/** @} */

View File

@ -1,63 +0,0 @@
/**
* @file efifeatures.h
*
* @brief In this header we can configure which modules are used for EGT2CAN firmware.
*
* @date Dec 23, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef EFIFEATURES_H_
#define EFIFEATURES_H_
#define DL_OUTPUT_BUFFER 128
#define hal_lld_get_counter_value() DWT_CYCCNT
#define EFI_USE_UART_FOR_CONSOLE TRUE
#define EFI_CONSOLE_UART_DEVICE (&SD1)
#define EFI_CONSOLE_TX_PORT GPIOC
#define EFI_CONSOLE_TX_PIN 10
#define EFI_CONSOLE_RX_PORT GPIOC
#define EFI_CONSOLE_RX_PIN 11
#define EFI_CONSOLE_AF 7
#define LED_ERROR_PORT GPIOD
#define LED_ERROR_PIN 3
#define LED_COMMUNICATION_PORT GPIOD
#define LED_COMMUNICATION_PIN 4
#define SERIAL_SPEED 115200
/**
* This macros is used to hide pieces of the code from unit tests, so it only makes sense in folders exposed to the tests project.
* This macros is NOT about taking out logging in general.
*/
#define EFI_PROD_CODE FALSE
#define CCM_OPTIONAL
#define EFI_EGT TRUE
#define EFI_UNIT_TEST FALSE
#define CONSOLE_MODE_SWITCH_PORT GPIOB
#define CONSOLE_MODE_SWITCH_PIN 1
#define EFI_MAX_31855 TRUE
#define CONSOLE_MAX_ACTIONS 32
#define CONFIG_RESET_SWITCH_PORT GPIOD
#define CONFIG_RESET_SWITCH_PIN 6
/**
* This is the size of the MemoryStream used by chvprintf
*/
#define INTERMEDIATE_LOGGING_BUFFER_SIZE 256
#endif /* EFIFEATURES_H_ */

View File

@ -1,9 +0,0 @@
#define EXTERN_ENGINE
// this stuff is about ChibiOS 2.6 > Migration
typedef VirtualTimer virtual_timer_t;
typedef EventListener event_listener_t;
typedef Thread thread_t;
#define THD_WORKING_AREA WORKING_AREA

View File

@ -1,312 +0,0 @@
/*
ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* @file templates/halconf.h
* @brief HAL configuration header.
* @details HAL configuration file, this file allows to enable or disable the
* various device drivers from your application. You may also use
* this file in order to override the device drivers default settings.
*
* @addtogroup HAL_CONF
* @{
*/
#ifndef _HALCONF_H_
#define _HALCONF_H_
#include "mcuconf.h"
/**
* @brief Enables the TM subsystem.
*/
#if !defined(HAL_USE_TM) || defined(__DOXYGEN__)
#define HAL_USE_TM FALSE
#endif
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
#define HAL_USE_CAN FALSE
#endif
/**
* @brief Enables the EXT subsystem.
*/
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
#define HAL_USE_EXT FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
#define HAL_USE_MAC FALSE
#endif
/**
* @brief Enables the MMC_SPI subsystem.
*/
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL TRUE
#endif
/**
* @brief Enables the SERIAL over USB subsystem.
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL_USB FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
#define HAL_USE_SPI TRUE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
#define HAL_USE_USB FALSE
#endif
/*===========================================================================*/
/* ADC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
#define ADC_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
/* CAN driver related settings. */
/*===========================================================================*/
/**
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
#define CAN_USE_SLEEP_MODE TRUE
#endif
/*===========================================================================*/
/* I2C driver related settings. */
/*===========================================================================*/
/**
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
/* MAC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables an event sources for incoming packets.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
#define MAC_USE_ZERO_COPY FALSE
#endif
/**
* @brief Enables an event sources for incoming packets.
*/
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
/* MMC_SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
* This option is recommended also if the SPI driver does not
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
/* SDC driver related settings. */
/*===========================================================================*/
/**
* @brief Number of initialization attempts before rejecting the card.
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
#define SDC_INIT_RETRY 100
#endif
/**
* @brief Include support for MMC cards.
* @note MMC support is not yet implemented so this option must be kept
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
#define SDC_MMC_SUPPORT FALSE
#endif
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
/* SERIAL driver related settings. */
/*===========================================================================*/
/**
* @brief Default bit rate.
* @details Configuration parameter, this is the baud rate selected for the
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
* @brief Serial buffers size.
* @details Configuration parameter, you can change the depth of the queue
* buffers depending on the requirements of your application.
* @note The default is 64 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
/* SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
#define SPI_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define SPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* _HALCONF_H_ */
/** @} */

View File

@ -1,149 +0,0 @@
/*
ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
* STM32F0xx drivers configuration.
* The following settings override the default settings present in
* the various device driver implementation headers.
* Note that the settings for each driver only have effect if the whole
* driver is enabled in halconf.h.
*
* IRQ priorities:
* 3...0 Lowest...Highest.
*
* DMA priorities:
* 0...3 Lowest...Highest.
*/
#define STM32F0xx_MCUCONF
/*
* HAL driver system settings.
*/
#define STM32_NO_INIT FALSE
#define STM32_PVD_ENABLE FALSE
#define STM32_PLS STM32_PLS_LEV0
#define STM32_HSI_ENABLED TRUE
#define STM32_HSI14_ENABLED TRUE
#define STM32_LSI_ENABLED TRUE
#define STM32_HSE_ENABLED FALSE
#define STM32_LSE_ENABLED FALSE
#define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSI
#define STM32_PREDIV_VALUE 1
#define STM32_PLLMUL_VALUE 12
#define STM32_HPRE STM32_HPRE_DIV1
#define STM32_PPRE STM32_PPRE_DIV1
#define STM32_ADCSW STM32_ADCSW_HSI14
#define STM32_ADCPRE STM32_ADCPRE_DIV4
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
#define STM32_ADCPRE STM32_ADCPRE_DIV4
#define STM32_ADCSW STM32_ADCSW_HSI14
#define STM32_CECSW STM32_CECSW_HSI
#define STM32_I2C1SW STM32_I2C1SW_HSI
#define STM32_USART1SW STM32_USART1SW_PCLK
#define STM32_RTCSEL STM32_RTCSEL_LSI
/*
* ADC driver system settings.
*/
#define STM32_ADC_USE_ADC1 FALSE
#define STM32_ADC_ADC1_DMA_PRIORITY 2
#define STM32_ADC_IRQ_PRIORITY 2
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2
/*
* EXT driver system settings.
*/
#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3
#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3
#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3
#define STM32_EXT_EXTI16_IRQ_PRIORITY 3
#define STM32_EXT_EXTI17_IRQ_PRIORITY 3
/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
#define STM32_GPT_USE_TIM2 FALSE
#define STM32_GPT_USE_TIM3 FALSE
#define STM32_GPT_USE_TIM14 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 2
#define STM32_GPT_TIM2_IRQ_PRIORITY 2
#define STM32_GPT_TIM3_IRQ_PRIORITY 2
#define STM32_GPT_TIM14_IRQ_PRIORITY 2
/*
* I2C driver system settings.
*/
#define STM32_I2C_USE_I2C1 FALSE
#define STM32_I2C_USE_I2C2 FALSE
#define STM32_I2C_I2C1_IRQ_PRIORITY 3
#define STM32_I2C_I2C2_IRQ_PRIORITY 3
#define STM32_I2C_I2C1_DMA_PRIORITY 1
#define STM32_I2C_I2C2_DMA_PRIORITY 1
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) chSysHalt()
/*
* ICU driver system settings.
*/
#define STM32_ICU_USE_TIM1 FALSE
#define STM32_ICU_USE_TIM2 FALSE
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 3
#define STM32_ICU_TIM2_IRQ_PRIORITY 3
#define STM32_ICU_TIM3_IRQ_PRIORITY 3
/*
* PWM driver system settings.
*/
#define STM32_PWM_USE_ADVANCED FALSE
#define STM32_PWM_USE_TIM1 FALSE
#define STM32_PWM_USE_TIM2 FALSE
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 3
#define STM32_PWM_TIM2_IRQ_PRIORITY 3
#define STM32_PWM_TIM3_IRQ_PRIORITY 3
/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 TRUE
#define STM32_SERIAL_USE_USART2 FALSE
#define STM32_SERIAL_USART1_PRIORITY 3
#define STM32_SERIAL_USART2_PRIORITY 3
/*
* SPI driver system settings.
*/
#define STM32_SPI_USE_SPI1 TRUE
#define STM32_SPI_USE_SPI2 FALSE
#define STM32_SPI_SPI1_DMA_PRIORITY 1
#define STM32_SPI_SPI2_DMA_PRIORITY 1
#define STM32_SPI_SPI1_IRQ_PRIORITY 2
#define STM32_SPI_SPI2_IRQ_PRIORITY 2
#define STM32_SPI_DMA_ERROR_HOOK(spip) chSysHalt()
/*
* UART driver system settings.
*/
#define STM32_UART_USE_USART1 FALSE
#define STM32_UART_USE_USART2 FALSE
#define STM32_UART_USART1_IRQ_PRIORITY 3
#define STM32_UART_USART2_IRQ_PRIORITY 3
#define STM32_UART_USART1_DMA_PRIORITY 0
#define STM32_UART_USART2_DMA_PRIORITY 0
#define STM32_UART_DMA_ERROR_HOOK(uartp) chSysHalt()

View File

@ -1,3 +0,0 @@
#define baseHardwareInit() {}

View File

@ -1,149 +0,0 @@
/*
ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
* ST32F103xB memory setup.
*/
__main_stack_size__ = 0x0400;
__process_stack_size__ = 0x0400;
MEMORY
{
flash : org = 0x08000000, len = 128k
ram : org = 0x20000000, len = 20k
}
__ram_start__ = ORIGIN(ram);
__ram_size__ = LENGTH(ram);
__ram_end__ = __ram_start__ + __ram_size__;
ENTRY(ResetHandler)
SECTIONS
{
. = 0;
_text = .;
startup : ALIGN(16) SUBALIGN(16)
{
KEEP(*(vectors))
} > flash
constructors : ALIGN(4) SUBALIGN(4)
{
PROVIDE(__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE(__init_array_end = .);
} > flash
destructors : ALIGN(4) SUBALIGN(4)
{
PROVIDE(__fini_array_start = .);
KEEP(*(.fini_array))
KEEP(*(SORT(.fini_array.*)))
PROVIDE(__fini_array_end = .);
} > flash
.text : ALIGN(16) SUBALIGN(16)
{
*(.text.startup.*)
*(.text)
*(.text.*)
*(.rodata)
*(.rodata.*)
*(.glue_7t)
*(.glue_7)
*(.gcc*)
} > flash
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > flash
.ARM.exidx : {
PROVIDE(__exidx_start = .);
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
PROVIDE(__exidx_end = .);
} > flash
.eh_frame_hdr :
{
*(.eh_frame_hdr)
} > flash
.eh_frame : ONLY_IF_RO
{
*(.eh_frame)
} > flash
.textalign : ONLY_IF_RO
{
. = ALIGN(8);
} > flash
. = ALIGN(4);
_etext = .;
_textdata = _etext;
.stacks :
{
. = ALIGN(8);
__main_stack_base__ = .;
. += __main_stack_size__;
. = ALIGN(8);
__main_stack_end__ = .;
__process_stack_base__ = .;
__main_thread_stack_base__ = .;
. += __process_stack_size__;
. = ALIGN(8);
__process_stack_end__ = .;
__main_thread_stack_end__ = .;
} > ram
.data :
{
. = ALIGN(4);
PROVIDE(_data = .);
*(.data)
. = ALIGN(4);
*(.data.*)
. = ALIGN(4);
*(.ramtext)
. = ALIGN(4);
PROVIDE(_edata = .);
} > ram AT > flash
.bss :
{
. = ALIGN(4);
PROVIDE(_bss_start = .);
*(.bss)
. = ALIGN(4);
*(.bss.*)
. = ALIGN(4);
*(COMMON)
. = ALIGN(4);
PROVIDE(_bss_end = .);
} > ram
}
PROVIDE(end = .);
_end = .;
__heap_base__ = _end;
__heap_end__ = __ram_end__;

View File

@ -1,534 +0,0 @@
/*
ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* @file templates/chconf.h
* @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config
* @details Kernel related settings and hooks.
* @{
*/
#ifndef _CHCONF_H_
#define _CHCONF_H_
#define ON_LOCK_HOOK
#define ON_UNLOCK_HOOK
/*===========================================================================*/
/**
* @name Kernel parameters and options
* @{
*/
/*===========================================================================*/
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
#if !defined(CH_FREQUENCY) || defined(__DOXYGEN__)
#define CH_FREQUENCY 1000
#endif
/**
* @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero
* disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
*
* @note Disabling the round robin preemption makes the kernel more compact
* and generally faster.
*/
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20
#endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_USE_MEMCORE.
*/
#if !defined(CH_MEMCORE_SIZE) || defined(__DOXYGEN__)
#define CH_MEMCORE_SIZE 0
#endif
/**
* @brief Idle thread automatic spawn suppression.
* @details When this option is activated the function @p chSysInit()
* does not spawn the idle thread automatically. The application has
* then the responsibility to do one of the following:
* - Spawn a custom idle thread at priority @p IDLEPRIO.
* - Change the main() thread priority to @p IDLEPRIO then enter
* an endless loop. In this scenario the @p main() thread acts as
* the idle thread.
* .
* @note Unless an idle thread is spawned the @p main() thread must not
* enter a sleep state.
*/
#if !defined(CH_NO_IDLE_THREAD) || defined(__DOXYGEN__)
#define CH_NO_IDLE_THREAD FALSE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Performance options
* @{
*/
/*===========================================================================*/
/**
* @brief OS optimization.
* @details If enabled then time efficient rather than space efficient code
* is used when two possible implementations exist.
*
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
#if !defined(CH_OPTIMIZE_SPEED) || defined(__DOXYGEN__)
#define CH_OPTIMIZE_SPEED TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Subsystem options
* @{
*/
/*===========================================================================*/
/**
* @brief Threads registry APIs.
* @details If enabled then the registry APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_REGISTRY) || defined(__DOXYGEN__)
#define CH_USE_REGISTRY TRUE
#endif
/**
* @brief Threads synchronization APIs.
* @details If enabled then the @p chThdWait() function is included in
* the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_WAITEXIT) || defined(__DOXYGEN__)
#define CH_USE_WAITEXIT TRUE
#endif
/**
* @brief Semaphores APIs.
* @details If enabled then the Semaphores APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_SEMAPHORES) || defined(__DOXYGEN__)
#define CH_USE_SEMAPHORES TRUE
#endif
/**
* @brief Semaphores queuing mode.
* @details If enabled then the threads are enqueued on semaphores by
* priority rather than in FIFO order.
*
* @note The default is @p FALSE. Enable this if you have special requirements.
* @note Requires @p CH_USE_SEMAPHORES.
*/
#if !defined(CH_USE_SEMAPHORES_PRIORITY) || defined(__DOXYGEN__)
#define CH_USE_SEMAPHORES_PRIORITY FALSE
#endif
/**
* @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_SEMAPHORES.
*/
#if !defined(CH_USE_SEMSW) || defined(__DOXYGEN__)
#define CH_USE_SEMSW TRUE
#endif
/**
* @brief Mutexes APIs.
* @details If enabled then the mutexes APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_MUTEXES) || defined(__DOXYGEN__)
#define CH_USE_MUTEXES TRUE
#endif
/**
* @brief Conditional Variables APIs.
* @details If enabled then the conditional variables APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MUTEXES.
*/
#if !defined(CH_USE_CONDVARS) || defined(__DOXYGEN__)
#define CH_USE_CONDVARS TRUE
#endif
/**
* @brief Conditional Variables APIs with timeout.
* @details If enabled then the conditional variables APIs with timeout
* specification are included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_CONDVARS.
*/
#if !defined(CH_USE_CONDVARS_TIMEOUT) || defined(__DOXYGEN__)
#define CH_USE_CONDVARS_TIMEOUT TRUE
#endif
/**
* @brief Events Flags APIs.
* @details If enabled then the event flags APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_EVENTS) || defined(__DOXYGEN__)
#define CH_USE_EVENTS TRUE
#endif
/**
* @brief Events Flags APIs with timeout.
* @details If enabled then the events APIs with timeout specification
* are included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_EVENTS.
*/
#if !defined(CH_USE_EVENTS_TIMEOUT) || defined(__DOXYGEN__)
#define CH_USE_EVENTS_TIMEOUT TRUE
#endif
/**
* @brief Synchronous Messages APIs.
* @details If enabled then the synchronous messages APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_MESSAGES) || defined(__DOXYGEN__)
#define CH_USE_MESSAGES TRUE
#endif
/**
* @brief Synchronous Messages queuing mode.
* @details If enabled then messages are served by priority rather than in
* FIFO order.
*
* @note The default is @p FALSE. Enable this if you have special requirements.
* @note Requires @p CH_USE_MESSAGES.
*/
#if !defined(CH_USE_MESSAGES_PRIORITY) || defined(__DOXYGEN__)
#define CH_USE_MESSAGES_PRIORITY FALSE
#endif
/**
* @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are
* included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_SEMAPHORES.
*/
#if !defined(CH_USE_MAILBOXES) || defined(__DOXYGEN__)
#define CH_USE_MAILBOXES TRUE
#endif
/**
* @brief I/O Queues APIs.
* @details If enabled then the I/O queues APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_QUEUES) || defined(__DOXYGEN__)
#define CH_USE_QUEUES TRUE
#endif
/**
* @brief Core Memory Manager APIs.
* @details If enabled then the core memory manager APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_MEMCORE) || defined(__DOXYGEN__)
#define CH_USE_MEMCORE TRUE
#endif
/**
* @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MEMCORE and either @p CH_USE_MUTEXES or
* @p CH_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
#if !defined(CH_USE_HEAP) || defined(__DOXYGEN__)
#define CH_USE_HEAP TRUE
#endif
/**
* @brief C-runtime allocator.
* @details If enabled the the heap allocator APIs just wrap the C-runtime
* @p malloc() and @p free() functions.
*
* @note The default is @p FALSE.
* @note Requires @p CH_USE_HEAP.
* @note The C-runtime may or may not require @p CH_USE_MEMCORE, see the
* appropriate documentation.
*/
#if !defined(CH_USE_MALLOC_HEAP) || defined(__DOXYGEN__)
#define CH_USE_MALLOC_HEAP FALSE
#endif
/**
* @brief Memory Pools Allocator APIs.
* @details If enabled then the memory pools allocator APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_MEMPOOLS) || defined(__DOXYGEN__)
#define CH_USE_MEMPOOLS TRUE
#endif
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Debug options
* @{
*/
/*===========================================================================*/
/**
* @brief Debug option, system state check.
* @details If enabled the correct call protocol for system APIs is checked
* at runtime.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
#endif
/**
* @brief Debug option, parameters checks.
* @details If enabled then the checks on the API functions input
* parameters are activated.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_CHECKS) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_CHECKS FALSE
#endif
/**
* @brief Debug option, consistency checks.
* @details If enabled then all the assertions in the kernel code are
* activated. This includes consistency checks inside the kernel,
* runtime anomalies and port-defined checks.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_ASSERTS) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_ASSERTS FALSE
#endif
/**
* @brief Debug option, trace buffer.
* @details If enabled then the context switch circular trace buffer is
* activated.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_TRACE) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_TRACE FALSE
#endif
/**
* @brief Debug option, stack checks.
* @details If enabled then a runtime stack check is performed.
*
* @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way.
* It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
#endif
/**
* @brief Debug option, stacks initialization.
* @details If enabled then the threads working area is filled with a byte
* value when a thread is created. This can be useful for the
* runtime measurement of the used stack.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_FILL_THREADS) || defined(__DOXYGEN__)
#define CH_DBG_FILL_THREADS FALSE
#endif
/**
* @brief Debug option, threads profiling.
* @details If enabled then a field is added to the @p Thread structure that
* counts the system ticks occurred while executing the thread.
*
* @note The default is @p TRUE.
* @note This debug option is defaulted to TRUE because it is required by
* some test cases into the test suite.
*/
#if !defined(CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__)
#define CH_DBG_THREADS_PROFILING TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Kernel hooks
* @{
*/
/*===========================================================================*/
/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p Thread structure.
*/
#if !defined(THREAD_EXT_FIELDS) || defined(__DOXYGEN__)
#define THREAD_EXT_FIELDS \
/* Add threads custom fields here.*/
#endif
/**
* @brief Threads initialization hook.
* @details User initialization code added to the @p chThdInit() API.
*
* @note It is invoked from within @p chThdInit() and implicitly from all
* the threads creation APIs.
*/
#if !defined(THREAD_EXT_INIT_HOOK) || defined(__DOXYGEN__)
#define THREAD_EXT_INIT_HOOK(tp) { \
/* Add threads initialization code here.*/ \
}
#endif
/**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
*
* @note It is inserted into lock zone.
* @note It is also invoked when the threads simply return in order to
* terminate.
*/
#if !defined(THREAD_EXT_EXIT_HOOK) || defined(__DOXYGEN__)
#define THREAD_EXT_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
}
#endif
/**
* @brief Context switch hook.
* @details This hook is invoked just before switching between threads.
*/
#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__)
#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \
/* System halt code here.*/ \
}
#endif
/**
* @brief Idle Loop hook.
* @details This hook is continuously invoked by the idle thread loop.
*/
#if !defined(IDLE_LOOP_HOOK) || defined(__DOXYGEN__)
#define IDLE_LOOP_HOOK() { \
/* Idle loop code here.*/ \
}
#endif
/**
* @brief System tick event hook.
* @details This hook is invoked in the system tick handler immediately
* after processing the virtual timers queue.
*/
#if !defined(SYSTEM_TICK_EVENT_HOOK) || defined(__DOXYGEN__)
#define SYSTEM_TICK_EVENT_HOOK() { \
/* System tick event code here.*/ \
}
#endif
/**
* @brief System halt hook.
* @details This hook is invoked in case to a system halting error before
* the system is halted.
*/
#if !defined(SYSTEM_HALT_HOOK) || defined(__DOXYGEN__)
#define SYSTEM_HALT_HOOK() { \
/* System halt code here.*/ \
}
#endif
/** @} */
/*===========================================================================*/
/* Port-specific settings (override port settings defaulted in chcore.h). */
/*===========================================================================*/
#endif /* _CHCONF_H_ */
/** @} */

View File

@ -1,63 +0,0 @@
/**
* @file efifeatures.h
*
* @brief In this header we can configure which modules are used for EGT2CAN firmware.
*
* @date Dec 23, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef EFIFEATURES_H_
#define EFIFEATURES_H_
#define DL_OUTPUT_BUFFER 128
#define EFI_USB_SERIAL TRUE
#define hal_lld_get_counter_value() DWT_CYCCNT
#define EFI_USE_UART_FOR_CONSOLE FALSE
#define EFI_CONSOLE_TX_PORT GPIOC
#define EFI_CONSOLE_TX_PIN 10
#define EFI_CONSOLE_RX_PORT GPIOC
#define EFI_CONSOLE_RX_PIN 11
#define EFI_CONSOLE_AF 7
#define LED_ERROR_PORT GPIOD
#define LED_ERROR_PIN 3
#define LED_COMMUNICATION_PORT GPIOD
#define LED_COMMUNICATION_PIN 4
#define SERIAL_SPEED 115200
/**
* This macros is used to hide pieces of the code from unit tests, so it only makes sense in folders exposed to the tests project.
* This macros is NOT about taking out logging in general.
*/
#define EFI_PROD_CODE FALSE
#define CCM_OPTIONAL
#define EFI_EGT TRUE
#define EFI_UNIT_TEST FALSE
#define CONSOLE_MODE_SWITCH_PORT GPIOB
#define CONSOLE_MODE_SWITCH_PIN 1
#define EFI_MAX_31855 TRUE
#define CONSOLE_MAX_ACTIONS 32
#define CONFIG_RESET_SWITCH_PORT GPIOD
#define CONFIG_RESET_SWITCH_PIN 6
/**
* This is the size of the MemoryStream used by chvprintf
*/
#define INTERMEDIATE_LOGGING_BUFFER_SIZE 256
#endif /* EFIFEATURES_H_ */

View File

@ -1,312 +0,0 @@
/*
ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* @file templates/halconf.h
* @brief HAL configuration header.
* @details HAL configuration file, this file allows to enable or disable the
* various device drivers from your application. You may also use
* this file in order to override the device drivers default settings.
*
* @addtogroup HAL_CONF
* @{
*/
#ifndef _HALCONF_H_
#define _HALCONF_H_
#include "mcuconf.h"
/**
* @brief Enables the TM subsystem.
*/
#if !defined(HAL_USE_TM) || defined(__DOXYGEN__)
#define HAL_USE_TM TRUE
#endif
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
#define HAL_USE_CAN FALSE
#endif
/**
* @brief Enables the EXT subsystem.
*/
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
#define HAL_USE_EXT FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
#define HAL_USE_MAC FALSE
#endif
/**
* @brief Enables the MMC_SPI subsystem.
*/
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL TRUE
#endif
/**
* @brief Enables the SERIAL over USB subsystem.
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL_USB TRUE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
#define HAL_USE_SPI TRUE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
#define HAL_USE_USB TRUE
#endif
/*===========================================================================*/
/* ADC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
#define ADC_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
/* CAN driver related settings. */
/*===========================================================================*/
/**
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
#define CAN_USE_SLEEP_MODE TRUE
#endif
/*===========================================================================*/
/* I2C driver related settings. */
/*===========================================================================*/
/**
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
/* MAC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables an event sources for incoming packets.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
#define MAC_USE_ZERO_COPY FALSE
#endif
/**
* @brief Enables an event sources for incoming packets.
*/
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
/* MMC_SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
* This option is recommended also if the SPI driver does not
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
/* SDC driver related settings. */
/*===========================================================================*/
/**
* @brief Number of initialization attempts before rejecting the card.
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
#define SDC_INIT_RETRY 100
#endif
/**
* @brief Include support for MMC cards.
* @note MMC support is not yet implemented so this option must be kept
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
#define SDC_MMC_SUPPORT FALSE
#endif
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
/* SERIAL driver related settings. */
/*===========================================================================*/
/**
* @brief Default bit rate.
* @details Configuration parameter, this is the baud rate selected for the
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
* @brief Serial buffers size.
* @details Configuration parameter, you can change the depth of the queue
* buffers depending on the requirements of your application.
* @note The default is 64 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
/* SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
#define SPI_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define SPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* _HALCONF_H_ */
/** @} */

View File

@ -1,199 +0,0 @@
/*
ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#define STM32F103_MCUCONF
/*
* STM32F103 drivers configuration.
* The following settings override the default settings present in
* the various device driver implementation headers.
* Note that the settings for each driver only have effect if the whole
* driver is enabled in halconf.h.
*
* IRQ priorities:
* 15...0 Lowest...Highest.
*
* DMA priorities:
* 0...3 Lowest...Highest.
*/
/*
* HAL driver system settings.
*/
#define STM32_NO_INIT FALSE
#define STM32_HSI_ENABLED TRUE
#define STM32_LSI_ENABLED FALSE
#define STM32_HSE_ENABLED FALSE
#define STM32_LSE_ENABLED FALSE
#define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSI
#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
#define STM32_PLLMUL_VALUE 12
#define STM32_HPRE STM32_HPRE_DIV1
#define STM32_PPRE1 STM32_PPRE1_DIV2
#define STM32_PPRE2 STM32_PPRE2_DIV2
#define STM32_ADCPRE STM32_ADCPRE_DIV4
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
#define STM32_RTCSEL STM32_RTCSEL_NOCLOCK
#define STM32_PVD_ENABLE FALSE
#define STM32_PLS STM32_PLS_LEV0
/*
* ADC driver system settings.
*/
#define STM32_ADC_USE_ADC1 FALSE
#define STM32_ADC_ADC1_DMA_PRIORITY 2
#define STM32_ADC_ADC1_IRQ_PRIORITY 6
/*
* CAN driver system settings.
*/
#define STM32_CAN_USE_CAN1 FALSE
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
/*
* EXT driver system settings.
*/
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
#define STM32_GPT_USE_TIM2 FALSE
#define STM32_GPT_USE_TIM3 FALSE
#define STM32_GPT_USE_TIM4 FALSE
#define STM32_GPT_USE_TIM5 FALSE
#define STM32_GPT_USE_TIM8 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
#define STM32_GPT_TIM5_IRQ_PRIORITY 7
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
/*
* I2C driver system settings.
*/
#define STM32_I2C_USE_I2C1 FALSE
#define STM32_I2C_USE_I2C2 FALSE
#define STM32_I2C_I2C1_IRQ_PRIORITY 5
#define STM32_I2C_I2C2_IRQ_PRIORITY 5
#define STM32_I2C_I2C1_DMA_PRIORITY 3
#define STM32_I2C_I2C2_DMA_PRIORITY 3
#define STM32_I2C_I2C1_DMA_ERROR_HOOK() chSysHalt()
#define STM32_I2C_I2C2_DMA_ERROR_HOOK() chSysHalt()
/*
* ICU driver system settings.
*/
#define STM32_ICU_USE_TIM1 FALSE
#define STM32_ICU_USE_TIM2 FALSE
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM5 FALSE
#define STM32_ICU_USE_TIM8 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
#define STM32_ICU_TIM4_IRQ_PRIORITY 7
#define STM32_ICU_TIM5_IRQ_PRIORITY 7
#define STM32_ICU_TIM8_IRQ_PRIORITY 7
/*
* PWM driver system settings.
*/
#define STM32_PWM_USE_ADVANCED FALSE
#define STM32_PWM_USE_TIM1 FALSE
#define STM32_PWM_USE_TIM2 FALSE
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 FALSE
#define STM32_PWM_USE_TIM5 FALSE
#define STM32_PWM_USE_TIM8 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
#define STM32_PWM_TIM4_IRQ_PRIORITY 7
#define STM32_PWM_TIM5_IRQ_PRIORITY 7
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
/*
* RTC driver system settings.
*/
#define STM32_RTC_IRQ_PRIORITY 15
/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
#define STM32_SERIAL_USE_USART2 TRUE
#define STM32_SERIAL_USE_USART3 FALSE
#define STM32_SERIAL_USE_UART4 FALSE
#define STM32_SERIAL_USE_UART5 FALSE
#define STM32_SERIAL_USART1_PRIORITY 12
#define STM32_SERIAL_USART2_PRIORITY 12
#define STM32_SERIAL_USART3_PRIORITY 12
#define STM32_SERIAL_UART4_PRIORITY 12
#define STM32_SERIAL_UART5_PRIORITY 12
/*
* SPI driver system settings.
*/
#define STM32_SPI_USE_SPI1 TRUE
#define STM32_SPI_USE_SPI2 FALSE
#define STM32_SPI_USE_SPI3 FALSE
#define STM32_SPI_SPI1_DMA_PRIORITY 1
#define STM32_SPI_SPI2_DMA_PRIORITY 1
#define STM32_SPI_SPI3_DMA_PRIORITY 1
#define STM32_SPI_SPI1_IRQ_PRIORITY 10
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
#define STM32_SPI_SPI3_IRQ_PRIORITY 10
#define STM32_SPI_DMA_ERROR_HOOK(spip) chSysHalt()
/*
* UART driver system settings.
*/
#define STM32_UART_USE_USART1 FALSE
#define STM32_UART_USE_USART2 FALSE
#define STM32_UART_USE_USART3 FALSE
#define STM32_UART_USART1_IRQ_PRIORITY 12
#define STM32_UART_USART2_IRQ_PRIORITY 12
#define STM32_UART_USART3_IRQ_PRIORITY 12
#define STM32_UART_USART1_DMA_PRIORITY 0
#define STM32_UART_USART2_DMA_PRIORITY 0
#define STM32_UART_USART3_DMA_PRIORITY 0
#define STM32_UART_DMA_ERROR_HOOK(uartp) chSysHalt()
/*
* USB driver system settings.
*/
#define STM32_USB_USE_USB1 TRUE
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
#define STM32_USB_USB1_LP_IRQ_PRIORITY 14

View File

@ -1,186 +0,0 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011,2012,2013 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
ChibiOS/RT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
---
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes ChibiOS/RT, without being obliged to provide
the source code for any proprietary components. See the file exception.txt
for full details of how and when the exception can be applied.
*/
/*
* ST32F407xG memory setup.
*/
__main_stack_size__ = 0x1000;
__process_stack_size__ = 0x0600;
MEMORY
{
flash : org = 0x08000000, len = 1M
ram : org = 0x20000000, len = 112k
ethram : org = 0x2001C000, len = 16k
ccmram : org = 0x10000000, len = 64k
}
__ram_start__ = ORIGIN(ram);
__ram_size__ = LENGTH(ram);
__ram_end__ = __ram_start__ + __ram_size__;
ENTRY(ResetHandler)
SECTIONS
{
. = 0;
_text = .;
startup : ALIGN(16) SUBALIGN(16)
{
KEEP(*(vectors))
} > flash
constructors : ALIGN(4) SUBALIGN(4)
{
PROVIDE(__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE(__init_array_end = .);
} > flash
destructors : ALIGN(4) SUBALIGN(4)
{
PROVIDE(__fini_array_start = .);
KEEP(*(.fini_array))
KEEP(*(SORT(.fini_array.*)))
PROVIDE(__fini_array_end = .);
} > flash
.text : ALIGN(16) SUBALIGN(16)
{
*(.text.startup.*)
*(.text)
*(.text.*)
*(.rodata)
*(.rodata.*)
*(.glue_7t)
*(.glue_7)
*(.gcc*)
} > flash
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > flash
.ARM.exidx : {
PROVIDE(__exidx_start = .);
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
PROVIDE(__exidx_end = .);
} > flash
.eh_frame_hdr :
{
*(.eh_frame_hdr)
} > flash
.eh_frame : ONLY_IF_RO
{
*(.eh_frame)
} > flash
.textalign : ONLY_IF_RO
{
. = ALIGN(8);
} > flash
_etext = .;
_textdata = _etext;
.stacks :
{
. = ALIGN(8);
__main_stack_base__ = .;
. += __main_stack_size__;
. = ALIGN(8);
__main_stack_end__ = .;
__process_stack_base__ = .;
__main_thread_stack_base__ = .;
. += __process_stack_size__;
. = ALIGN(8);
__process_stack_end__ = .;
__main_thread_stack_end__ = .;
} > ram
.ccm (NOLOAD) :
{
PROVIDE(_cmm_start = .);
. = ALIGN(4);
*(.bss.mainthread.*)
. = ALIGN(4);
*(.bss._idle_thread_wa)
. = ALIGN(4);
*(.bss.rlist)
. = ALIGN(4);
*(.bss.vtlist)
. = ALIGN(4);
*(.bss.endmem)
. = ALIGN(4);
*(.bss.nextmem)
. = ALIGN(4);
*(.bss.default_heap)
. = ALIGN(4);
*(.ccm)
. = ALIGN(4);
*(.ccm.*)
. = ALIGN(4);
PROVIDE(_cmm_end = .);
} > ccmram
.data :
{
. = ALIGN(4);
PROVIDE(_data = .);
*(.data)
. = ALIGN(4);
*(.data.*)
. = ALIGN(4);
*(.ramtext)
. = ALIGN(4);
PROVIDE(_edata = .);
} > ram AT > flash
.bss :
{
. = ALIGN(4);
PROVIDE(_bss_start = .);
*(.bss)
. = ALIGN(4);
*(.bss.*)
. = ALIGN(4);
*(COMMON)
. = ALIGN(4);
PROVIDE(_bss_end = .);
} > ram
}
PROVIDE(end = .);
_end = .;
__heap_base__ = _end;
__heap_end__ = __ram_end__;

View File

@ -1,596 +0,0 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011,2012 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
ChibiOS/RT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
---
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes ChibiOS/RT, without being obliged to provide
the source code for any proprietary components. See the file exception.txt
for full details of how and when the exception can be applied.
*/
/**
* @file templates/chconf.h
* @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config
* @details Kernel related settings and hooks.
* @{
*/
#ifndef _CHCONF_H_
#define _CHCONF_H_
#define chDbgCheck(c, func) { \
if (!(c)) \
chDbgPanic3(__QUOTE_THIS(func)"()", __FILE__, __LINE__); \
}
#define CORTEX_PRIORITY_SYSTICK 6
#define PORT_IDLE_THREAD_STACK_SIZE 1024
#define CHPRINTF_USE_FLOAT TRUE
#define EFI_CLOCK_LOCKS FALSE
#if EFI_CLOCK_LOCKS
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
void onLockHook(void);
void onUnlockHook(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#define ON_LOCK_HOOK onLockHook()
#define ON_UNLOCK_HOOK onUnlockHook()
#else /* EFI_CLOCK_LOCKS */
#define ON_LOCK_HOOK
#define ON_UNLOCK_HOOK
#endif /* EFI_CLOCK_LOCKS */
/**
* number of ticks per second
*
* 8000 rpm equals 133Hz of crankshaft
* that's 266Hz camshaft
* for timing measures we need 95760 Hz precision
*/
#define CH_FREQUENCY 1000
/*===========================================================================*/
/**
* @name Kernel parameters and options
* @{
*/
/*===========================================================================*/
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
#if !defined(CH_FREQUENCY) || defined(__DOXYGEN__)
#define CH_FREQUENCY 1000
#endif
/**
* @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero
* disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
*
* @note Disabling the round robin preemption makes the kernel more compact
* and generally faster.
*/
#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__)
#define CH_TIME_QUANTUM 20
#endif
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_USE_MEMCORE.
*/
#if !defined(CH_MEMCORE_SIZE) || defined(__DOXYGEN__)
// memory pool is used by ff.c which is used for file logging
#define CH_MEMCORE_SIZE 2048
#endif
/**
* @brief Idle thread automatic spawn suppression.
* @details When this option is activated the function @p chSysInit()
* does not spawn the idle thread automatically. The application has
* then the responsibility to do one of the following:
* - Spawn a custom idle thread at priority @p IDLEPRIO.
* - Change the main() thread priority to @p IDLEPRIO then enter
* an endless loop. In this scenario the @p main() thread acts as
* the idle thread.
* .
* @note Unless an idle thread is spawned the @p main() thread must not
* enter a sleep state.
*/
#if !defined(CH_NO_IDLE_THREAD) || defined(__DOXYGEN__)
#define CH_NO_IDLE_THREAD FALSE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Performance options
* @{
*/
/*===========================================================================*/
/**
* @brief OS optimization.
* @details If enabled then time efficient rather than space efficient code
* is used when two possible implementations exist.
*
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
#if !defined(CH_OPTIMIZE_SPEED) || defined(__DOXYGEN__)
#define CH_OPTIMIZE_SPEED TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Subsystem options
* @{
*/
/*===========================================================================*/
/**
* @brief Threads registry APIs.
* @details If enabled then the registry APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_REGISTRY) || defined(__DOXYGEN__)
#define CH_USE_REGISTRY TRUE
#endif
/**
* @brief Threads synchronization APIs.
* @details If enabled then the @p chThdWait() function is included in
* the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_WAITEXIT) || defined(__DOXYGEN__)
#define CH_USE_WAITEXIT FALSE
#endif
/**
* @brief Semaphores APIs.
* @details If enabled then the Semaphores APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_SEMAPHORES) || defined(__DOXYGEN__)
#define CH_USE_SEMAPHORES TRUE
#endif
/**
* @brief Semaphores queuing mode.
* @details If enabled then the threads are enqueued on semaphores by
* priority rather than in FIFO order.
*
* @note The default is @p FALSE. Enable this if you have special requirements.
* @note Requires @p CH_USE_SEMAPHORES.
*/
#if !defined(CH_USE_SEMAPHORES_PRIORITY) || defined(__DOXYGEN__)
#define CH_USE_SEMAPHORES_PRIORITY FALSE
#endif
/**
* @brief Atomic semaphore API.
* @details If enabled then the semaphores the @p chSemSignalWait() API
* is included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_SEMAPHORES.
*/
#if !defined(CH_USE_SEMSW) || defined(__DOXYGEN__)
#define CH_USE_SEMSW FALSE
#endif
/**
* @brief Mutexes APIs.
* @details If enabled then the mutexes APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_MUTEXES) || defined(__DOXYGEN__)
#define CH_USE_MUTEXES TRUE
#endif
/**
* @brief Conditional Variables APIs.
* @details If enabled then the conditional variables APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MUTEXES.
*/
#if !defined(CH_USE_CONDVARS) || defined(__DOXYGEN__)
#define CH_USE_CONDVARS FALSE
#endif
/**
* @brief Conditional Variables APIs with timeout.
* @details If enabled then the conditional variables APIs with timeout
* specification are included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_CONDVARS.
*/
#if !defined(CH_USE_CONDVARS_TIMEOUT) || defined(__DOXYGEN__)
#define CH_USE_CONDVARS_TIMEOUT FALSE
#endif
/**
* @brief Events Flags APIs.
* @details If enabled then the event flags APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_EVENTS) || defined(__DOXYGEN__)
#define CH_USE_EVENTS TRUE
#endif
/**
* @brief Events Flags APIs with timeout.
* @details If enabled then the events APIs with timeout specification
* are included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_EVENTS.
*/
#if !defined(CH_USE_EVENTS_TIMEOUT) || defined(__DOXYGEN__)
#define CH_USE_EVENTS_TIMEOUT TRUE
#endif
/**
* @brief Synchronous Messages APIs.
* @details If enabled then the synchronous messages APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_MESSAGES) || defined(__DOXYGEN__)
#define CH_USE_MESSAGES TRUE
#endif
/**
* @brief Synchronous Messages queuing mode.
* @details If enabled then messages are served by priority rather than in
* FIFO order.
*
* @note The default is @p FALSE. Enable this if you have special requirements.
* @note Requires @p CH_USE_MESSAGES.
*/
#if !defined(CH_USE_MESSAGES_PRIORITY) || defined(__DOXYGEN__)
#define CH_USE_MESSAGES_PRIORITY FALSE
#endif
/**
* @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are
* included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_SEMAPHORES.
*/
#if !defined(CH_USE_MAILBOXES) || defined(__DOXYGEN__)
#define CH_USE_MAILBOXES TRUE
#endif
/**
* @brief I/O Queues APIs.
* @details If enabled then the I/O queues APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_QUEUES) || defined(__DOXYGEN__)
#define CH_USE_QUEUES TRUE
#endif
/**
* @brief Core Memory Manager APIs.
* @details If enabled then the core memory manager APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_MEMCORE) || defined(__DOXYGEN__)
#define CH_USE_MEMCORE TRUE
#endif
/**
* @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MEMCORE and either @p CH_USE_MUTEXES or
* @p CH_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
#if !defined(CH_USE_HEAP) || defined(__DOXYGEN__)
#define CH_USE_HEAP TRUE
#endif
/**
* @brief C-runtime allocator.
* @details If enabled the the heap allocator APIs just wrap the C-runtime
* @p malloc() and @p free() functions.
*
* @note The default is @p FALSE.
* @note Requires @p CH_USE_HEAP.
* @note The C-runtime may or may not require @p CH_USE_MEMCORE, see the
* appropriate documentation.
*/
#if !defined(CH_USE_MALLOC_HEAP) || defined(__DOXYGEN__)
#define CH_USE_MALLOC_HEAP FALSE
#endif
/**
* @brief Memory Pools Allocator APIs.
* @details If enabled then the memory pools allocator APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_USE_MEMPOOLS) || defined(__DOXYGEN__)
#define CH_USE_MEMPOOLS TRUE
#endif
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_USE_WAITEXIT.
* @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS.
*/
#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__)
#define CH_USE_DYNAMIC FALSE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Debug options
* @{
*/
/*===========================================================================*/
/**
* @brief Debug option, system state check.
* @details If enabled the correct call protocol for system APIs is checked
* at runtime.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
#endif
/**
* @brief Debug option, parameters checks.
* @details If enabled then the checks on the API functions input
* parameters are activated.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_CHECKS) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_CHECKS TRUE
#endif
/**
* @brief Debug option, consistency checks.
* @details If enabled then all the assertions in the kernel code are
* activated. This includes consistency checks inside the kernel,
* runtime anomalies and port-defined checks.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_ASSERTS) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_ASSERTS TRUE
#endif
/**
* @brief Debug option, trace buffer.
* @details If enabled then the context switch circular trace buffer is
* activated.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_TRACE) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_TRACE TRUE
#endif
/**
* @brief Debug option, stack checks.
* @details If enabled then a runtime stack check is performed.
*
* @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way.
* It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
#if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
#endif
/**
* @brief Debug option, stacks initialization.
* @details If enabled then the threads working area is filled with a byte
* value when a thread is created. This can be useful for the
* runtime measurement of the used stack.
*
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_FILL_THREADS) || defined(__DOXYGEN__)
#define CH_DBG_FILL_THREADS TRUE
#endif
/**
* @brief Debug option, threads profiling.
* @details If enabled then a field is added to the @p Thread structure that
* counts the system ticks occurred while executing the thread.
*
* @note The default is @p TRUE.
* @note This debug option is defaulted to TRUE because it is required by
* some test cases into the test suite.
*/
#if !defined(CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__)
#define CH_DBG_THREADS_PROFILING TRUE
#endif
/** @} */
/*===========================================================================*/
/**
* @name Kernel hooks
* @{
*/
/*===========================================================================*/
/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p Thread structure.
*/
#if !defined(THREAD_EXT_FIELDS) || defined(__DOXYGEN__)
#define THREAD_EXT_FIELDS \
void *activeStack; \
int remainingStack; \
/* Add threads custom fields here.*/
#endif
/**
* @brief Threads initialization hook.
* @details User initialization code added to the @p chThdInit() API.
*
* @note It is invoked from within @p chThdInit() and implicitly from all
* the threads creation APIs.
*/
#if !defined(THREAD_EXT_INIT_HOOK) || defined(__DOXYGEN__)
#define THREAD_EXT_INIT_HOOK(tp) { \
/* Add threads initialization code here.*/ \
}
#endif
/**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
*
* @note It is inserted into lock zone.
* @note It is also invoked when the threads simply return in order to
* terminate.
*/
#if !defined(THREAD_EXT_EXIT_HOOK) || defined(__DOXYGEN__)
#define THREAD_EXT_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
}
#endif
/**
* @brief Context switch hook.
* @details This hook is invoked just before switching between threads.
*/
#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__)
#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \
/* System halt code here.*/ \
}
#endif
/**
* @brief Idle Loop hook.
* @details This hook is continuously invoked by the idle thread loop.
*/
#if !defined(IDLE_LOOP_HOOK) || defined(__DOXYGEN__)
#define IDLE_LOOP_HOOK() { \
/* Idle loop code here.*/ \
}
#endif
/**
* @brief System tick event hook.
* @details This hook is invoked in the system tick handler immediately
* after processing the virtual timers queue.
*/
#if !defined(SYSTEM_TICK_EVENT_HOOK) || defined(__DOXYGEN__)
#define SYSTEM_TICK_EVENT_HOOK() { \
/* System tick event code here.*/ \
}
#endif
/**
* @brief System halt hook.
* @details This hook is invoked in case to a system halting error before
* the system is halted.
*/
#if !defined(SYSTEM_HALT_HOOK) || defined(__DOXYGEN__)
#if CH_DBG_ENABLED
#define SYSTEM_HALT_HOOK() { \
print("FATAL %s\r\n", dbg_panic_msg); \
chThdSleepMilliseconds(100); \
/* System halt code here.*/ \
}
#endif
#endif
/** @} */
/*===========================================================================*/
/* Port-specific settings (override port settings defaulted in chcore.h). */
/*===========================================================================*/
#define CORTEX_USE_FPU TRUE
#endif /* _CHCONF_H_ */
/** @} */

View File

@ -1,318 +0,0 @@
/**
* @file efifeatures.h
*
* @brief In this header we can configure which firmware modules are used.
*
* @date Aug 29, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef EFIFEATURES_H_
#define EFIFEATURES_H_
#define EFI_GPIO TRUE
#define EFI_FSIO TRUE
#define EFI_PWM_TESTER FALSE
#define EFI_USE_CCM TRUE
/**
* if you have a 60-2 trigger, or if you just want better performance, you
* probably want EFI_ENABLE_ASSERTS to be FALSE. Also you would probably want to FALSE
* CH_DBG_ENABLE_CHECKS
* CH_DBG_ENABLE_ASSERTS
* CH_DBG_ENABLE_TRACE
* in chconf.h
*
*/
#if !defined(EFI_ENABLE_ASSERTS) || defined(__DOXYGEN__)
#define EFI_ENABLE_ASSERTS TRUE
#endif /* EFI_ENABLE_ASSERTS */
//#define EFI_UART_ECHO_TEST_MODE TRUE
#define EFI_USE_UART_FOR_CONSOLE FALSE
/**
* Build-in logic analyzer support. Logic analyzer viewer is one of the java console panes.
*/
#define EFI_WAVE_ANALYZER TRUE
//#define SERIAL_SPEED (8 * 115200)
//#define SERIAL_SPEED (2 * 115200)
#define SERIAL_SPEED 115200
/**
* TunerStudio support.
*/
#define EFI_TUNER_STUDIO TRUE
/**
* TunerStudio debug output
*/
#define EFI_TUNER_STUDIO_VERBOSE TRUE
#define EFI_DEFAILED_LOGGING FALSE
/**
* Dev console support.
*/
#define EFI_CLI_SUPPORT TRUE
#define EFI_RTC TRUE
#define EFI_ALTERNATOR_CONTROL TRUE
#define EFI_SIGNAL_EXECUTOR_SLEEP FALSE
#define EFI_SIGNAL_EXECUTOR_ONE_TIMER TRUE
#define EFI_SIGNAL_EXECUTOR_HW_TIMER FALSE
#define EFI_INTERNAL_FLASH TRUE
/**
* Usually you need shaft position input, but maybe you do not need it?
*/
#define EFI_SHAFT_POSITION_INPUT TRUE
/**
* Maybe we are just sniffing what's going on?
*/
#define EFI_ENGINE_CONTROL TRUE
#define EFI_SPEED_DENSITY TRUE
/**
* MCP42010 digital potentiometer support. This could be useful if you are stimulating some
* stock ECU
*/
//#define EFI_POTENTIOMETER FALSE
#define EFI_POTENTIOMETER TRUE
#define EFI_ANALOG_SENSORS TRUE
#define EFI_MAX_31855 TRUE
#define EFI_MCP_3208 FALSE
#define EFI_HIP_9011 TRUE
#define EFI_INTERNAL_ADC TRUE
#define EFI_DENSO_ADC FALSE
#define EFI_CAN_SUPPORT TRUE
#define EFI_HD44780_LCD TRUE
#define EFI_IDLE_CONTROL TRUE
#define EFI_PWM TRUE
#define EFI_VEHICLE_SPEED TRUE
#define EFI_FUEL_PUMP TRUE
#define EFI_ENGINE_EMULATOR TRUE
#define EFI_EMULATE_POSITION_SENSORS TRUE
/**
* This macros is used to hide pieces of the code from unit tests, so it only makes sense in folders exposed to the tests project.
* This macros is NOT about taking out logging in general.
*/
#define EFI_PROD_CODE TRUE
/**
* Do we need file logging (like SD card) logic?
*/
#define EFI_FILE_LOGGING TRUE
#define EFI_USB_SERIAL TRUE
/**
* While we embed multiple PnP configurations into the same firmware binary, these marcoses give us control
* over which configurations go into the binary
*/
#define EFI_SUPPORT_DODGE_NEON TRUE
#define EFI_SUPPORT_FORD_ASPIRE TRUE
#define EFI_SUPPORT_FORD_FIESTA TRUE
#define EFI_SUPPORT_NISSAN_PRIMERA TRUE
#define EFI_SUPPORT_1995_FORD_INLINE_6 TRUE
#define EFI_WAVE_CHART TRUE
#define EFI_HISTOGRAMS FALSE
#define EFI_ANALOG_CHART TRUE
#if defined __GNUC__
#define EFI_PERF_METRICS FALSE
#define DL_OUTPUT_BUFFER 6500
#else
#define EFI_PERF_METRICS FALSE
#define DL_OUTPUT_BUFFER 8000
#endif
/**
* Do we need GPS logic?
*/
#define EFI_UART_GPS TRUE
//#define EFI_UART_GPS FALSE
#define EFI_ELECTRONIC_THROTTLE_BODY TRUE
//#define EFI_ELECTRONIC_THROTTLE_BODY FALSE
/**
* Do we need Malfunction Indicator blinking logic?
*/
#define EFI_MALFUNCTION_INDICATOR TRUE
//#define EFI_MALFUNCTION_INDICATOR FALSE
#define CONSOLE_MAX_ACTIONS 196
#define EFI_MAP_AVERAGING TRUE
//#define EFI_MAP_AVERAGING FALSE
// todo: most of this should become configurable
// todo: switch to continues ADC conversion for slow ADC?
#define EFI_INTERNAL_SLOW_ADC_PWM &PWMD8
// todo: switch to continues ADC conversion for fast ADC?
#define EFI_INTERNAL_FAST_ADC_PWM &PWMD4
#define EFI_CAN_DEVICE CAND2
#define EFI_CAN_RX_AF 9
#define EFI_CAN_TX_AF 9
//#define EFI_CAN_DEVICE CAND1
//#define EFI_CAN_RX_AF 9
//#define EFI_CAN_TX_AF 9
/**
* This section is for bottom-left corner SPI
*/
//#define SPI_CS1_PORT GPIOE
//#define SPI_CS1_PIN 13
//#define SPI_CS2_PORT GPIOE
//#define SPI_CS2_PIN 14
//#define SPI_CS3_PORT GPIOE
//#define SPI_CS3_PIN 15
//#define SPI_CS4_PORT GPIOD
//#define SPI_CS4_PIN 10
#define EFI_SPI1_AF 5
#define EFI_SPI2_AF 5
/**
* This section is for right-side center SPI
*/
// this is pointing into the sky for now - conflict with I2C
#define SPI_CS2_PORT GPIOH
// this is pointing into the sky for now - conflict with I2C
#define SPI_CS2_PIN 0
#define SPI_CS4_PORT GPIOD
#define SPI_CS4_PIN 3
#define EFI_SPI3_AF 6
#define MMC_CARD_SPI SPID3
#define EFI_I2C_SCL_PORT GPIOB
#define EFI_I2C_SCL_PIN 6
#define EFI_I2C_SDA_PORT GPIOB
#define EFI_I2C_SDA_PIN 7
#define EFI_I2C_AF 4
/**
* Patched version of ChibiOS/RT support extra details in the system error messages
*/
#define EFI_CUSTOM_PANIC_METHOD TRUE
#define ADC_CHANNEL_VREF ADC_CHANNEL_IN14
/**
* currently ChibiOS uses only first and second channels of each timer for input capture
*
* So, our options are:
*
* TIM2_CH1
* PA5
*
* TIM4_CH1
* PB6
* PD12
*
* TIM9_CH1
* PE5
*/
//#define ETB_CONTROL_LINE_1_PORT GPIOE
//#define ETB_CONTROL_LINE_1_PIN 0
//
//#define ETB_CONTROL_LINE_2_PORT GPIOB
//#define ETB_CONTROL_LINE_2_PIN 8
//#define CONSOLE_PORT GPIOB
//#define CONSOLE_TX_PIN 10
//#define CONSOLE_RX_PIN 11
/**
* Here we define the pinout for the human-readable protocol via UART, TunerStudio pinout is defined separately
*/
//#define EFI_CONSOLE_TX_PORT GPIOD
//#define EFI_CONSOLE_TX_PIN 8
//#define EFI_CONSOLE_RX_PORT GPIOD
//#define EFI_CONSOLE_RX_PIN 9
//#define EFI_CONSOLE_AF 7
#define EFI_CONSOLE_UART_DEVICE (&SD3)
#define EFI_CONSOLE_TX_PORT GPIOC
#define EFI_CONSOLE_TX_PIN 10
#define EFI_CONSOLE_RX_PORT GPIOC
#define EFI_CONSOLE_RX_PIN 11
#define EFI_CONSOLE_AF 7
//#define TS_SERIAL_TX_PORT GPIOD
//#define TS_SERIAL_TX_PIN 8
//#define TS_SERIAL_RX_PORT GPIOD
//#define TS_SERIAL_RX_PIN 9
//#define TS_SERIAL_AF 7
#define TS_SERIAL_TX_PORT GPIOC
#define TS_SERIAL_TX_PIN 10
#define TS_SERIAL_RX_PORT GPIOC
#define TS_SERIAL_RX_PIN 11
#define TS_SERIAL_AF 7
#define LED_WARNING_PORT GPIOD
#define LED_WARNING_PIN GPIOD_LED3
#define LED_RUNNING_STATUS_PORT GPIOD
#define LED_RUNNING_STATUS_PIN GPIOD_LED4
#define LED_ERROR_PORT GPIOD
#define LED_ERROR_PIN GPIOD_LED5
#define LED_COMMUNICATION_PORT GPIOD
#define LED_COMMUNICATION_PIN GPIOD_LED6
#define EFI_WARNING_LED TRUE
// USART1 -> check defined STM32_SERIAL_USE_USART1
// For GPS we have USART1. We can start with PB7 USART1_RX and PB6 USART1_TX
#define GPS_SERIAL_DEVICE &SD1
#define GPS_SERIAL_SPEED 38400
#define CONSOLE_MODE_SWITCH_PORT GPIOB
#define CONSOLE_MODE_SWITCH_PIN 1
#define CONFIG_RESET_SWITCH_PORT GPIOD
#define CONFIG_RESET_SWITCH_PIN 6
/**
* This is the size of the MemoryStream used by chvprintf
*/
#define INTERMEDIATE_LOGGING_BUFFER_SIZE 2000
#endif /* EFIFEATURES_H_ */

View File

@ -1,349 +0,0 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011,2012 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
ChibiOS/RT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
---
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes ChibiOS/RT, without being obliged to provide
the source code for any proprietary components. See the file exception.txt
for full details of how and when the exception can be applied.
*/
/**
* @file templates/halconf.h
* @brief HAL configuration header.
* @details HAL configuration file, this file allows to enable or disable the
* various device drivers from your application. You may also use
* this file in order to override the device drivers default settings.
*
* @addtogroup HAL_CONF
* @{
*/
#ifndef _HALCONF_H_
#define _HALCONF_H_
#include "mcuconf.h"
/**
* @brief Enables the TM subsystem.
*/
#if !defined(HAL_USE_TM) || defined(__DOXYGEN__)
#define HAL_USE_TM FALSE
#endif
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
#define HAL_USE_ADC TRUE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
#define HAL_USE_CAN TRUE
#endif
/**
* @brief Enables the EXT subsystem.
*/
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
#define HAL_USE_EXT TRUE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
#define HAL_USE_ICU TRUE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
#define HAL_USE_MAC FALSE
#endif
/**
* @brief Enables the MMC_SPI subsystem.
*/
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
#define HAL_USE_MMC_SPI TRUE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
#define HAL_USE_RTC TRUE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL TRUE
#endif
/**
* @brief Enables the SERIAL over USB subsystem.
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL_USB TRUE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
#define HAL_USE_SPI TRUE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
#define HAL_USE_USB TRUE
#endif
/*===========================================================================*/
/* ADC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
#define ADC_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
/* CAN driver related settings. */
/*===========================================================================*/
/**
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
#define CAN_USE_SLEEP_MODE TRUE
#endif
/*===========================================================================*/
/* I2C driver related settings. */
/*===========================================================================*/
/**
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
/* MAC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables an event sources for incoming packets.
*/
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
/* MMC_SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Block size for MMC transfers.
*/
#if !defined(MMC_SECTOR_SIZE) || defined(__DOXYGEN__)
#define MMC_SECTOR_SIZE 512
#endif
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
* This option is recommended also if the SPI driver does not
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
#define MMC_NICE_WAITING TRUE
#endif
/**
* @brief Number of positive insertion queries before generating the
* insertion event.
*/
#if !defined(MMC_POLLING_INTERVAL) || defined(__DOXYGEN__)
#define MMC_POLLING_INTERVAL 10
#endif
/**
* @brief Interval, in milliseconds, between insertion queries.
*/
#if !defined(MMC_POLLING_DELAY) || defined(__DOXYGEN__)
#define MMC_POLLING_DELAY 10
#endif
/**
* @brief Uses the SPI polled API for small data transfers.
* @details Polled transfers usually improve performance because it
* saves two context switches and interrupt servicing. Note
* that this option has no effect on large transfers which
* are always performed using DMAs/IRQs.
*/
#if !defined(MMC_USE_SPI_POLLING) || defined(__DOXYGEN__)
#define MMC_USE_SPI_POLLING TRUE
#endif
/*===========================================================================*/
/* SDC driver related settings. */
/*===========================================================================*/
/**
* @brief Number of initialization attempts before rejecting the card.
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
#define SDC_INIT_RETRY 100
#endif
/**
* @brief Include support for MMC cards.
* @note MMC support is not yet implemented so this option must be kept
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
#define SDC_MMC_SUPPORT FALSE
#endif
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
/* SERIAL driver related settings. */
/*===========================================================================*/
/**
* @brief Default bit rate.
* @details Configuration parameter, this is the baud rate selected for the
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
* @brief Serial buffers size.
* @details Configuration parameter, you can change the depth of the queue
* buffers depending on the requirements of your application.
* @note The default is 64 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
/* SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
#define SPI_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define SPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* _HALCONF_H_ */
/** @} */

View File

@ -1,298 +0,0 @@
/*
ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
* STM32F4xx drivers configuration.
* The following settings override the default settings present in
* the various device driver implementation headers.
* Note that the settings for each driver only have effect if the whole
* driver is enabled in halconf.h.
*
* IRQ priorities:
* 15...0 Lowest...Highest.
*
* DMA priorities:
* 0...3 Lowest...Highest.
*/
#define STM32F4xx_MCUCONF
#include "efifeatures.h"
#include "rusefi_enums.h"
#define SCHEDULING_TIMER_PRIORITY 4
#define ICU_PRIORITY 3
/*
* HAL driver system settings.
*/
#define STM32_NO_INIT FALSE
#define STM32_HSI_ENABLED TRUE
#define STM32_LSI_ENABLED TRUE
#define STM32_HSE_ENABLED TRUE
// change this 'FALSE to TRUE if you have the LSE 32768 quarts
#define STM32_LSE_ENABLED TRUE
#define STM32_CLOCK48_REQUIRED TRUE
#define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSE
#ifdef OLIMEX_STM32_E407
#define STM32_PLLM_VALUE 12
#else
#define STM32_PLLM_VALUE 8
#endif
#define STM32_PLLN_VALUE 336
#define STM32_PLLP_VALUE 2
#define STM32_PLLQ_VALUE 7
#define STM32_HPRE STM32_HPRE_DIV1
#define STM32_PPRE1 STM32_PPRE1_DIV4
#define STM32_PPRE2 STM32_PPRE2_DIV2
#if STM32_LSE_ENABLED
#define STM32_RTCSEL STM32_RTCSEL_LSE
#else
#define STM32_RTCSEL STM32_RTCSEL_LSI
#endif
#define STM32_RTCPRE_VALUE 8
#define STM32_MCO1SEL STM32_MCO1SEL_HSI
#define STM32_MCO1PRE STM32_MCO1PRE_DIV1
#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK
#define STM32_MCO2PRE STM32_MCO2PRE_DIV5
#define STM32_I2SSRC STM32_I2SSRC_CKIN
#define STM32_PLLI2SN_VALUE 192
#define STM32_PLLI2SR_VALUE 5
//#define STM32_VOS STM32_VOS_HIGH
#define STM32_PVD_ENABLE FALSE
#define STM32_PLS STM32_PLS_LEV0
/*
* ADC driver system settings.
*/
#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4
#define STM32_ADC_USE_ADC1 TRUE // slow ADC
#define STM32_ADC_USE_ADC2 TRUE // fast ADC
#define STM32_ADC_USE_ADC3 FALSE
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
#define STM32_ADC_ADC1_DMA_PRIORITY 2
#define STM32_ADC_ADC2_DMA_PRIORITY 2
#define STM32_ADC_ADC3_DMA_PRIORITY 2
#define STM32_ADC_IRQ_PRIORITY 6
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6
#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 6
#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 6
/*
* CAN driver system settings.
*/
#define STM32_CAN_USE_CAN1 TRUE
#define STM32_CAN_USE_CAN2 TRUE
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
#define STM32_CAN_CAN2_IRQ_PRIORITY 11
/*
* EXT driver system settings.
*/
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
#define STM32_EXT_EXTI17_IRQ_PRIORITY 15
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
#define STM32_EXT_EXTI21_IRQ_PRIORITY 15
#define STM32_EXT_EXTI22_IRQ_PRIORITY 15
/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
#define STM32_GPT_USE_TIM2 FALSE
#define STM32_GPT_USE_TIM3 FALSE
#define STM32_GPT_USE_TIM4 FALSE
#define STM32_GPT_USE_TIM5 TRUE
#define STM32_GPT_USE_TIM6 FALSE
#define STM32_GPT_USE_TIM7 FALSE
#define STM32_GPT_USE_TIM8 FALSE
#define STM32_GPT_USE_TIM9 FALSE
#define STM32_GPT_USE_TIM11 FALSE
#define STM32_GPT_USE_TIM12 FALSE
#define STM32_GPT_USE_TIM14 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
#define STM32_GPT_TIM5_IRQ_PRIORITY SCHEDULING_TIMER_PRIORITY
#define STM32_GPT_TIM6_IRQ_PRIORITY 7
#define STM32_GPT_TIM7_IRQ_PRIORITY 7
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
#define STM32_GPT_TIM9_IRQ_PRIORITY 7
#define STM32_GPT_TIM11_IRQ_PRIORITY 7
#define STM32_GPT_TIM12_IRQ_PRIORITY 7
#define STM32_GPT_TIM14_IRQ_PRIORITY 7
/*
* I2C driver system settings.
*/
#define STM32_I2C_USE_I2C1 TRUE
#define STM32_I2C_USE_I2C2 FALSE
#define STM32_I2C_USE_I2C3 FALSE
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
#define STM32_I2C_I2C1_IRQ_PRIORITY 5
#define STM32_I2C_I2C2_IRQ_PRIORITY 5
#define STM32_I2C_I2C3_IRQ_PRIORITY 5
#define STM32_I2C_I2C1_DMA_PRIORITY 3
#define STM32_I2C_I2C2_DMA_PRIORITY 3
#define STM32_I2C_I2C3_DMA_PRIORITY 3
#define STM32_I2C_I2C1_DMA_ERROR_HOOK() chSysHalt()
#define STM32_I2C_I2C2_DMA_ERROR_HOOK() chSysHalt()
#define STM32_I2C_I2C3_DMA_ERROR_HOOK() chSysHalt()
/*
* ICU driver system settings.
*/
#define STM32_ICU_USE_TIM1 TRUE // wave input
#define STM32_ICU_USE_TIM2 TRUE // primary position sensor
#define STM32_ICU_USE_TIM3 TRUE // secondary position sensor
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM5 FALSE
#define STM32_ICU_USE_TIM8 FALSE
#define STM32_ICU_USE_TIM9 TRUE // wave input
#define STM32_ICU_TIM1_IRQ_PRIORITY ICU_PRIORITY
#define STM32_ICU_TIM2_IRQ_PRIORITY ICU_PRIORITY
#define STM32_ICU_TIM3_IRQ_PRIORITY ICU_PRIORITY
#define STM32_ICU_TIM4_IRQ_PRIORITY ICU_PRIORITY
#define STM32_ICU_TIM5_IRQ_PRIORITY ICU_PRIORITY
#define STM32_ICU_TIM8_IRQ_PRIORITY ICU_PRIORITY
#define STM32_ICU_TIM9_IRQ_PRIORITY ICU_PRIORITY
/*
* MAC driver system settings.
*/
#define STM32_MAC_TRANSMIT_BUFFERS 2
#define STM32_MAC_RECEIVE_BUFFERS 4
#define STM32_MAC_BUFFERS_SIZE 1522
#define STM32_MAC_PHY_TIMEOUT 100
#define STM32_MAC_ETH1_CHANGE_PHY_STATE TRUE
#define STM32_MAC_ETH1_IRQ_PRIORITY 13
#define STM32_MAC_IP_CHECKSUM_OFFLOAD 0
#define STM32_PWM_USE_TIM1 FALSE
#define STM32_PWM_USE_TIM2 FALSE
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 TRUE // fast adc
#define STM32_PWM_USE_TIM5 FALSE
#define STM32_PWM_USE_TIM8 TRUE // slow adc
#define STM32_PWM_USE_TIM9 FALSE
/*
* PWM driver system settings.
*/
#define STM32_PWM_USE_ADVANCED FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
#define STM32_PWM_TIM4_IRQ_PRIORITY 7
#define STM32_PWM_TIM5_IRQ_PRIORITY 7
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
#define STM32_PWM_TIM9_IRQ_PRIORITY 7
/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 TRUE
#define STM32_SERIAL_USE_USART2 TRUE
#define STM32_SERIAL_USE_USART3 TRUE
#define STM32_SERIAL_USE_UART4 FALSE
#define STM32_SERIAL_USE_UART5 FALSE
#define STM32_SERIAL_USE_USART6 FALSE
#define STM32_SERIAL_USART1_PRIORITY 12
#define STM32_SERIAL_USART2_PRIORITY 12
#define STM32_SERIAL_USART3_PRIORITY 12
#define STM32_SERIAL_UART4_PRIORITY 12
#define STM32_SERIAL_UART5_PRIORITY 12
#define STM32_SERIAL_USART6_PRIORITY 12
/*
* SPI driver system settings.
*/
#define STM32_SPI_USE_SPI1 TRUE
#define STM32_SPI_USE_SPI2 TRUE // external ADC
#define STM32_SPI_USE_SPI3 TRUE // potentiometer
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
#define STM32_SPI_SPI1_DMA_PRIORITY 1
#define STM32_SPI_SPI2_DMA_PRIORITY 1
#define STM32_SPI_SPI3_DMA_PRIORITY 1
#define STM32_SPI_SPI1_IRQ_PRIORITY 10
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
#define STM32_SPI_SPI3_IRQ_PRIORITY 10
#define STM32_SPI_DMA_ERROR_HOOK(spip) chDbgCheck(TRUE, "STM32_SPI_DMA_ERROR_HOOK")
/*
* UART driver system settings.
*/
#define STM32_UART_USE_USART1 FALSE
#define STM32_UART_USE_USART2 FALSE
#define STM32_UART_USE_USART3 TRUE
#define STM32_UART_USE_USART6 FALSE
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
#define STM32_UART_USART1_IRQ_PRIORITY 12
#define STM32_UART_USART2_IRQ_PRIORITY 12
#define STM32_UART_USART3_IRQ_PRIORITY 12
#define STM32_UART_USART6_IRQ_PRIORITY 12
#define STM32_UART_USART1_DMA_PRIORITY 0
#define STM32_UART_USART2_DMA_PRIORITY 0
#define STM32_UART_USART3_DMA_PRIORITY 0
#define STM32_UART_USART6_DMA_PRIORITY 0
#define STM32_UART_DMA_ERROR_HOOK(uartp) chSysHalt()
/*
* USB driver system settings.
*/
#define STM32_USB_USE_OTG1 TRUE
#define STM32_USB_USE_OTG2 FALSE
#define STM32_USB_OTG1_IRQ_PRIORITY 14
#define STM32_USB_OTG2_IRQ_PRIORITY 14
#define STM32_USB_OTG1_RX_FIFO_SIZE 512
#define STM32_USB_OTG2_RX_FIFO_SIZE 1024
#define STM32_USB_OTG_THREAD_PRIO LOWPRIO
#define STM32_USB_OTG_THREAD_STACK_SIZE 1024
#define STM32_USB_OTGFIFO_FILL_BASEPRI 0

View File

@ -1,767 +0,0 @@
/**
* @file tunerstudio.cpp
* @brief Binary protocol implementation
*
* This implementation would not happen without the documentation
* provided by Jon Zeeff (jon@zeeff.com)
*
*
* @brief Integration with EFI Analytics Tuner Studio software
*
* Tuner Studio has a really simple protocol, a minimal implementation
* capable of displaying current engine state on the gauges would
* require only two commands: queryCommand and ochGetCommand
*
* queryCommand:
* Communication initialization command. TunerStudio sends a single byte H
* ECU response:
* One of the known ECU id strings. We are using "MShift v0.01" id string.
*
* ochGetCommand:
* Request for output channels state.TunerStudio sends a single byte O
* ECU response:
* A snapshot of output channels as described in [OutputChannels] section of the .ini file
* The length of this block is 'ochBlockSize' property of the .ini file
*
* These two commands are enough to get working gauges. In order to start configuring the ECU using
* tuner studio, three more commands should be implemented:
*
* todo: merge this file with tunerstudio.c?
*
*
* @date Oct 22, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*
* This file is part of rusEfi - see http://rusefi.com
*
* rusEfi is free software; you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <http://www.gnu.org/licenses/>.
*
* @author Andrey Belomutskiy, (c) 2012-2015
*
* This file is part of rusEfi - see http://rusefi.com
*
* rusEfi is free software; you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "main.h"
#include "engine_state.h"
#include "tunerstudio.h"
#include "main_trigger_callback.h"
#include "flash_main.h"
#include "tunerstudio_io.h"
#include "tunerstudio_configuration.h"
#include "malfunction_central.h"
#include "console_io.h"
#include "crc.h"
#include <string.h>
#include "engine_configuration.h"
#include "svnversion.h"
#include "loggingcentral.h"
#include "status_loop.h"
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
EXTERN_ENGINE
;
extern short currentPageId;
// in MS, that's 3 seconds
#define TS_READ_TIMEOUT MS2ST(3000)
/**
* note the use-case where text console port is switched into
* binary port
*/
LoggingWithStorage tsLogger("binary");
extern persistent_config_s configWorkingCopy;
extern persistent_config_container_s persistentState;
static efitimems_t previousWriteReportMs = 0;
ts_channel_s tsChannel;
extern uint8_t crcWriteBuffer[300];
static int ts_serial_ready(bool_t isConsoleRedirect) {
#if EFI_PROD_CODE
if (isSerialOverUart() ^ isConsoleRedirect) {
// TS uses USB when console uses serial
return is_usb_serial_ready();
} else {
// TS uses serial when console uses USB
return true;
}
#else
return true;
#endif
}
static uint16_t BINARY_RESPONSE = (uint16_t) SWAP_UINT16(BINARY_SWITCH_TAG);
// this thread wants a bit extra stack
static THD_WORKING_AREA(tsThreadStack, 3 * UTILITY_THREAD_STACK_SIZE);
extern TunerStudioOutputChannels tsOutputChannels;
extern tunerstudio_counters_s tsState;
static void resetTs(void) {
memset(&tsState, 0, sizeof(tsState));
}
static void printErrorCounters(void) {
scheduleMsg(&tsLogger, "TunerStudio size=%d / total=%d / errors=%d / H=%d / O=%d / P=%d / B=%d",
sizeof(tsOutputChannels), tsState.tsCounter, tsState.errorCounter, tsState.queryCommandCounter,
tsState.outputChannelsCommandCounter, tsState.readPageCommandsCounter, tsState.burnCommandCounter);
scheduleMsg(&tsLogger, "TunerStudio W=%d / C=%d / P=%d / page=%d", tsState.writeValueCommandCounter,
tsState.writeChunkCommandCounter, tsState.pageCommandCounter, currentPageId);
// scheduleMsg(&tsLogger, "page size=%d", getTunerStudioPageSize(currentPageId));
}
void printTsStats(void) {
#if EFI_PROD_CODE
if (!isSerialOverUart()) {
scheduleMsg(&tsLogger, "TS RX on %s%d/TX on %s%d @%d", portname(TS_SERIAL_RX_PORT), TS_SERIAL_RX_PIN,
portname(TS_SERIAL_TX_PORT), TS_SERIAL_TX_PIN, boardConfiguration->tunerStudioSerialSpeed);
}
#endif /* EFI_PROD_CODE */
printErrorCounters();
// scheduleMsg(logger, "analogChartFrequency %d",
// (int) (&engineConfiguration->analogChartFrequency) - (int) engineConfiguration);
//
// int fuelMapOffset = (int) (&engineConfiguration->fuelTable) - (int) engineConfiguration;
// scheduleMsg(logger, "fuelTable %d", fuelMapOffset);
//
// int offset = (int) (&boardConfiguration->hip9011Gain) - (int) engineConfiguration;
// scheduleMsg(&tsLogger, "hip9011Gain %d", offset);
//
// offset = (int) (&engineConfiguration->crankingCycleBins) - (int) engineConfiguration;
// scheduleMsg(&tsLogger, "crankingCycleBins %d", offset);
//
// offset = (int) (&engineConfiguration->engineCycle) - (int) engineConfiguration;
// scheduleMsg(&tsLogger, "engineCycle %d", offset);
}
static void setTsSpeed(int value) {
boardConfiguration->tunerStudioSerialSpeed = value;
printTsStats();
}
void tunerStudioDebug(const char *msg) {
#if EFI_TUNER_STUDIO_VERBOSE
scheduleMsg(&tsLogger, "%s", msg);
#endif
}
char *getWorkingPageAddr(int pageIndex) {
switch (pageIndex) {
case 0:
return (char*) &configWorkingCopy.engineConfiguration;
// case 1:
// return (char*) &configWorkingCopy.ve2Table;
// case 2:
// return (char*) &configWorkingCopy.fuelTable;
// case 3:
// return (char*) &configWorkingCopy.ignitionTable;
// case 4:
// return (char*) &configWorkingCopy.veTable;
// case 5:
// return (char*) &configWorkingCopy.afrTable;
// case 6:
// return (char*) &configWorkingCopy.injectionPhase;
// case 2: // fuelTable
// case 3: // ignitionTable
// case 4: // veTable
// case 5: // afrTable
// return (char*) &configWorkingCopy.engineConfiguration + PAGE_0_SIZE + (pageIndex - 2) * 1024;
}
return NULL;
}
int getTunerStudioPageSize(int pageIndex) {
switch (pageIndex) {
case 0:
return TOTAL_CONFIG_SIZE;
// case 1:
// case 2:
// case 3:
// case 4:
// case 5:
// case 6:
// return PAGE_1_SIZE;
// case 2:
// case 3:
// case 4:
// return 1024;
}
return 0;
}
void handlePageSelectCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t pageId) {
tsState.pageCommandCounter++;
currentPageId = pageId;
scheduleMsg(&tsLogger, "PAGE %d", currentPageId);
tsSendResponse(tsChannel, mode, NULL, 0);
}
void yellowMagic(int currentPageId, int offset, int count) {
if (offset > 6200) {
scheduleMsg(&tsLogger, "applying soft change from %d length %d", offset, count);
memcpy(((char*) engineConfiguration) + offset, ((char*) &configWorkingCopy.engineConfiguration) + offset,
count);
}
}
/**
* This command is needed to make the whole transfer a bit faster
* @note See also handleWriteValueCommand
*/
void handleWriteChunkCommand(ts_channel_s *tsChannel, ts_response_format_e mode, short offset, short count,
void *content) {
tsState.writeChunkCommandCounter++;
scheduleMsg(&tsLogger, "WRITE CHUNK mode=%d p=%d o=%d s=%d", mode, currentPageId, offset, count);
if (offset > getTunerStudioPageSize(currentPageId)) {
scheduleMsg(&tsLogger, "ERROR invalid offset %d", offset);
tunerStudioError("ERROR: out of range");
offset = 0;
}
if (count > getTunerStudioPageSize(currentPageId)) {
tunerStudioError("ERROR: unexpected count");
scheduleMsg(&tsLogger, "ERROR unexpected count %d", count);
count = 0;
}
uint8_t * addr = (uint8_t *) (getWorkingPageAddr(currentPageId) + offset);
memcpy(addr, content, count);
yellowMagic(currentPageId, offset, count);
tsSendResponse(tsChannel, mode, NULL, 0);
}
void handleCrc32Check(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t pageId, uint16_t offset,
uint16_t count) {
tsState.crc32CheckCommandCounter++;
count = SWAP_UINT16(count);
count = getTunerStudioPageSize(pageId);
scheduleMsg(&tsLogger, "CRC32 request: pageId %d offset %d size %d", pageId, offset, count);
uint32_t crc = SWAP_UINT32(crc32((void * ) getWorkingPageAddr(0), count));
scheduleMsg(&tsLogger, "CRC32 response: %x", crc);
tsSendResponse(tsChannel, mode, (const uint8_t *) &crc, 4);
}
/**
* 'Write' command receives a single value at a given offset
* @note Writing values one by one is pretty slow
*/
void handleWriteValueCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t page, uint16_t offset,
uint8_t value) {
tsState.writeValueCommandCounter++;
currentPageId = page;
tunerStudioDebug("got W (Write)"); // we can get a lot of these
#if EFI_TUNER_STUDIO_VERBOSE
// scheduleMsg(logger, "Page number %d\r\n", pageId); // we can get a lot of these
#endif
// int size = sizeof(TunerStudioWriteValueRequest);
// scheduleMsg(logger, "Reading %d\r\n", size);
if (offset > getTunerStudioPageSize(currentPageId)) {
tunerStudioError("ERROR: out of range2");
scheduleMsg(&tsLogger, "ERROR offset %d", offset);
offset = 0;
return;
}
efitimems_t nowMs = currentTimeMillis();
if (nowMs - previousWriteReportMs > 5) {
previousWriteReportMs = nowMs;
scheduleMsg(&tsLogger, "page %d offset %d: value=%d", currentPageId, offset, value);
}
getWorkingPageAddr(currentPageId)[offset] = value;
yellowMagic(currentPageId, offset, 1);
// scheduleMsg(logger, "va=%d", configWorkingCopy.boardConfiguration.idleValvePin);
}
static void sendErrorCode(ts_channel_s *tsChannel) {
tunerStudioWriteCrcPacket(tsChannel, TS_RESPONSE_CRC_FAILURE, NULL, 0);
}
void handlePageReadCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t pageId, uint16_t offset,
uint16_t count) {
tsState.readPageCommandsCounter++;
currentPageId = pageId;
#if EFI_TUNER_STUDIO_VERBOSE
scheduleMsg(&tsLogger, "READ mode=%d page=%d offset=%d size=%d", mode, (int) currentPageId, offset, count);
#endif
if (currentPageId >= PAGE_COUNT) {
// something is not right here
currentPageId = 0;
tunerStudioError("ERROR: invalid page number");
return;
}
int size = getTunerStudioPageSize(currentPageId);
if (size < offset + count) {
scheduleMsg(&tsLogger, "invalid offset/count %d/%d", offset, count);
sendErrorCode(tsChannel);
return;
}
const uint8_t *addr = (const uint8_t *) (getWorkingPageAddr(currentPageId) + offset);
tsSendResponse(tsChannel, mode, addr, count);
#if EFI_TUNER_STUDIO_VERBOSE
// scheduleMsg(&tsLogger, "Sending %d done", count);
#endif
}
void requestBurn(void) {
#if EFI_INTERNAL_FLASH
setNeedToWriteConfiguration();
#endif
incrementGlobalConfigurationVersion();
}
static void sendResponseCode(ts_response_format_e mode, ts_channel_s *tsChannel, const uint8_t responseCode) {
if (mode == TS_CRC) {
tunerStudioWriteCrcPacket(tsChannel, responseCode, NULL, 0);
}
}
/**
* 'Burn' command is a command to commit the changes
*/
void handleBurnCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t page) {
efitimems_t nowMs = currentTimeMillis();
tsState.burnCommandCounter++;
scheduleMsg(&tsLogger, "got B (Burn) %s", mode == TS_PLAIN ? "plain" : "CRC");
currentPageId = page;
#if EFI_TUNER_STUDIO_VERBOSE
// pointless since we only have one page now
// scheduleMsg(logger, "Page number %d", currentPageId);
#endif
// todo: how about some multi-threading?
memcpy(&persistentState.persistentConfiguration, &configWorkingCopy, sizeof(persistent_config_s));
requestBurn();
sendResponseCode(mode, tsChannel, TS_RESPONSE_BURN_OK);
scheduleMsg(&tsLogger, "BURN in %dms", currentTimeMillis() - nowMs);
}
static TunerStudioReadRequest readRequest;
static TunerStudioWriteChunkRequest writeChunkRequest;
static short int pageIn;
static bool isKnownCommand(char command) {
return command == TS_HELLO_COMMAND || command == TS_READ_COMMAND || command == TS_OUTPUT_COMMAND
|| command == TS_PAGE_COMMAND || command == TS_BURN_COMMAND || command == TS_SINGLE_WRITE_COMMAND
|| command == TS_LEGACY_HELLO_COMMAND || command == TS_CHUNK_WRITE_COMMAND || command == TS_EXECUTE
|| command == TS_GET_TEXT || command == TS_CRC_CHECK_COMMAND;
}
static uint8_t firstByte;
static uint8_t secondByte;
void runBinaryProtocolLoop(ts_channel_s *tsChannel, bool_t isConsoleRedirect) {
int wasReady = false;
while (true) {
int isReady = ts_serial_ready(isConsoleRedirect);
if (!isReady) {
chThdSleepMilliseconds(10);
wasReady = false;
continue;
}
if (!wasReady) {
wasReady = true;
// scheduleSimpleMsg(&logger, "ts channel is now ready ", hTimeNow());
}
tsState.tsCounter++;
int recieved = chnReadTimeout(tsChannel->channel, &firstByte, 1, TS_READ_TIMEOUT);
if (recieved != 1) {
// tunerStudioError("ERROR: no command");
continue;
}
// scheduleMsg(logger, "Got first=%x=[%c]", firstByte, firstByte);
if (handlePlainCommand(tsChannel, firstByte))
continue;
recieved = chnReadTimeout(tsChannel->channel, &secondByte, 1, TS_READ_TIMEOUT);
if (recieved != 1) {
tunerStudioError("ERROR: no second");
continue;
}
// scheduleMsg(logger, "Got secondByte=%x=[%c]", secondByte, secondByte);
uint32_t incomingPacketSize = firstByte * 256 + secondByte;
if (incomingPacketSize == BINARY_SWITCH_TAG) {
// we are here if we get a binary switch request while already in binary mode. We will just ignore it.
tunerStudioWriteData(tsChannel, (const uint8_t *) &BINARY_RESPONSE, 2);
continue;
}
if (incomingPacketSize == 0 || incomingPacketSize > (sizeof(tsChannel->crcReadBuffer) - CRC_WRAPPING_SIZE)) {
scheduleMsg(&tsLogger, "TunerStudio: invalid size: %d", incomingPacketSize);
tunerStudioError("ERROR: CRC header size");
sendErrorCode(tsChannel);
continue;
}
recieved = chnReadTimeout(tsChannel->channel, (uint8_t* )tsChannel->crcReadBuffer, 1, TS_READ_TIMEOUT);
if (recieved != 1) {
tunerStudioError("ERROR: did not receive command");
continue;
}
char command = tsChannel->crcReadBuffer[0];
if (!isKnownCommand(command)) {
scheduleMsg(&tsLogger, "unexpected command %x", command);
sendErrorCode(tsChannel);
continue;
}
// scheduleMsg(logger, "TunerStudio: reading %d+4 bytes(s)", incomingPacketSize);
recieved = chnReadTimeout(tsChannel->channel, (uint8_t * ) (tsChannel->crcReadBuffer + 1),
incomingPacketSize + CRC_VALUE_SIZE - 1, TS_READ_TIMEOUT);
int expectedSize = incomingPacketSize + CRC_VALUE_SIZE - 1;
if (recieved != expectedSize) {
scheduleMsg(&tsLogger, "Got only %d bytes while expecting %d for command %c", recieved,
expectedSize, command);
tunerStudioError("ERROR: not enough bytes in stream");
sendResponseCode(TS_CRC, tsChannel, TS_RESPONSE_UNDERRUN);
continue;
}
uint32_t expectedCrc = *(uint32_t*) (tsChannel->crcReadBuffer + incomingPacketSize);
expectedCrc = SWAP_UINT32(expectedCrc);
uint32_t actualCrc = crc32(tsChannel->crcReadBuffer, incomingPacketSize);
if (actualCrc != expectedCrc) {
scheduleMsg(&tsLogger, "TunerStudio: CRC %x %x %x %x", tsChannel->crcReadBuffer[incomingPacketSize + 0],
tsChannel->crcReadBuffer[incomingPacketSize + 1], tsChannel->crcReadBuffer[incomingPacketSize + 2],
tsChannel->crcReadBuffer[incomingPacketSize + 3]);
scheduleMsg(&tsLogger, "TunerStudio: command %c actual CRC %x/expected %x", tsChannel->crcReadBuffer[0],
actualCrc, expectedCrc);
tunerStudioError("ERROR: CRC issue");
continue;
}
// scheduleMsg(logger, "TunerStudio: P00-07 %x %x %x %x %x %x %x %x", crcIoBuffer[0], crcIoBuffer[1],
// crcIoBuffer[2], crcIoBuffer[3], crcIoBuffer[4], crcIoBuffer[5], crcIoBuffer[6], crcIoBuffer[7]);
int success = tunerStudioHandleCrcCommand(tsChannel, tsChannel->crcReadBuffer, incomingPacketSize);
if (!success)
print("got unexpected TunerStudio command %x:%c\r\n", command, command);
}
}
static msg_t tsThreadEntryPoint(void *arg) {
(void) arg;
chRegSetThreadName("tunerstudio thread");
#if EFI_PROD_CODE || defined(__DOXYGEN__)
startTsPort();
#endif
runBinaryProtocolLoop(&tsChannel, false);
#if defined __GNUC__
return 0;
#endif
}
void syncTunerStudioCopy(void) {
memcpy(&configWorkingCopy, &persistentState.persistentConfiguration, sizeof(persistent_config_s));
}
tunerstudio_counters_s tsState;
TunerStudioOutputChannels tsOutputChannels;
/**
* this is a local copy of the configuration. Any changes to this copy
* have no effect until this copy is explicitly propagated to the main working copy
*/
persistent_config_s configWorkingCopy;
short currentPageId;
void tunerStudioError(const char *msg) {
tunerStudioDebug(msg);
printErrorCounters();
tsState.errorCounter++;
}
/**
* Query with CRC takes place while re-establishing connection
* Query without CRC takes place on TunerStudio startup
*/
void handleQueryCommand(ts_channel_s *tsChannel, ts_response_format_e mode) {
tsState.queryCommandCounter++;
#if EFI_TUNER_STUDIO_VERBOSE
scheduleMsg(&tsLogger, "got S/H (queryCommand) mode=%d", mode);
printTsStats();
#endif
tsSendResponse(tsChannel, mode, (const uint8_t *) TS_SIGNATURE, strlen(TS_SIGNATURE) + 1);
}
/**
* @brief 'Output' command sends out a snapshot of current values
*/
void handleOutputChannelsCommand(ts_channel_s *tsChannel, ts_response_format_e mode) {
tsState.outputChannelsCommandCounter++;
prepareTunerStudioOutputs();
// this method is invoked too often to print any debug information
tsSendResponse(tsChannel, mode, (const uint8_t *) &tsOutputChannels, sizeof(TunerStudioOutputChannels));
}
void handleTestCommand(ts_channel_s *tsChannel) {
/**
* this is NOT a standard TunerStudio command, this is my own
* extension of the protocol to simplify troubleshooting
*/
tunerStudioDebug("got T (Test)");
tunerStudioWriteData(tsChannel, (const uint8_t *) VCS_VERSION, sizeof(VCS_VERSION));
/**
* Please note that this response is a magic constant used by dev console for protocol detection
* @see EngineState#TS_PROTOCOL_TAG
*/
tunerStudioWriteData(tsChannel, (const uint8_t *) " ts_p_alive\r\n", 8);
}
extern CommandHandler console_line_callback;
static void handleGetText(ts_channel_s *tsChannel) {
int outputSize;
char *output = swapOutputBuffers(&outputSize);
tunerStudioWriteCrcPacket(tsChannel, TS_RESPONSE_COMMAND_OK, output, outputSize);
}
static void handleExecuteCommand(ts_channel_s *tsChannel, char *data, int incomingPacketSize) {
tunerStudioWriteCrcPacket(tsChannel, TS_RESPONSE_COMMAND_OK, NULL, 0);
data[incomingPacketSize] = 0;
char *trimmed = efiTrim(data);
(console_line_callback)(trimmed);
}
/**
* @return true if legacy command was processed, false otherwise
*/
bool handlePlainCommand(ts_channel_s *tsChannel, uint8_t command) {
if (command == TS_HELLO_COMMAND || command == TS_HELLO_COMMAND_DEPRECATED) {
scheduleMsg(&tsLogger, "Got naked Query command");
handleQueryCommand(tsChannel, TS_PLAIN);
return true;
} else if (command == 't' || command == 'T') {
handleTestCommand(tsChannel);
return true;
} else if (command == TS_PAGE_COMMAND) {
int recieved = chnReadTimeout(tsChannel->channel, (uint8_t * )&pageIn, sizeof(pageIn), TS_READ_TIMEOUT);
if (recieved != sizeof(pageIn)) {
tunerStudioError("ERROR: not enough for PAGE");
return true;
}
handlePageSelectCommand(tsChannel, TS_PLAIN, pageIn);
return true;
} else if (command == TS_BURN_COMMAND) {
scheduleMsg(&tsLogger, "Got naked BURN");
uint16_t page;
int recieved = chnReadTimeout(tsChannel->channel, (uint8_t * )&page, sizeof(page), TS_READ_TIMEOUT);
if (recieved != sizeof(page)) {
tunerStudioError("ERROR: Not enough for plain burn");
return true;
}
handleBurnCommand(tsChannel, TS_PLAIN, page);
return true;
} else if (command == TS_CHUNK_WRITE_COMMAND) {
scheduleMsg(&tsLogger, "Got naked CHUNK_WRITE");
int recieved = chnReadTimeout(tsChannel->channel, (uint8_t * )&writeChunkRequest, sizeof(writeChunkRequest),
TS_READ_TIMEOUT);
if (recieved != sizeof(writeChunkRequest)) {
scheduleMsg(&tsLogger, "ERROR: Not enough for plain chunk write header: %d", recieved);
tsState.errorCounter++;
return true;
}
recieved = chnReadTimeout(tsChannel->channel, (uint8_t * )&tsChannel->crcReadBuffer, writeChunkRequest.count,
TS_READ_TIMEOUT);
if (recieved != writeChunkRequest.count) {
scheduleMsg(&tsLogger, "ERROR: Not enough for plain chunk write content: %d while expecting %d", recieved,
writeChunkRequest.count);
tsState.errorCounter++;
return true;
}
currentPageId = writeChunkRequest.page;
handleWriteChunkCommand(tsChannel, TS_PLAIN, writeChunkRequest.offset, writeChunkRequest.count,
(uint8_t *) &tsChannel->crcReadBuffer);
return true;
} else if (command == TS_READ_COMMAND) {
//scheduleMsg(logger, "Got naked READ PAGE???");
int recieved = chnReadTimeout(tsChannel->channel, (uint8_t * )&readRequest, sizeof(readRequest),
TS_READ_TIMEOUT);
if (recieved != sizeof(readRequest)) {
tunerStudioError("Not enough for plain read header");
return true;
}
handlePageReadCommand(tsChannel, TS_PLAIN, readRequest.page, readRequest.offset, readRequest.count);
return true;
} else if (command == TS_OUTPUT_COMMAND) {
//scheduleMsg(logger, "Got naked Channels???");
handleOutputChannelsCommand(tsChannel, TS_PLAIN);
return true;
} else if (command == TS_LEGACY_HELLO_COMMAND) {
tunerStudioDebug("ignoring LEGACY_HELLO_COMMAND");
return true;
} else if (command == TS_COMMAND_F) {
tunerStudioDebug("not ignoring F");
tunerStudioWriteData(tsChannel, (const uint8_t *) PROTOCOL, strlen(PROTOCOL));
return true;
} else {
return false;
}
}
int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomingPacketSize) {
char command = data[0];
data++;
if (command == TS_HELLO_COMMAND || command == TS_HELLO_COMMAND_DEPRECATED) {
tunerStudioDebug("got Query command");
handleQueryCommand(tsChannel, TS_CRC);
} else if (command == TS_GET_TEXT) {
handleGetText(tsChannel);
} else if (command == TS_EXECUTE) {
handleExecuteCommand(tsChannel, data, incomingPacketSize - 1);
} else if (command == TS_OUTPUT_COMMAND) {
handleOutputChannelsCommand(tsChannel, TS_CRC);
} else if (command == TS_PAGE_COMMAND) {
uint16_t page = *(uint16_t *) data;
handlePageSelectCommand(tsChannel, TS_CRC, page);
} else if (command == TS_CHUNK_WRITE_COMMAND) {
currentPageId = *(uint16_t *) data;
uint16_t offset = *(uint16_t *) (data + 2);
uint16_t count = *(uint16_t *) (data + 4);
handleWriteChunkCommand(tsChannel, TS_CRC, offset, count, data + sizeof(TunerStudioWriteChunkRequest));
} else if (command == TS_SINGLE_WRITE_COMMAND) {
uint16_t page = *(uint16_t *) data;
uint16_t offset = *(uint16_t *) (data + 2);
uint8_t value = data[4];
handleWriteValueCommand(tsChannel, TS_CRC, page, offset, value);
} else if (command == TS_CRC_CHECK_COMMAND) {
uint16_t page = *(uint16_t *) data;
uint16_t offset = *(uint16_t *) (data + 2);
uint16_t count = *(uint16_t *) (data + 4);
handleCrc32Check(tsChannel, TS_CRC, page, offset, count);
} else if (command == TS_BURN_COMMAND) {
uint16_t page = *(uint16_t *) data;
handleBurnCommand(tsChannel, TS_CRC, page);
} else if (command == TS_READ_COMMAND) {
uint16_t page = *(uint16_t *) data;
uint16_t offset = *(uint16_t *) (data + 2);
uint16_t count = *(uint16_t *) (data + 4);
handlePageReadCommand(tsChannel, TS_CRC, page, offset, count);
} else if (command == 't' || command == 'T') {
handleTestCommand(tsChannel);
} else if (command == TS_LEGACY_HELLO_COMMAND) {
/**
* 'Q' is the query command used for compatibility with older ECUs
*/
tunerStudioDebug("ignoring Q");
} else if (command == TS_COMMAND_F) {
tunerStudioDebug("ignoring F");
/**
* http://www.msextra.com/forums/viewtopic.php?f=122&t=48327
* Response from TS support: This is an optional command *
* "The F command is used to find what ini. file needs to be loaded in TunerStudio to match the controller.
* If you are able to just make your firmware ignore the command that would work.
* Currently on some firmware versions the F command is not used and is just ignored by the firmware as a unknown command."
*/
} else {
tunerStudioError("ERROR: ignoring unexpected command");
return false;
}
return true;
}
/**
* we use 'blockingFactor = 256' in rusefi.ini
* todo: should we just do (256 + CRC_WRAPPING_SIZE) ?
*/
static uint8_t tsCrcWriteBuffer[300];
void startTunerStudioConnectivity(void) {
if (sizeof(persistent_config_s) != getTunerStudioPageSize(0))
firmwareError("TS page size mismatch: %d/%d", sizeof(persistent_config_s), getTunerStudioPageSize(0));
if (sizeof(TunerStudioOutputChannels) != TS_OUTPUT_SIZE)
firmwareError("TS outputs size mismatch: %d/%d", sizeof(TunerStudioOutputChannels), TS_OUTPUT_SIZE);
memset(&tsState, 0, sizeof(tsState));
syncTunerStudioCopy();
addConsoleAction("tsinfo", printTsStats);
addConsoleAction("reset_ts", resetTs);
addConsoleActionI("set_ts_speed", setTsSpeed);
tsChannel.channel = getTsSerialDevice();
tsChannel.writeBuffer = tsCrcWriteBuffer;
chThdCreateStatic(tsThreadStack, sizeof(tsThreadStack), NORMALPRIO, tsThreadEntryPoint, NULL);
}
#endif

View File

@ -1,91 +0,0 @@
/**
* @file tunerstudio.h
*
* @date Aug 26, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef TUNERSTUDIO_H_
#define TUNERSTUDIO_H_
#include "main.h"
#include "tunerstudio_io.h"
#if EFI_TUNER_STUDIO
#include "tunerstudio_configuration.h"
#include "engine.h"
#include <stdint.h>
typedef struct {
int queryCommandCounter;
int outputChannelsCommandCounter;
int readPageCommandsCounter;
int burnCommandCounter;
int pageCommandCounter;
int writeValueCommandCounter;
int crc32CheckCommandCounter;
int writeChunkCommandCounter;
int errorCounter;
int tsCounter;
} tunerstudio_counters_s;
bool handlePlainCommand(ts_channel_s *tsChannel, uint8_t command);
int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomingPacketSize);
void handleTestCommand(ts_channel_s *tsChannel);
void handleQueryCommand(ts_channel_s *tsChannel, ts_response_format_e mode);
void handleOutputChannelsCommand(ts_channel_s *tsChannel, ts_response_format_e mode);
char *getWorkingPageAddr(int pageIndex);
int getTunerStudioPageSize(int pageIndex);
void handleWriteValueCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t page, uint16_t offset, uint8_t value);
void handleWriteChunkCommand(ts_channel_s *tsChannel, ts_response_format_e mode, short offset, short count, void *content);
void handlePageSelectCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t pageId);
void handlePageReadCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t pageId, uint16_t offset, uint16_t count);
void handleBurnCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t page);
void tunerStudioDebug(const char *msg);
void tunerStudioError(const char *msg);
void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ENGINE_PARAMETER_S);
void printTsStats(void);
void requestBurn(void);
void startTunerStudioConnectivity(void);
void syncTunerStudioCopy(void);
void runBinaryProtocolLoop(ts_channel_s *tsChannel, bool_t isConsoleRedirect);
#if defined __GNUC__
// GCC
#define pre_packed
#define post_packed __attribute__((packed))
#else
// IAR
#define pre_packed __packed
#define post_packed
#endif
typedef pre_packed struct
post_packed {
short int page;
short int offset;
short int count;
} TunerStudioWriteChunkRequest;
typedef pre_packed struct
post_packed {
short int page;
short int offset;
short int count;
} TunerStudioReadRequest;
typedef pre_packed struct
post_packed {
short int offset;
unsigned char value;
} TunerStudioWriteValueRequest;
#endif /* EFI_TUNER_STUDIO */
#endif /* TUNERSTUDIO_H_ */

View File

@ -1,3 +0,0 @@
TUNERSTUDIO_SRC_CPP = $(PROJECT_DIR)/console/binary/tunerstudio_io.cpp \
$(PROJECT_DIR)/console/binary/tunerstudio.cpp

View File

@ -1,101 +0,0 @@
/*
* @file tunerstudio_configuration.h
* @brief Tuner Studio connectivity configuration
*
* In this file the configuration of TunerStudio is defined
*
* @date Oct 22, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef TUNERSTUDIO_CONFIGURATION_H_
#define TUNERSTUDIO_CONFIGURATION_H_
#include "rusefi_types.h"
#define PAGE_COUNT 1
//#define PAGE_1_SIZE 1152
#define TS_OUTPUT_SIZE 196
typedef struct {
uint16_t values[EGT_CHANNEL_COUNT];
} egt_values_s;
/**
* please be aware that 'float' (F32) type requires TunerStudio version 2.6 and later
*/
typedef struct {
// primary instrument cluster gauges
int rpm; // size 4, offset 0
float coolant_temperature; // size 4, offset 4
float intakeAirTemperature; // size 4, offset 8
float throttlePositon; // size 4, offset 12
float massAirFlowVoltage; // size 4, offset 16
float airFuelRatio; // size 4, offset 20
float engineLoad; // size 4, offset 24
float vBatt; // size 4, offset 28
short int tpsADC; // size 2, offset 32
short int alignment; // size 2, offset 34
float baroPressure; // size 4, offset 36
float manifold_air_pressure; // size 4, offset 40
float crankingFuelMs;
/**
* This is the raw value we take from the fuel map or base fuel algorithm, before the corrections
*/
float baseFuel; // 48
float tCharge; // 52
float ignitionAdvance; // 56
float sparkDwell; // 60
/**
* this one contains total resulting fuel squirt time, per event
* With all corrections. See also baseFuel
*/
float pulseWidthMs; // 64
float warmUpEnrich; // 68
/**
* Yes, I do not really enjoy packing bits into integers but we simply have too many boolean flags and I cannot
* water 4 bytes per traffic - I want gauges to work as fast as possible
*/
unsigned int hasSdCard : 1; // bit 0
unsigned int isIgnitionEnabled : 1; // bit 1
unsigned int injection_enabled : 1; // bit 2
unsigned int cylinder_cleanup_enabled : 1; // bit 3
unsigned int cylinder_cleanup_activated : 1; // bit 4
unsigned int isFuelPumpOn : 1; // bit 5
unsigned int isFanOn : 1; // bit 6
unsigned int isO2HeaterOn : 1; // bit 7
unsigned int checkEngine : 1; // bit 8
unsigned int needBurn : 1; // bit 9
unsigned int secondTriggerChannelEnabled : 1; // bit 10
unsigned int clutchUpState : 1; // bit 11
unsigned int clutchDownState : 1; // bit 12
unsigned int knockEverIndicator : 1; // bit 13
unsigned int knockNowIndicator : 1; // bit 14
float vehicleSpeedKph;
unsigned int isTpsError : 1; // bit 0
unsigned int isCltError : 1; // bit 1
unsigned int isMapError : 1; // bit 2
unsigned int isIatError : 1; // bit 3
unsigned int isAcSwitchEngaged : 1; // bit 4
unsigned int isTriggerError : 1; // bit 5
unsigned int hasFatalError : 1; // bit 6
int tsConfigVersion;
egt_values_s egtValues;
float rpmAcceleration;
float massAirFlowValue;
float veValue;
float deltaTps;
int triggerErrorsCounter;
float currentMapAccelDelta;
float tpsAccelFuel;
float baroCorrection;
float pedalPosition;
float injectorDutyCycle;
int knockCount;
float fuelLevel;
int unused3[11];
} TunerStudioOutputChannels;
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */

View File

@ -1,99 +0,0 @@
/**
* @file tunerstudio_io.cpp
*
* @date Mar 8, 2015
* @author Andrey Belomutskiy, (c) 2012-2014
*/
#include "main.h"
#include "tunerstudio_io.h"
#include "console_io.h"
#include "engine.h"
EXTERN_ENGINE;
extern LoggingWithStorage tsLogger;
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#include "pin_repository.h"
#include "usbconsole.h"
#include "map_averaging.h"
extern SerialUSBDriver SDU1;
#define CONSOLE_DEVICE &SDU1
#define TS_SERIAL_UART_DEVICE &SD3
static SerialConfig tsSerialConfig = { 0, 0, USART_CR2_STOP1_BITS | USART_CR2_LINEN, 0 };
void startTsPort(void) {
if (isSerialOverUart()) {
print("TunerStudio over USB serial");
/**
* This method contains a long delay, that's the reason why this is not done on the main thread
*/
usb_serial_start();
} else if (boardConfiguration->useSerialPort) {
print("TunerStudio over USART");
mySetPadMode("tunerstudio rx", TS_SERIAL_RX_PORT, TS_SERIAL_RX_PIN, PAL_MODE_ALTERNATE(TS_SERIAL_AF));
mySetPadMode("tunerstudio tx", TS_SERIAL_TX_PORT, TS_SERIAL_TX_PIN, PAL_MODE_ALTERNATE(TS_SERIAL_AF));
tsSerialConfig.speed = boardConfiguration->tunerStudioSerialSpeed;
sdStart(TS_SERIAL_UART_DEVICE, &tsSerialConfig);
}
}
#endif /* EFI_PROD_CODE */
BaseChannel * getTsSerialDevice(void) {
#if EFI_PROD_CODE || defined(__DOXYGEN__)
if (isSerialOverUart()) {
// if console uses UART then TS uses USB
return (BaseChannel *) &SDU1;
} else {
return (BaseChannel *) TS_SERIAL_UART_DEVICE;
}
#else
return (BaseChannel *) TS_SIMULATOR_PORT;
#endif
}
void tunerStudioWriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size) {
efiAssertVoid(getRemainingStack(chThdSelf()) > 64, "tunerStudioWriteData");
int transferred = chSequentialStreamWrite(tsChannel->channel, buffer, size);
if (transferred != size) {
scheduleMsg(&tsLogger, "!!! NOT ACCEPTED %d out of %d !!!", transferred, size);
}
}
/**
* Adds size to the beginning of a packet and a crc32 at the end. Then send the packet.
*/
void tunerStudioWriteCrcPacket(ts_channel_s *tsChannel, const uint8_t command, const void *buf, const uint16_t size) {
uint8_t *writeBuffer = tsChannel->writeBuffer;
// todo: max size validation
*(uint16_t *) writeBuffer = SWAP_UINT16(size + 1); // packet size including command
*(uint8_t *) (writeBuffer + 2) = command;
if (size != 0)
memcpy(writeBuffer + 3, buf, size);
// CRC on whole packet
uint32_t crc = crc32((void *) (writeBuffer + 2), (uint32_t) (size + 1));
*(uint32_t *) (writeBuffer + 2 + 1 + size) = SWAP_UINT32(crc);
// scheduleMsg(logger, "TunerStudio: CRC command %x size %d", command, size);
tunerStudioWriteData(tsChannel, writeBuffer, size + 2 + 1 + 4); // with size, command and CRC
}
void tsSendResponse(ts_channel_s *tsChannel, ts_response_format_e mode, const uint8_t * buffer, int size) {
if (mode == TS_CRC) {
tunerStudioWriteCrcPacket(tsChannel, TS_RESPONSE_OK, buffer, size);
} else {
if (size > 0)
tunerStudioWriteData(tsChannel, buffer, size);
}
}

View File

@ -1,69 +0,0 @@
/**
* @file tunerstudio_io.h
*
* @date Mar 8, 2015
* @author Andrey Belomutskiy, (c) 2012-2014
*/
#ifndef CONSOLE_TUNERSTUDIO_TUNERSTUDIO_IO_H_
#define CONSOLE_TUNERSTUDIO_TUNERSTUDIO_IO_H_
#include "main.h"
#if EFI_PROD_CODE
#include "usbconsole.h"
#include "pin_repository.h"
#endif
// that's hex for "~\n", see
#define BINARY_SWITCH_TAG 0x7e0a
#define SWITCH_TO_BINARY_COMMAND "~"
#define PROTOCOL "001"
#define TS_SIGNATURE "MShift v0.01"
#define TS_RESPONSE_OK 0x00
#define TS_RESPONSE_BURN_OK 0x04
#define TS_RESPONSE_COMMAND_OK 0x07
#define TS_RESPONSE_UNDERRUN 0x80
#define TS_RESPONSE_CRC_FAILURE 0x82
typedef enum {
TS_PLAIN = 0,
TS_CRC = 1
} ts_response_format_e;
typedef struct {
BaseChannel * channel;
uint8_t *writeBuffer;
char crcReadBuffer[300];
} ts_channel_s;
#define TS_HELLO_COMMAND_DEPRECATED 'H'
#define TS_HELLO_COMMAND 'S'
#define TS_LEGACY_HELLO_COMMAND 'Q'
#define TS_OUTPUT_COMMAND 'O'
#define TS_READ_COMMAND 'R'
#define TS_PAGE_COMMAND 'P'
#define TS_COMMAND_F 'F'
#define TS_EXECUTE 'E'
#define TS_GET_TEXT 'G'
#define TS_SINGLE_WRITE_COMMAND 'W'
#define TS_CHUNK_WRITE_COMMAND 'C'
#define TS_BURN_COMMAND 'B'
#define TS_CRC_CHECK_COMMAND 'k'
#define CRC_VALUE_SIZE 4
// todo: double-check this
#define CRC_WRAPPING_SIZE (CRC_VALUE_SIZE + 3)
BaseChannel * getTsSerialDevice(void);
void startTsPort(void);
void tunerStudioWriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size);
void tunerStudioWriteCrcPacket(ts_channel_s *tsChannel, const uint8_t command, const void *buf, const uint16_t size);
void tsSendResponse(ts_channel_s *tsChannel, ts_response_format_e mode, const uint8_t * buffer, int size);
#endif /* CONSOLE_TUNERSTUDIO_TUNERSTUDIO_IO_H_ */

View File

@ -1,7 +0,0 @@
CONSOLESRC =
CONSOLE_SRC_CPP = $(PROJECT_DIR)/console/status_loop.cpp \
$(PROJECT_DIR)/console/console_io.cpp \
$(PROJECT_DIR)/console/eficonsole.cpp

View File

@ -1,293 +0,0 @@
/**
* @file console_io.c
*
* @date Dec 29, 2012
* @author Andrey Belomutskiy, (c) 2012-2015
*
* This file is part of rusEfi - see http://rusefi.com
*
* rusEfi is free software; you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "main.h"
#include "console_io.h"
#include "rfiutil.h"
#include "tunerstudio.h"
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
#include "usbcfg.h"
#include "usbconsole.h"
extern SerialUSBDriver SDU1;
#endif
int lastWriteSize;
int lastWriteActual;
static bool isSerialConsoleStarted = false;
static EventListener consoleEventListener;
/**
* @brief Reads a whole line from the input channel.
*
* @param[in] chp pointer to a @p BaseChannel object
* @param[in] line pointer to the line buffer
* @param[in] size buffer maximum length
* @return The operation status.
* @retval TRUE the channel was reset or CTRL-D pressed.
* @retval FALSE operation successful.
*/
static bool getConsoleLine(BaseSequentialStream *chp, char *line, unsigned size) {
char *p = line;
while (true) {
if (!isConsoleReady()) {
// we better do not read from USB serial before it is ready
chThdSleepMilliseconds(10);
continue;
}
short c = (short) chSequentialStreamGet(chp);
if (isSerialOverUart()) {
uint32_t flags;
chSysLock()
;
flags = chEvtGetAndClearFlagsI(&consoleEventListener);
chSysUnlock()
;
if (flags & SD_OVERRUN_ERROR) {
// firmwareError("serial overrun");
}
}
#if EFI_UART_ECHO_TEST_MODE
/**
* That's test code - let's test connectivity
*/
consolePutChar((uint8_t) c);
continue;
#endif
if (c < 0 || c == 4) {
return true;
}
if (c == 8) {
if (p != line) {
// backspace
consolePutChar((uint8_t) c);
consolePutChar(0x20);
consolePutChar((uint8_t) c);
p--;
}
continue;
}
if (c == '\r') {
consolePutChar('\r');
consolePutChar('\n');
*p = 0;
return false;
}
if (c == '\n') {
consolePutChar('\n');
*p = 0;
return false;
}
if (c < 0x20) {
continue;
}
if (p < line + size - 1) {
consolePutChar((uint8_t) c);
*p++ = (char) c;
}
}
}
// todo: this is ugly as hell!
static char consoleInput[] = " ";
CommandHandler console_line_callback;
static bool is_serial_over_uart;
bool isSerialOverUart(void) {
return is_serial_over_uart;
}
#if (defined(EFI_CONSOLE_UART_DEVICE) && ! EFI_SIMULATOR ) || defined(__DOXYGEN__)
static SerialConfig serialConfig = { SERIAL_SPEED, 0, USART_CR2_STOP1_BITS | USART_CR2_LINEN, 0 };
#endif
#if EFI_PROD_CODE || EFI_EGT || defined(__DOXYGEN__)
SerialDriver * getConsoleChannel(void) {
#if defined(EFI_CONSOLE_UART_DEVICE) || defined(__DOXYGEN__)
if (isSerialOverUart()) {
return (SerialDriver *) EFI_CONSOLE_UART_DEVICE;
}
#endif /* EFI_CONSOLE_UART_DEVICE */
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
return (SerialDriver *) &SDU1;
#else
return NULL;
#endif
}
bool isConsoleReady(void) {
if (isSerialOverUart()) {
return isSerialConsoleStarted;
} else {
return is_usb_serial_ready();
}
}
#endif /* EFI_PROD_CODE || EFI_EGT */
bool_t consoleInBinaryMode = false;
ts_channel_s binaryConsole;
uint8_t buffer[DL_OUTPUT_BUFFER];
static THD_WORKING_AREA(consoleThreadStack, 2 * UTILITY_THREAD_STACK_SIZE);
static msg_t consoleThreadThreadEntryPoint(void *arg) {
(void) arg;
chRegSetThreadName("console thread");
#if EFI_PROD_CODE
if (!isSerialOverUart()) {
/**
* This method contains a long delay, that's the reason why this is not done on the main thread
*/
usb_serial_start();
}
#endif /* EFI_PROD_CODE */
binaryConsole.channel = (BaseChannel *) getConsoleChannel();
// todo: clean this spot!
binaryConsole.writeBuffer = buffer;
while (true) {
efiAssert(getRemainingStack(chThdSelf()) > 256, "lowstck#9e", 0);
bool end = getConsoleLine((BaseSequentialStream*) getConsoleChannel(), consoleInput, sizeof(consoleInput));
if (end) {
// firmware simulator is the only case when this happens
continue;
}
char *trimmed = efiTrim(consoleInput);
(console_line_callback)(trimmed);
if (consoleInBinaryMode) {
// switch to binary protocol
runBinaryProtocolLoop(&binaryConsole, true);
}
}
#if defined __GNUC__
return false;
#endif
}
void consolePutChar(int x) {
chSequentialStreamPut(getConsoleChannel(), (uint8_t )(x));
}
// 10 seconds
#define CONSOLE_WRITE_TIMEOUT 10000
void consoleOutputBuffer(const uint8_t *buf, int size) {
lastWriteSize = size;
#if !EFI_UART_ECHO_TEST_MODE
lastWriteActual = chnWriteTimeout(getConsoleChannel(), buf, size, CONSOLE_WRITE_TIMEOUT);
// if (r != size)
// firmwareError("Partial console write");
#endif /* EFI_UART_ECHO_TEST_MODE */
}
static Logging *logger;
static void switchToBinaryProtocol(void) {
scheduleMsg(logger, "switching to binary protocol");
consoleInBinaryMode = true;
}
void startConsole(Logging *sharedLogger, CommandHandler console_line_callback_p) {
logger = sharedLogger;
console_line_callback = console_line_callback_p;
#if (defined(EFI_CONSOLE_UART_DEVICE) && ! EFI_SIMULATOR) || defined(__DOXYGEN__)
palSetPadMode(CONSOLE_MODE_SWITCH_PORT, CONSOLE_MODE_SWITCH_PIN, PAL_MODE_INPUT_PULLUP);
is_serial_over_uart = GET_CONSOLE_MODE_VALUE() == EFI_USE_UART_FOR_CONSOLE;
if (isSerialOverUart()) {
/*
* Activates the serial using the driver default configuration (that's 38400)
* it is important to set 'NONE' as flow control! in terminal application on the PC
*/
sdStart(EFI_CONSOLE_UART_DEVICE, &serialConfig);
// cannot use pin repository here because pin repository prints to console
palSetPadMode(EFI_CONSOLE_RX_PORT, EFI_CONSOLE_RX_PIN, PAL_MODE_ALTERNATE(EFI_CONSOLE_AF));
palSetPadMode(EFI_CONSOLE_TX_PORT, EFI_CONSOLE_TX_PIN, PAL_MODE_ALTERNATE(EFI_CONSOLE_AF));
isSerialConsoleStarted = true;
chEvtRegisterMask((EventSource *) chnGetEventSource(EFI_CONSOLE_UART_DEVICE), &consoleEventListener, 1);
}
#else
is_serial_over_uart = false;
#endif /* EFI_PROD_CODE */
chThdCreateStatic(consoleThreadStack, sizeof(consoleThreadStack), NORMALPRIO, consoleThreadThreadEntryPoint, NULL);
addConsoleAction(SWITCH_TO_BINARY_COMMAND, switchToBinaryProtocol);
}
/**
* @return TRUE if already in locked context
*/
bool lockAnyContext(void) {
int alreadyLocked = isLocked();
if (alreadyLocked)
return true;
if (isIsrContext()) {
chSysLockFromIsr()
;
} else {
chSysLock()
;
}
return false;
}
bool lockOutputBuffer(void) {
return lockAnyContext();
}
void unlockAnyContext(void) {
if (isIsrContext()) {
chSysUnlockFromIsr()
;
} else {
chSysUnlock()
;
}
}
void unlockOutputBuffer(void) {
unlockAnyContext();
}

View File

@ -1,35 +0,0 @@
/**
* @file console_io.h
*
* @date Dec 29, 2012
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#pragma once
#ifndef CONSOLE_IO_H_
#define CONSOLE_IO_H_
#include <ch.h>
#include <hal.h>
typedef void (*CommandHandler)(char *);
#include "efifeatures.h"
#include "datalogging.h"
#define GET_CONSOLE_MODE_VALUE() palReadPad(CONSOLE_MODE_SWITCH_PORT, CONSOLE_MODE_SWITCH_PIN)
#define SHOULD_INGORE_FLASH() (palReadPad(CONFIG_RESET_SWITCH_PORT, CONFIG_RESET_SWITCH_PIN) == 0)
SerialDriver * getConsoleChannel(void);
void consolePutChar(int x);
void consoleOutputBuffer(const uint8_t *buf, int size);
void startConsole(Logging *sharedLogger, CommandHandler console_line_callback_p);
bool isSerialOverUart(void);
#if EFI_PROD_CODE || EFI_SIMULATOR || EFI_EGT
bool isConsoleReady(void);
#else
#define isConsoleReady() true
#endif
#endif /* CONSOLE_IO_H_ */

View File

@ -1,179 +0,0 @@
/**
* @file eficonsole.cpp
* @brief Console package entry point code
*
*
* @date Nov 15, 2012
* @author Andrey Belomutskiy, (c) 2012-2015
*
*
* This file is part of rusEfi - see http://rusefi.com
*
* rusEfi is free software; you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdarg.h>
#include <stdbool.h>
#include "main.h"
#include <chprintf.h>
#include "eficonsole.h"
#include "console_io.h"
#include "svnversion.h"
static LoggingWithStorage logger("console");
static char fatalErrorMessage[200];
void fatal3(char *msg, char *file, int line) {
strncpy(fatalErrorMessage, msg, sizeof(fatalErrorMessage) - 1);
fatalErrorMessage[sizeof(fatalErrorMessage) - 1] = 0; // just to be sure
#if EFI_CUSTOM_PANIC_METHOD
chDbgPanic3(fatalErrorMessage, file, line);
#else
chDbgPanic(fatalErrorMessage);
#endif
}
static void myfatal(void) {
chDbgCheck(0, "my fatal");
}
static void myerror(void) {
firmwareError("firmwareError: %d", getRusEfiVersion());
}
static void sayNothing(void) {
/**
* @see EngineState#TS_PROTOCOL_TAG
* this empty response is part of protocol check
* todo: make this logic smarter?
*/
}
static void sayHello(void) {
scheduleMsg(&logger, "*** rusEFI (c) Andrey Belomutskiy 2012-2015. All rights reserved.");
scheduleMsg(&logger, "rusEFI v%d@%s", getRusEfiVersion(), VCS_VERSION);
scheduleMsg(&logger, "*** Chibios Kernel: %s", CH_KERNEL_VERSION);
scheduleMsg(&logger, "*** Compiled: " __DATE__ " - " __TIME__ "");
scheduleMsg(&logger, "COMPILER=%s", __VERSION__);
scheduleMsg(&logger, "CH_FREQUENCY=%d", CH_FREQUENCY);
#ifdef SERIAL_SPEED
scheduleMsg(&logger, "SERIAL_SPEED=%d", SERIAL_SPEED);
#endif
#ifdef CORTEX_MAX_KERNEL_PRIORITY
scheduleMsg(&logger, "CORTEX_MAX_KERNEL_PRIORITY=%d", CORTEX_MAX_KERNEL_PRIORITY);
#endif
#ifdef STM32_ADCCLK
scheduleMsg(&logger, "STM32_ADCCLK=%d", STM32_ADCCLK);
scheduleMsg(&logger, "STM32_TIMCLK1=%d", STM32_TIMCLK1);
scheduleMsg(&logger, "STM32_TIMCLK2=%d", STM32_TIMCLK2);
#endif
#ifdef STM32_PCLK1
scheduleMsg(&logger, "STM32_PCLK1=%d", STM32_PCLK1);
scheduleMsg(&logger, "STM32_PCLK2=%d", STM32_PCLK2);
#endif
scheduleMsg(&logger, "PORT_IDLE_THREAD_STACK_SIZE=%d", PORT_IDLE_THREAD_STACK_SIZE);
scheduleMsg(&logger, "CH_DBG_ENABLE_ASSERTS=%d", CH_DBG_ENABLE_ASSERTS);
scheduleMsg(&logger, "CH_DBG_ENABLED=%d", CH_DBG_ENABLED);
scheduleMsg(&logger, "CH_DBG_SYSTEM_STATE_CHECK=%d", CH_DBG_SYSTEM_STATE_CHECK);
scheduleMsg(&logger, "CH_DBG_ENABLE_STACK_CHECK=%d", CH_DBG_ENABLE_STACK_CHECK);
#ifdef EFI_WAVE_ANALYZER
scheduleMsg(&logger, "EFI_WAVE_ANALYZER=%d", EFI_WAVE_ANALYZER);
#endif
#ifdef EFI_TUNER_STUDIO
scheduleMsg(&logger, "EFI_TUNER_STUDIO=%d", EFI_TUNER_STUDIO);
#else
scheduleMsg(&logger, "EFI_TUNER_STUDIO=%d", 0);
#endif
#ifdef EFI_SIGNAL_EXECUTOR_SLEEP
scheduleMsg(&logger, "EFI_SIGNAL_EXECUTOR_SLEEP=%d", EFI_SIGNAL_EXECUTOR_SLEEP);
#endif
#ifdef EFI_SIGNAL_EXECUTOR_HW_TIMER
scheduleMsg(&logger, "EFI_SIGNAL_EXECUTOR_HW_TIMER=%d", EFI_SIGNAL_EXECUTOR_HW_TIMER);
#endif
#if defined(EFI_SHAFT_POSITION_INPUT) || defined(__DOXYGEN__)
scheduleMsg(&logger, "EFI_SHAFT_POSITION_INPUT=%d", EFI_SHAFT_POSITION_INPUT);
#endif
#ifdef EFI_INTERNAL_ADC
scheduleMsg(&logger, "EFI_INTERNAL_ADC=%d", EFI_INTERNAL_ADC);
#endif
// printSimpleMsg(&logger, "", );
// printSimpleMsg(&logger, "", );
/**
* Time to finish output. This is needed to avoid mix-up of this methods output and console command confirmation
*/
chThdSleepMilliseconds(5);
}
/**
* This methods prints all threads and their total times
*/
static void cmd_threads(void) {
#if CH_DBG_THREADS_PROFILING || defined(__DOXYGEN__)
static const char *states[] = { THD_STATE_NAMES };
Thread *tp;
scheduleMsg(&logger, " addr stack prio refs state time");
tp = chRegFirstThread();
while (tp != NULL) {
scheduleMsg(&logger, "%.8lx [%.8lx] %4lu %4lu %9s %lu %s", (uint32_t) tp, 0, (uint32_t) tp->p_prio,
(uint32_t) (0), states[tp->p_state], (uint32_t) tp->p_time, tp->p_name);
tp = chRegNextThread(tp);
}
#else
scheduleMsg(&logger, "CH_DBG_THREADS_PROFILING is not enabled");
#endif
}
/**
* This methods prints the message to whatever is configured as our primary console
*/
void print(const char *format, ...) {
#if !EFI_UART_ECHO_TEST_MODE
if (!isConsoleReady()) {
return;
}
va_list ap;
va_start(ap, format);
chvprintf((BaseSequentialStream*) getConsoleChannel(), format, ap);
va_end(ap);
#endif /* EFI_UART_ECHO_TEST_MODE */
}
void initializeConsole(Logging *sharedLogger) {
initIntermediateLoggingBuffer();
initConsoleLogic(sharedLogger);
startConsole(sharedLogger, &handleConsoleLine);
sayHello();
addConsoleAction("test", sayNothing);
addConsoleAction("hello", sayHello);
#if EFI_HAS_RESET
addConsoleAction("reset", scheduleReset);
#endif
addConsoleAction("fatal", myfatal);
addConsoleAction("error", myerror);
addConsoleAction("threadsinfo", cmd_threads);
}

View File

@ -1,18 +0,0 @@
/**
* @file eficonsole.h
* @brief Console package entry point header
*
* @date Nov 15, 2012
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#pragma once
#ifndef RFICONSOLE_H_
#define RFICONSOLE_H_
#include "datalogging.h"
void initializeConsole(Logging *sharedLogger);
void print(const char *fmt, ...);
#endif /* RFICONSOLE_H_ */

View File

@ -1,704 +0,0 @@
/**
* @file status_loop.cpp
* @brief Human-readable protocol status messages
*
* http://rusefi.com/forum/viewtopic.php?t=263 Dev console overview
* http://rusefi.com/forum/viewtopic.php?t=210 Commands overview
*
*
* @date Mar 15, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*
* This file is part of rusEfi - see http://rusefi.com
*
* rusEfi is free software; you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "main.h"
#include "status_loop.h"
#include "adc_inputs.h"
#if EFI_WAVE_ANALYZER || defined(__DOXYGEN__)
#include "wave_analyzer.h"
#endif
#include "trigger_central.h"
#include "engine_state.h"
#include "io_pins.h"
#include "efiGpio.h"
#include "mmc_card.h"
#include "console_io.h"
#include "malfunction_central.h"
#include "speed_density.h"
#include "advance_map.h"
#include "tunerstudio.h"
#include "fuel_math.h"
#include "main_trigger_callback.h"
#include "engine_math.h"
#include "idle_thread.h"
#include "engine_configuration.h"
#include "rfiutil.h"
#include "svnversion.h"
#include "engine.h"
#include "lcd_controller.h"
#include "settings.h"
#include "rusefi_outputs.h"
extern bool_t main_loop_started;
#if EFI_PROD_CODE || defined(__DOXYGEN__)
// todo: move this logic to algo folder!
#include "rtc_helper.h"
#include "lcd_HD44780.h"
#include "rusefi.h"
#include "pin_repository.h"
#include "flash_main.h"
#include "max31855.h"
#include "vehicle_speed.h"
#endif
extern engine_pins_s enginePins;
extern TriggerCentral triggerCentral;
static bool_t subscription[(int) RO_LAST_ELEMENT];
// this 'true' value is needed for simulator
static volatile bool fullLog = true;
int warningEnabled = true;
//int warningEnabled = FALSE;
extern bool hasFirmwareErrorFlag;
#define FULL_LOGGING_KEY "fl"
static char LOGGING_BUFFER[1400];
static Logging logger("status loop", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
static void setWarningEnabled(int value) {
warningEnabled = value;
}
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
static LoggingWithStorage fileLogger("file logger");
#endif /* EFI_FILE_LOGGING */
static int logFileLineIndex = 0;
#define TAB "\t"
static void reportSensorF(Logging *log, bool fileFormat, const char *caption, const char *units, float value,
int precision) {
if (!fileFormat) {
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
debugFloat(log, caption, value, precision);
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
} else {
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
if (logFileLineIndex == 0) {
append(log, caption);
append(log, TAB);
} else if (logFileLineIndex == 1) {
append(log, units);
append(log, TAB);
} else {
appendFloat(log, value, precision);
append(log, TAB);
}
#endif /* EFI_FILE_LOGGING */
}
}
static void reportSensorI(Logging *log, bool fileFormat, const char *caption, const char *units, int value) {
if (!fileFormat) {
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
debugInt(log, caption, value);
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
} else {
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
if (logFileLineIndex == 0) {
append(log, caption);
append(log, TAB);
} else if (logFileLineIndex == 1) {
append(log, units);
append(log, TAB);
} else {
appendPrintf(log, "%d%s", value, TAB);
}
#endif /* EFI_FILE_LOGGING */
}
}
EXTERN_ENGINE
;
static void printSensors(Logging *log, bool fileFormat) {
// current time, in milliseconds
int nowMs = currentTimeMillis();
float sec = ((float) nowMs) / 1000;
reportSensorF(log, fileFormat, "time", "", sec, 3);
int rpm = 0;
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
rpm = getRpmE(engine);
reportSensorI(log, fileFormat, "rpm", "RPM", rpm);
// reportSensorF(log, fileFormat, "TRG_0_DUTY", "%", getTriggerDutyCycle(0), 2);
// reportSensorF(log, fileFormat, "TRG_1_DUTY", "%", getTriggerDutyCycle(1), 2);
#endif
if (hasMafSensor()) {
reportSensorF(log, fileFormat, "maf", "V", getMaf(), 2);
reportSensorF(log, fileFormat, "mafr", "kg/hr", getRealMaf(), 2);
}
reportSensorF(log, fileFormat, "ENGINE_LOAD", "x", getEngineLoadT(), 2);
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
if (engineConfiguration->hasMapSensor) {
reportSensorF(log, fileFormat, "MAP", "kPa", getMap(), 2);
// reportSensorF(log, fileFormat, "map_r", "V", getRawMap(), 2);
}
if (hasBaroSensor()) {
reportSensorF(log, fileFormat, "baro", "kPa", getBaroPressure(), 2);
}
if (engineConfiguration->hasAfrSensor) {
reportSensorF(log, fileFormat, "afr", "AFR", getAfr(), 2);
}
#endif
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__)
if (engineConfiguration->hasVehicleSpeedSensor) {
reportSensorF(log, fileFormat, "vss", "kph", getVehicleSpeed(), 2);
}
#endif /* EFI_PROD_CODE */
reportSensorF(log, fileFormat, "ks", "count", engine->knockCount, 0);
// reportSensorF(log, fileFormat, "vref", "V", getVRef(engineConfiguration), 2);
if (hasVBatt(PASS_ENGINE_PARAMETER_F)) {
reportSensorF(log, fileFormat, "vbatt", "V", getVBatt(PASS_ENGINE_PARAMETER_F), 2);
}
reportSensorF(log, fileFormat, "TP", "%", getTPS(PASS_ENGINE_PARAMETER_F), 2);
if (fileFormat) {
reportSensorF(log, fileFormat, "tpsacc", "ms", engine->tpsAccelEnrichment.getTpsEnrichment(PASS_ENGINE_PARAMETER_F), 2);
reportSensorF(log, fileFormat, "advance", "deg", engine->tpsAccelEnrichment.getTpsEnrichment(PASS_ENGINE_PARAMETER_F), 2);
reportSensorF(log, fileFormat, "advance", "deg", getFuelMs(rpm PASS_ENGINE_PARAMETER), 2);
}
if (engineConfiguration->hasCltSensor) {
reportSensorF(log, fileFormat, "CLT", "C", getCoolantTemperature(PASS_ENGINE_PARAMETER_F), 2);
}
reportSensorF(log, fileFormat, "MAT", "C", getIntakeAirTemperature(PASS_ENGINE_PARAMETER_F), 2);
// debugFloat(&logger, "tch", getTCharge1(tps), 2);
}
void writeLogLine(void) {
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
if (!main_loop_started)
return;
resetLogging(&fileLogger);
printSensors(&fileLogger, true);
if (isSdCardAlive()) {
appendPrintf(&fileLogger, "\r\n");
appendToLog(fileLogger.buffer);
logFileLineIndex++;
}
#endif /* EFI_FILE_LOGGING */
}
static void printState(void) {
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
// todo: make SWO work
// char *msg = "hello\r\n";
// for(int i=0;i<strlen(msg);i++) {
// ITM_SendChar(msg[i]);
// }
int rpm = getRpmE(engine);
if (subscription[(int) RO_TOTAL_REVOLUTION_COUNTER])
debugInt(&logger, "ckp_c", getCrankEventCounter());
if (subscription[(int) RO_RUNNING_REVOLUTION_COUNTER])
debugInt(&logger, "ckp_r", triggerCentral.triggerState.runningRevolutionCounter);
if (subscription[(int) RO_RUNNING_TRIGGER_ERROR])
debugInt(&logger, "trg_r_errors", triggerCentral.triggerState.runningTriggerErrorCounter);
if (subscription[(int) RO_RUNNING_ORDERING_TRIGGER_ERROR])
debugInt(&logger, "trg_r_order_errors", triggerCentral.triggerState.runningOrderingErrorCounter);
if (subscription[(int) RO_WAVE_CHART_CURRENT_SIZE])
debugInt(&logger, "wave_chart_current", 0);
// debugInt(&logger, "idl", getIdleSwitch());
// debugFloat(&logger, "table_spark", getAdvance(rpm, getMaf()), 2);
float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_F);
float baseFuel = getBaseFuel(rpm PASS_ENGINE_PARAMETER);
debugFloat(&logger, "fuel_base", baseFuel, 2);
// debugFloat(&logger, "fuel_iat", getIatCorrection(getIntakeAirTemperature()), 2);
// debugFloat(&logger, "fuel_clt", getCltCorrection(getCoolantTemperature()), 2);
debugFloat(&logger, "fuel_lag", engine->injectorLagMs, 2);
debugFloat(&logger, "fuel", getFuelMs(rpm PASS_ENGINE_PARAMETER), 2);
debugFloat(&logger, "timing", engine->engineState.timingAdvance, 2);
// float map = getMap();
#endif /* EFI_SHAFT_POSITION_INPUT */
}
#define INITIAL_FULL_LOG TRUE
//#define INITIAL_FULL_LOG FALSE
volatile int needToReportStatus = FALSE;
static int prevCkpEventCounter = -1;
static LoggingWithStorage logger2("main event handler");
static void printStatus(void) {
needToReportStatus = TRUE;
}
/**
* Time when the firmware version was reported last time, in seconds
* TODO: implement a request/response instead of just constantly sending this out
*/
static systime_t timeOfPreviousPrintVersion = (systime_t) -1;
#if EFI_PROD_CODE || defined(__DOXYGEN__)
static void printOutPin(const char *pinName, brain_pin_e hwPin) {
appendPrintf(&logger, "outpin%s%s@%s%s", DELIMETER, pinName, hwPortname(hwPin), DELIMETER);
}
#endif /* EFI_PROD_CODE */
static void printInfo(systime_t nowSeconds) {
/**
* we report the version every 4 seconds - this way the console does not need to
* request it and we will display it pretty soon
*/
if (overflowDiff(nowSeconds, timeOfPreviousPrintVersion) < 4) {
return;
}
timeOfPreviousPrintVersion = nowSeconds;
appendPrintf(&logger, "rusEfiVersion%s%d@%s %s%s", DELIMETER, getRusEfiVersion(), VCS_VERSION,
getConfigurationName(engineConfiguration->engineType),
DELIMETER);
#if EFI_PROD_CODE || defined(__DOXYGEN__)
printOutPin(CRANK1, boardConfiguration->triggerInputPins[0]);
printOutPin(CRANK2, boardConfiguration->triggerInputPins[1]);
#if EFI_WAVE_ANALYZER || defined(__DOXYGEN__)
printOutPin(WA_CHANNEL_1, boardConfiguration->logicAnalyzerPins[0]);
printOutPin(WA_CHANNEL_2, boardConfiguration->logicAnalyzerPins[1]);
#endif
for (int i = 0; i < engineConfiguration->specs.cylindersCount; i++) {
printOutPin(enginePins.coils[i].name, boardConfiguration->ignitionPins[i]);
printOutPin(enginePins.injectors[i].name, boardConfiguration->injectionPins[i]);
}
#endif
}
static systime_t timeOfPreviousReport = (systime_t) -1;
extern char errorMessageBuffer[200];
/**
* @brief Sends all pending data to dev console
*/
void updateDevConsoleState(Engine *engine) {
if (!isConsoleReady()) {
return;
}
// looks like this is not needed anymore
// checkIfShouldHalt();
printPending();
/**
* this should go before the firmware error so that console can detect connection
*/
printSensors(&logger, false);
#if EFI_PROD_CODE || defined(__DOXYGEN__)
// todo: unify with simulator!
if (hasFirmwareError()) {
scheduleMsg(&logger, "FATAL error: %s", errorMessageBuffer);
warningEnabled = false;
scheduleLogging(&logger);
return;
}
#endif
#if (EFI_PROD_CODE && HAL_USE_ADC) || defined(__DOXYGEN__)
pokeAdcInputs();
#endif
if (!fullLog) {
return;
}
systime_t nowSeconds = getTimeNowSeconds();
printInfo(nowSeconds);
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
int currentCkpEventCounter = getCrankEventCounter();
if (prevCkpEventCounter == currentCkpEventCounter && timeOfPreviousReport == nowSeconds) {
return;
}
timeOfPreviousReport = nowSeconds;
prevCkpEventCounter = currentCkpEventCounter;
#else
chThdSleepMilliseconds(200);
#endif
printState();
#if EFI_WAVE_ANALYZER
printWave(&logger);
#endif
scheduleLogging(&logger);
}
#if EFI_PROD_CODE
/*
* command example:
* sfm 3500 400
* that would be 'show fuel for rpm 3500 maf 4.0'
*/
static void showFuelInfo2(float rpm, float engineLoad) {
float baseFuelMs = getBaseTableFuel(engineConfiguration, (int) rpm, engineLoad);
scheduleMsg(&logger, "SD magic fuel %f", sdMath(engineConfiguration, 100, 100, 14.7, convertCelsiusToKelvin(20)));
scheduleMsg(&logger, "inj flow %fcc/min displacement %fL", engineConfiguration->injector.flow,
engineConfiguration->specs.displacement);
scheduleMsg(&logger2, "algo=%s/pump=%s", getEngine_load_mode_e(engineConfiguration->algorithm),
boolToString(enginePins.fuelPumpRelay.getLogicValue()));
scheduleMsg(&logger2, "phase=%f correction=%f", getinjectionOffset(rpm), engineConfiguration->globalFuelCorrection);
scheduleMsg(&logger2, "baro correction=%f", engine->engineState.baroCorrection);
#if EFI_ENGINE_CONTROL
scheduleMsg(&logger, "base cranking fuel %f", engineConfiguration->cranking.baseFuel);
scheduleMsg(&logger2, "cranking fuel: %f", getCrankingFuel(PASS_ENGINE_PARAMETER_F));
if (engine->rpmCalculator.isRunning()) {
float iatCorrection = engine->engineState.iatFuelCorrection;
float cltCorrection = engine->engineState.cltFuelCorrection;
float injectorLag = engine->injectorLagMs;
scheduleMsg(&logger2, "rpm=%f engineLoad=%f", rpm, engineLoad);
scheduleMsg(&logger2, "baseFuel=%f", baseFuelMs);
scheduleMsg(&logger2, "iatCorrection=%f cltCorrection=%f injectorLag=%f", iatCorrection, cltCorrection,
injectorLag);
float value = getRunningFuel(baseFuelMs, (int) rpm PASS_ENGINE_PARAMETER);
scheduleMsg(&logger2, "injection pulse width: %f", value);
}
#endif
}
#if EFI_ENGINE_CONTROL
static void showFuelInfo(void) {
showFuelInfo2((float) getRpmE(engine), getEngineLoadT(PASS_ENGINE_PARAMETER_F));
}
#endif
#endif /* EFI_PROD_CODE */
static THD_WORKING_AREA(lcdThreadStack, UTILITY_THREAD_STACK_SIZE);
/**
* blinking thread to show that we are alive
* that's a trivial task - a smaller stack should work
*/
static THD_WORKING_AREA(blinkingStack, 128);
static OutputPin communicationPin;
OutputPin checkEnginePin;
OutputPin warningPin;
OutputPin runningPin;
extern engine_pins_s enginePins;
static OutputPin *leds[] = { &warningPin, &runningPin, &enginePins.errorLedPin, &communicationPin, &checkEnginePin };
static void initStatisLeds() {
#if EFI_PROD_CODE
outputPinRegister("communication status 1", &communicationPin,
LED_COMMUNICATION_PORT, LED_COMMUNICATION_PIN);
#endif
#if EFI_WARNING_LED
outputPinRegister("warning", &warningPin, LED_WARNING_PORT,
LED_WARNING_PIN);
outputPinRegister("is running status", &runningPin, LED_RUNNING_STATUS_PORT,
LED_RUNNING_STATUS_PIN);
#endif /* EFI_WARNING_LED */
}
/**
* This method would blink all the LEDs just to test them
*/
static void initialLedsBlink(void) {
int size = sizeof(leds) / sizeof(leds[0]);
for (int i = 0; i < size; i++)
leds[i]->setValue(1);
chThdSleepMilliseconds(100);
for (int i = 0; i < size; i++)
leds[i]->setValue(0);
}
int blinkingPeriod = 33;
/**
* this is useful to test connectivity
*/
static void setBlinkingPeriod(int value) {
if (value > 0)
blinkingPeriod = value;
}
#if EFI_PROD_CODE || defined(__DOXYGEN__)
extern efitick_t lastDecodingErrorTime;
static bool_t isTriggerErrorNow() {
bool_t justHadError = (getTimeNowNt() - lastDecodingErrorTime) < US2NT(2 * 1000 * 3 * blinkingPeriod);
return justHadError || isTriggerDecoderError();
}
/**
* this thread has a lower-then-usual stack size so we cannot afford *print* methods here
*/
static void blinkingThread(void *arg) {
(void) arg;
chRegSetThreadName("communication blinking");
initialLedsBlink();
while (true) {
int delayMs = isConsoleReady() ? 3 * blinkingPeriod : blinkingPeriod;
#if EFI_INTERNAL_FLASH || defined(__DOXYGEN__)
if (getNeedToWriteConfiguration()) {
delayMs = 2 * delayMs;
}
#endif
communicationPin.setValue(0);
warningPin.setValue(0);
chThdSleepMilliseconds(delayMs);
communicationPin.setValue(1);
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
if (isTriggerErrorNow() || isIgnitionTimingError())
warningPin.setValue(1);
#endif
chThdSleepMilliseconds(delayMs);
}
}
#endif /* EFI_PROD_CODE */
static void lcdThread(void *arg) {
(void)arg;
chRegSetThreadName("lcd");
while (true) {
#if EFI_HD44780_LCD
updateHD44780lcd(engine);
#endif
chThdSleepMilliseconds(engineConfiguration->bc.lcdThreadPeriod);
}
}
#if EFI_TUNER_STUDIO
extern fuel_Map3D_t veMap;
void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ENGINE_PARAMETER_S) {
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
int rpm = getRpmE(engine);
#else
int rpm = 0;
#endif
float tps = getTPS(PASS_ENGINE_PARAMETER_F);
float coolant = getCoolantTemperature(PASS_ENGINE_PARAMETER_F);
float intake = getIntakeAirTemperature(PASS_ENGINE_PARAMETER_F);
float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_F);
float baseFuelMs = getBaseFuel(rpm PASS_ENGINE_PARAMETER);
// header
tsOutputChannels->tsConfigVersion = TS_FILE_VERSION;
// engine state
tsOutputChannels->rpm = rpm;
tsOutputChannels->coolant_temperature = coolant;
tsOutputChannels->intakeAirTemperature = intake;
tsOutputChannels->throttlePositon = tps;
if (hasMafSensor()) {
tsOutputChannels->massAirFlowVoltage = getMaf();
}
tsOutputChannels->massAirFlowValue = getRealMaf();
tsOutputChannels->veValue = veMap.getValue(getMap(), rpm);
tsOutputChannels->airFuelRatio = getAfr();
if (hasVBatt(PASS_ENGINE_PARAMETER_F)) {
tsOutputChannels->vBatt = getVBatt(PASS_ENGINE_PARAMETER_F);
}
tsOutputChannels->tpsADC = getTPS10bitAdc(PASS_ENGINE_PARAMETER_F);
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
tsOutputChannels->baroPressure = getBaroPressure();
#endif /* EFI_ANALOG_SENSORS */
tsOutputChannels->manifold_air_pressure = getMap();
tsOutputChannels->engineLoad = engineLoad;
tsOutputChannels->rpmAcceleration = engine->rpmCalculator.getRpmAcceleration();
tsOutputChannels->currentMapAccelDelta = engine->mapAccelEnrichment.getMapEnrichment(PASS_ENGINE_PARAMETER_F) * 100 / getMap();
tsOutputChannels->tpsAccelFuel = engine->tpsAccelEnrichment.getTpsEnrichment(PASS_ENGINE_PARAMETER_F);
tsOutputChannels->deltaTps = engine->tpsAccelEnrichment.getDelta();
tsOutputChannels->triggerErrorsCounter = triggerCentral.triggerState.totalTriggerErrorCounter;
tsOutputChannels->baroCorrection = engine->engineState.baroCorrection;
tsOutputChannels->pedalPosition = getPedalPosition(PASS_ENGINE_PARAMETER_F);
tsOutputChannels->knockCount = engine->knockCount;
tsOutputChannels->injectorDutyCycle = getInjectorDutyCycle(rpm PASS_ENGINE_PARAMETER);
tsOutputChannels->fuelLevel = engine->engineState.fuelLevel;
tsOutputChannels->hasFatalError = hasFirmwareError();
tsOutputChannels->checkEngine = hasErrorCodes();
#if EFI_PROD_CODE || defined(__DOXYGEN__)
tsOutputChannels->isTriggerError = isTriggerErrorNow();
#if EFI_MAX_31855 || defined(__DOXYGEN__)
for (int i = 0; i < EGT_CHANNEL_COUNT; i++)
tsOutputChannels->egtValues.values[i] = getEgtValue(i);
#endif /* EFI_MAX_31855 */
#if EFI_INTERNAL_FLASH || defined(__DOXYGEN__)
tsOutputChannels->needBurn = getNeedToWriteConfiguration();
#endif
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
tsOutputChannels->hasSdCard = isSdCardAlive();
#endif
tsOutputChannels->isFuelPumpOn = enginePins.fuelPumpRelay.getLogicValue();
tsOutputChannels->isFanOn = enginePins.fanRelay.getLogicValue();
tsOutputChannels->isO2HeaterOn = enginePins.o2heater.getLogicValue();
tsOutputChannels->isIgnitionEnabled = engineConfiguration->isIgnitionEnabled;
tsOutputChannels->injection_enabled = engineConfiguration->isInjectionEnabled;
tsOutputChannels->cylinder_cleanup_enabled = engineConfiguration->isCylinderCleanupEnabled;
tsOutputChannels->cylinder_cleanup_activated = engine->isCylinderCleanupMode;
tsOutputChannels->secondTriggerChannelEnabled = engineConfiguration->secondTriggerChannelEnabled;
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__)
tsOutputChannels->vehicleSpeedKph = getVehicleSpeed();
#endif /* EFI_VEHICLE_SPEED */
tsOutputChannels->isCltError = !isValidCoolantTemperature(getCoolantTemperature(PASS_ENGINE_PARAMETER_F));
tsOutputChannels->isIatError = !isValidIntakeAirTemperature(getIntakeAirTemperature(PASS_ENGINE_PARAMETER_F));
#endif /* EFI_PROD_CODE */
tsOutputChannels->knockNowIndicator = engine->knockCount > 0;
tsOutputChannels->knockEverIndicator = engine->knockEver;
tsOutputChannels->clutchUpState = engine->clutchUpState;
tsOutputChannels->clutchDownState = engine->clutchDownState;
tsOutputChannels->tCharge = getTCharge(rpm, tps, coolant, intake);
float timing = engine->engineState.timingAdvance;
tsOutputChannels->ignitionAdvance = timing > 360 ? timing - 720 : timing;
tsOutputChannels->sparkDwell = ENGINE(engineState.sparkDwell);
tsOutputChannels->baseFuel = baseFuelMs;
tsOutputChannels->pulseWidthMs = getFuelMs(rpm PASS_ENGINE_PARAMETER);
tsOutputChannels->crankingFuelMs = getCrankingFuel(PASS_ENGINE_PARAMETER_F);
}
extern TunerStudioOutputChannels tsOutputChannels;
void prepareTunerStudioOutputs(void) {
// sensor state for EFI Analytics Tuner Studio
updateTunerStudioState(&tsOutputChannels PASS_ENGINE_PARAMETER);
}
#endif /* EFI_TUNER_STUDIO */
static void subscribe(int outputOrdinal) {
subscription[outputOrdinal] = true;
}
static void unsubscribe(int outputOrdinal) {
subscription[outputOrdinal] = false;
}
void initStatusLoop(Engine *engine) {
setFullLog(INITIAL_FULL_LOG);
addConsoleActionI(FULL_LOGGING_KEY, setFullLog);
addConsoleActionI("warn", setWarningEnabled);
#if EFI_PROD_CODE
#if EFI_ENGINE_CONTROL
addConsoleActionFF("fuelinfo2", (VoidFloatFloat) showFuelInfo2);
addConsoleAction("fuelinfo", showFuelInfo);
#endif
subscription[(int) RO_TRG1_DUTY] = true;
subscription[(int) RO_TRG2_DUTY] = true;
subscription[(int) RO_TRG3_DUTY] = false;
subscription[(int) RO_TRG4_DUTY] = false;
subscription[(int) RO_TOTAL_REVOLUTION_COUNTER] = true;
subscription[(int) RO_RUNNING_REVOLUTION_COUNTER] = false;
addConsoleActionI("subscribe", subscribe);
addConsoleActionI("unsubscribe", unsubscribe);
addConsoleActionI("set_led_blinking_period", setBlinkingPeriod);
addConsoleAction("status", printStatus);
#endif /* EFI_PROD_CODE */
}
void startStatusThreads(Engine *engine) {
// todo: refactoring needed, this file should probably be split into pieces
chThdCreateStatic(lcdThreadStack, sizeof(lcdThreadStack), NORMALPRIO, (tfunc_t) lcdThread, engine);
#if EFI_PROD_CODE || defined(__DOXYGEN__)
initStatisLeds();
chThdCreateStatic(blinkingStack, sizeof(blinkingStack), NORMALPRIO, (tfunc_t) blinkingThread, NULL);
#endif /* EFI_PROD_CODE */
}
void setFullLog(int value) {
print("Setting full logging: %s\r\n", boolToString(value));
printMsg(&logger, "%s%d", FULL_LOGGING_KEY, value);
fullLog = value;
}
bool getFullLog(void) {
return fullLog;
}

View File

@ -1,21 +0,0 @@
/**
* @file status_loop.h
*
* @date Mar 15, 2013
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef CONSOLE_LOOP_H_
#define CONSOLE_LOOP_H_
#include "engine.h"
void updateDevConsoleState(Engine *engine);
void prepareTunerStudioOutputs(void);
void startStatusThreads(Engine *engine);
void initStatusLoop(Engine *engine);
void writeLogLine(void);
bool getFullLog(void);
void setFullLog(int value);
#endif /* CONSOLE_LOOP_H_ */

View File

@ -1,2 +0,0 @@
CONSOLEUTILSRC = $(PROJECT_DIR)/console_util/rfiutil.c

View File

@ -1,73 +0,0 @@
/**
* @file rfiutil.c
* @brief Number to string conversion code
*
* @date Nov 15, 2012
* @author Andrey Belomutskiy, (c) 2012-2015
*
* This file is part of rusEfi - see http://rusefi.com
*
* rusEfi is free software; you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#include "main.h"
#include "rfiutil.h"
/*
not used, not sure if we still need it. I guess we will remove it in 2015
int mylog10(int param) {
if (param < 10)
return 0;
if (param < 100)
return 1;
if (param < 1000)
return 2;
if (param < 10000)
return 3;
if (param < 100000)
return 4;
if (param < 1000000)
return 5;
if (param < 10000000)
return 6;
if (param < 100000000)
return 7;
#warning This would be better without recursion
return mylog10(param / 10) + 1;
}
*/
/*
char hexChar(int v) {
v = v & 0xF;
if (v < 10)
return (char)('0' + v);
return 'A' - 10 + v;
}
*/
void chVTSetAny(virtual_timer_t *vtp, systime_t time, vtfunc_t vtfunc, void *par) {
bool wasLocked = lockAnyContext();
/**
* todo: this could be simplified once we migrate to ChibiOS 3.0
* See http://www.chibios.org/dokuwiki/doku.php?id=chibios:howtos:porting_from_2_to_3
*/
if (chVTIsArmedI(vtp)) {
chVTResetI(vtp);
}
chVTSetI(vtp, time, vtfunc, par);
if (!wasLocked) {
unlockAnyContext();
}
}

View File

@ -1,37 +0,0 @@
/*
* @file rfiutil.h
* @brief Number to string conversion header
*
* @date Nov 15, 2012
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#ifndef RFIUTIL_H_
#define RFIUTIL_H_
#include "global.h"
#include "histogram.h"
#define isLocked() (dbg_lock_cnt > 0)
/**
* Unfortunately ChibiOS has two versions of methods for different
* contexts.
*/
#define isIsrContext() (dbg_isr_cnt > 0)
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
//char hexC(int v);
void chVTSetAny(virtual_timer_t *vtp, systime_t time, vtfunc_t vtfunc, void *par);
#ifdef __cplusplus
}
void printHistogram(Logging *logging, histogram_s *histogram);
#endif /* __cplusplus */
#endif /* RFIUTIL_H_ */

View File

@ -1,103 +0,0 @@
/**
* @file PwmTester.cpp
* This is a tool to measure rusEfi PWM generation quality
*
* @date Apr 29, 2014
* @author Andrey Belomutskiy, (c) 2012-2015
*/
#include "main.h"
#if EFI_PWM_TESTER
#include "PwmTester.h"
#include "EfiWave.h"
#include "pwm_generator_logic.h"
#include "engine.h"
#include "pwm_generator.h"
static LoggingWithStorage logger;
static SimplePwm pwmTest[5];
extern OutputPin warningPin;
extern engine_pins_s enginePins;
EXTERN_ENGINE;
static void startPwmTest(int freq) {
scheduleMsg(&logger, "running pwm test @%d", freq);
engine->isRunningPwmTest = true;
// PD13 pin is initialized elsewhere already
startSimplePwm(&pwmTest[0], "tester", &warningPin, 10, 0.5f, applyPinState);
/**
* See custom_engine.cpp for pinout
*/
// currently this is PB9 by default - see boardConfiguration->injectionPins
startSimplePwm(&pwmTest[1], "tester", &enginePins.injectors[0], freq / 1.3333333333, 0.5f, applyPinState);
// currently this is PE2 by default
startSimplePwm(&pwmTest[2], "tester", &enginePins.injectors[1], freq / 1000, 0.5f, applyPinState);
// currently this is PB8 by default
startSimplePwm(&pwmTest[3], "tester", &enginePins.injectors[2], freq, 0.5, applyPinState);
// currently this is PB7 by default
startSimplePwm(&pwmTest[4], "tester", &enginePins.injectors[3], freq / 33.33333333333, 0.5, applyPinState);
}
static scheduling_s ioTest;
static OutputSignal outSignals[8];
static void testCallback(void *arg) {
/**
* 0.1ms from now please squirt for 1.6ms
*/
float delayMs = 0.1;
float durationMs = 1.6;
efitimeus_t nowUs = getTimeNowUs();
scheduleOutput(&outSignals[0], nowUs, delayMs, durationMs);
scheduleOutput(&outSignals[1], nowUs, delayMs, durationMs);
scheduleOutput(&outSignals[2], nowUs, delayMs, durationMs);
scheduleOutput(&outSignals[3], nowUs, delayMs, durationMs);
scheduleOutput(&outSignals[4], nowUs, delayMs, durationMs);
scheduleOutput(&outSignals[5], nowUs, delayMs, durationMs);
scheduleOutput(&outSignals[6], nowUs, delayMs, durationMs);
scheduleOutput(&outSignals[7], nowUs, delayMs, durationMs);
/**
* this would re-schedule another callback in 2ms from now
*/
scheduleTask("test", &ioTest, MS2US(2), testCallback, NULL);
}
void initPwmTester(void) {
initLogging(&logger, "pwm test");
addConsoleActionI("pwmtest", startPwmTest);
startPwmTest(1000);
/**
* injector channels #4-#8 are used for individual squirt test
*/
// todo: yet, it's some horrible code duplication
outSignals[0].output = &enginePins.injectors[4];
outSignals[1].output = &enginePins.injectors[5];
outSignals[2].output = &enginePins.injectors[6];
outSignals[3].output = &enginePins.injectors[7];
outSignals[4].output = &enginePins.injectors[8];
outSignals[5].output = &enginePins.injectors[9];
outSignals[6].output = &enginePins.injectors[10];
outSignals[7].output = &enginePins.injectors[11];
/**
* this would schedule a callback in 2ms from now
*/
scheduleTask("test", &ioTest, MS2US(2), testCallback, NULL);
}
#endif

Some files were not shown because too many files have changed in this diff Show More