Added Software projects
git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@55 9fe90eed-be63-e94b-8204-d34ff4c2ff93
This commit is contained in:
@@ -0,0 +1,640 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cygwin.exe.debug.1822617334">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cygwin.exe.debug.1822617334" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.Cygwin_PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" 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"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="elf" artifactName="BootLoader" 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="rm -rf" description="" id="cdt.managedbuild.config.gnu.cygwin.exe.debug.1822617334" name="Debug" parent="cdt.managedbuild.config.gnu.cygwin.exe.debug" postannouncebuildStep="Build HEX & Symbol files" postbuildStep="arm-elf-objcopy ${BuildArtifactFileName} -O ihex ${BuildArtifactFileBaseName}.hex && arm-elf-nm -n ${BuildArtifactFileName} > ${BuildArtifactFileBaseName}.sym " preannouncebuildStep="" prebuildStep="">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cygwin.exe.debug.1822617334." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cygwin.exe.debug.475123734" name="Cygwin GCC" superClass="cdt.managedbuild.toolchain.gnu.cygwin.exe.debug">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.cygwin.exe.debug.1571482679" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.cygwin.exe.debug"/>
|
||||
<builder buildPath="${workspace_loc:/BootLoader/Debug}" id="cdt.managedbuild.target.gnu.builder.cygwin.exe.debug.169364774" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.cygwin.exe.debug"/>
|
||||
<tool command="arm-elf-as" id="cdt.managedbuild.tool.gnu.assembler.cygwin.exe.debug.2039043188" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.cygwin.exe.debug">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1800208006" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.cygwin.base.1287807221" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.cygwin.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.debug.1018125982" name="Cygwin C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.debug">
|
||||
<option id="gnu.cpp.compiler.cygwin.exe.debug.option.optimization.level.743353311" name="Optimization Level" superClass="gnu.cpp.compiler.cygwin.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.cygwin.exe.debug.option.debugging.level.214016809" name="Debug Level" superClass="gnu.cpp.compiler.cygwin.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool command="arm-elf-gcc" id="cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug.1736357620" name="Cygwin C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.cygwin.exe.debug.option.optimization.level.387927747" name="Optimization Level" superClass="gnu.c.compiler.cygwin.exe.debug.option.optimization.level" value="gnu.c.optimization.level.more" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.cygwin.exe.debug.option.debugging.level.309309572" name="Debug Level" superClass="gnu.c.compiler.cygwin.exe.debug.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.683380352" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/FreeRTOS/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/Drivers}""/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.misc.other.1132712743" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fomit-frame-pointer -mcpu=arm7tdmi -Wa,-adhlns=${OUTPUT_PREFIX}.lst -mthumb-interwork" valueType="string"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.267432365" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="ROWLEY_LPC23xx"/>
|
||||
<listOptionValue builtIn="false" value="ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\)"/>
|
||||
<listOptionValue builtIn="false" value="PACK_STRUCT_END=__attribute\(\(packed\)\)"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin.240736807" superClass="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin"/>
|
||||
</tool>
|
||||
<tool command="arm-elf-gcc" commandLinePattern="${COMMAND} ${FLAGS} "${workspace_loc:/BootLoader/bootbl.s}" ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.c.linker.cygwin.exe.debug.2033802624" name="Cygwin C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.cygwin.exe.debug">
|
||||
<option id="gnu.c.link.option.nostart.393578512" name="Do not use standard start files (-nostartfiles)" superClass="gnu.c.link.option.nostart" value="true" valueType="boolean"/>
|
||||
<option id="gnu.c.link.option.libs.929241096" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="Drivers"/>
|
||||
</option>
|
||||
<option id="gnu.c.link.option.paths.2045578413" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/Drivers/Debug}""/>
|
||||
</option>
|
||||
<option id="gnu.c.link.option.other.1386441755" name="Other options (-Xlinker [option])" superClass="gnu.c.link.option.other" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-M"/>
|
||||
<listOptionValue builtIn="false" value="-Map=${BuildArtifactFileBaseName}.map"/>
|
||||
<listOptionValue builtIn="false" value="--error-unresolved-symbols"/>
|
||||
</option>
|
||||
<option id="gnu.c.link.option.ldflags.1971598579" name="Linker flags" superClass="gnu.c.link.option.ldflags" value="-T"${workspace_loc:/BootLoader/lpc2368bl.ld}" -mthumb-interwork" valueType="string"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1562844765" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.cygwin.exe.debug.378779751" name="Cygwin C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.cygwin.exe.debug"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<fileInfo id="cdt.managedbuild.config.gnu.cygwin.exe.debug.1822617334.1927321613" name="appImage.c" rcbsApplicability="disable" resourcePath="appImage.c" toolsToInvoke="cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug.1736357620.1841951792">
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug.1736357620.1841951792" name="Cygwin C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug.1736357620">
|
||||
<option id="gnu.c.compiler.option.misc.other.16529659" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fomit-frame-pointer -mcpu=arm7tdmi -Wa,-adhlns=appImage.lst -mthumb-interwork" valueType="string"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin.614418320" superClass="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin"/>
|
||||
</tool>
|
||||
<tool announcement="Invoking: Resource Custom Build Step" command="" customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.686390080" name="Resource Custom Build Step">
|
||||
<inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.1697795953" name="Resource Custom Build Step Input Type">
|
||||
<additionalInput kind="additionalinputdependency" paths=""/>
|
||||
</inputType>
|
||||
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.1751288609" name="Resource Custom Build Step Output Type" outputNames=""/>
|
||||
</tool>
|
||||
</fileInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="iap.s|bootbl.s|boot.s" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
|
||||
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cygwin.exe.release.1492194825;cdt.managedbuild.config.gnu.cygwin.exe.release.1492194825.;cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.release.699035238;cdt.managedbuild.tool.gnu.c.compiler.input.cygwin.805945285">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cygwin.exe.debug.1822617334;cdt.managedbuild.config.gnu.cygwin.exe.debug.1822617334.;cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug.1736357620;cdt.managedbuild.tool.gnu.c.compiler.input.cygwin.240736807">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="arm-elf-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cygwin.exe.release.1492194825">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cygwin.exe.release.1492194825" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.Cygwin_PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" 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"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="BootLoader" 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="rm -rf" description="" id="cdt.managedbuild.config.gnu.cygwin.exe.release.1492194825" name="Release" parent="cdt.managedbuild.config.gnu.cygwin.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cygwin.exe.release.1492194825." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cygwin.exe.release.1207631725" name="Cygwin GCC" superClass="cdt.managedbuild.toolchain.gnu.cygwin.exe.release">
|
||||
<targetPlatform id="cdt.managedbuild.target.gnu.platform.cygwin.exe.release.963165440" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.cygwin.exe.release"/>
|
||||
<builder buildPath="${workspace_loc:/BootLoader/Release}" id="cdt.managedbuild.target.gnu.builder.cygwin.exe.release.47010349" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.cygwin.exe.release"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.cygwin.exe.release.532501561" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.cygwin.exe.release">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2047156987" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.cygwin.base.17647796" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.cygwin.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.release.563132892" name="Cygwin C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.release">
|
||||
<option id="gnu.cpp.compiler.cygwin.exe.release.option.optimization.level.1314404243" name="Optimization Level" superClass="gnu.cpp.compiler.cygwin.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.cygwin.exe.release.option.debugging.level.338270375" name="Debug Level" superClass="gnu.cpp.compiler.cygwin.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.release.699035238" name="Cygwin C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.release">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.cygwin.exe.release.option.optimization.level.1282751053" name="Optimization Level" superClass="gnu.c.compiler.cygwin.exe.release.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.cygwin.exe.release.option.debugging.level.140271121" name="Debug Level" superClass="gnu.c.compiler.cygwin.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin.805945285" superClass="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.cygwin.exe.release.240706140" name="Cygwin C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.cygwin.exe.release">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1354318945" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.cygwin.exe.release.818994093" name="Cygwin C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.cygwin.exe.release"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="iap.s|bootbl.s|boot.s" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
|
||||
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cygwin.exe.release.1492194825;cdt.managedbuild.config.gnu.cygwin.exe.release.1492194825.;cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.release.699035238;cdt.managedbuild.tool.gnu.c.compiler.input.cygwin.805945285">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cygwin.exe.debug.1822617334;cdt.managedbuild.config.gnu.cygwin.exe.debug.1822617334.;cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug.1736357620;cdt.managedbuild.tool.gnu.c.compiler.input.cygwin.240736807">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="arm-elf-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="BootLoader.cdt.managedbuild.target.gnu.cygwin.exe.1365251609" name="Executable" projectType="cdt.managedbuild.target.gnu.cygwin.exe"/>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>BootLoader</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>Drivers</project>
|
||||
<project>inc</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${workspace_loc:/BootLoader/Debug}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,187 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* CommListeners.c - v0.1 (c) 2008 Micro-key bv
|
||||
* ---------------------------------------------------------------------------
|
||||
* Micro-key bv
|
||||
* Industrieweg 28, 9804 TG Noordhorn
|
||||
* Postbus 92, 9800 AB Zuidhorn
|
||||
* The Netherlands
|
||||
* Tel: +31 594 503020
|
||||
* Fax: +31 594 505825
|
||||
* Email: support@microkey.nl
|
||||
* Web: www.microkey.nl
|
||||
* ---------------------------------------------------------------------------
|
||||
* Description:
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Feb 15, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "types.h"
|
||||
#include "CommListeners.h"
|
||||
#include "IspProtocol.h"
|
||||
#include "serial.h"
|
||||
#include "bus.h"
|
||||
#include "crc.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define ACKNOWLEDGE_MSGSIZE 6
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
int com1IspHandler;
|
||||
int com2IspHandler;
|
||||
int bus1IspHandler;
|
||||
int bus2IspHandler;
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
void sendAckOnCom1(t_isp_responses response);
|
||||
void sendAckOnCom2(t_isp_responses response);
|
||||
void sendAckOnBus1(t_isp_responses response);
|
||||
void sendAckOnBus2(t_isp_responses response);
|
||||
UINT8 *createAckMessage(t_isp_responses response );
|
||||
|
||||
/** \brief Initialises the COM1 listener for handling IspProtocol on COM1 */
|
||||
void initCom1Listener()
|
||||
{
|
||||
com1IspHandler = ispInitProtocol( sendAckOnCom1 );
|
||||
}
|
||||
|
||||
/** \brief Initialises the COM2 listener for handling IspProtocol on COM2 */
|
||||
void initCom2Listener()
|
||||
{
|
||||
com2IspHandler = ispInitProtocol( sendAckOnCom2 );
|
||||
|
||||
}
|
||||
|
||||
/** \brief Initialises the BUS1 listener for handling IspProtocol on BUS1 */
|
||||
void initBus1Listener()
|
||||
{
|
||||
bus1IspHandler = ispInitProtocol( sendAckOnBus1 );
|
||||
}
|
||||
|
||||
/** \brief Initialises the BUS2 listener for handling IspProtocol on BUS2 */
|
||||
void initBus2Listener()
|
||||
{
|
||||
bus2IspHandler = ispInitProtocol( sendAckOnBus2 );
|
||||
}
|
||||
|
||||
|
||||
/** \brief Does IspProtocol handling for fresh received bytes on COM1 */
|
||||
void listen2Com1()
|
||||
{
|
||||
UINT8 byte;
|
||||
if (serGet( COM1, &byte) == TRUE)
|
||||
{
|
||||
ispHandleRxByte( com1IspHandler, byte );
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Does IspProtocol handling for fresh received bytes on COM2 */
|
||||
void listen2Com2()
|
||||
{
|
||||
UINT8 byte;
|
||||
static int nrReceivedBytes = 0;;
|
||||
if (serGet( COM2, &byte) == TRUE)
|
||||
{
|
||||
nrReceivedBytes++;
|
||||
ispHandleRxByte( com2IspHandler, byte );
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Does IspProtocol handling for fresh received bytes on BUS1 */
|
||||
void listen2Bus1()
|
||||
{
|
||||
UINT8 byte;
|
||||
if (busGet( BUS1, &byte) == TRUE)
|
||||
{
|
||||
ispHandleRxByte( bus1IspHandler, byte );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** \brief Does IspProtocol handling for fresh received bytes on BUS2 */
|
||||
void listen2Bus2()
|
||||
{
|
||||
UINT8 byte;
|
||||
if (busGet( BUS2, &byte) == TRUE)
|
||||
{
|
||||
ispHandleRxByte( bus2IspHandler, byte );
|
||||
}
|
||||
}
|
||||
|
||||
void sendAckOnCom1(t_isp_responses response)
|
||||
{
|
||||
UINT8 *message = createAckMessage( response );
|
||||
|
||||
// Send over COM1
|
||||
serWrite(COM1, ACKNOWLEDGE_MSGSIZE, message);
|
||||
}
|
||||
|
||||
void sendAckOnCom2(t_isp_responses response)
|
||||
{
|
||||
UINT8 *message = createAckMessage( response );
|
||||
|
||||
// Send over COM2
|
||||
serWrite(COM2, ACKNOWLEDGE_MSGSIZE, message);
|
||||
}
|
||||
|
||||
void sendAckOnBus1(t_isp_responses response)
|
||||
{
|
||||
UINT8 *message = createAckMessage( response );
|
||||
|
||||
// Send over BUS1
|
||||
busWrite(BUS1, ACKNOWLEDGE_MSGSIZE, message);
|
||||
}
|
||||
|
||||
void sendAckOnBus2(t_isp_responses response)
|
||||
{
|
||||
UINT8 *message = createAckMessage( response );
|
||||
|
||||
// Send over BUS2
|
||||
busWrite(BUS2, ACKNOWLEDGE_MSGSIZE, message);
|
||||
}
|
||||
|
||||
//
|
||||
UINT8 *createAckMessage(t_isp_responses response )
|
||||
{
|
||||
static UINT8 AcknowledgeMsg[ACKNOWLEDGE_MSGSIZE];
|
||||
UINT16 msgCrc;
|
||||
|
||||
// Assemble message
|
||||
AcknowledgeMsg[0] = ISP_START_BYTE;
|
||||
AcknowledgeMsg[1] = ISP_MSGID_ACKNOWLEDGE;
|
||||
AcknowledgeMsg[2] = 1;
|
||||
AcknowledgeMsg[3] = (UINT8)response;
|
||||
|
||||
// Calculate CRC
|
||||
msgCrc = crcCalc( &(AcknowledgeMsg[1]), 3, 0 );
|
||||
|
||||
AcknowledgeMsg[4] = (UINT8)(msgCrc >> 8);
|
||||
AcknowledgeMsg[5] = (UINT8)(msgCrc & 0x00FF);
|
||||
|
||||
return AcknowledgeMsg;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* CommListeners.h - v0.1 (c) 2008 Micro-key bv
|
||||
* ---------------------------------------------------------------------------
|
||||
* Micro-key bv
|
||||
* Industrieweg 28, 9804 TG Noordhorn
|
||||
* Postbus 92, 9800 AB Zuidhorn
|
||||
* The Netherlands
|
||||
* Tel: +31 594 503020
|
||||
* Fax: +31 594 505825
|
||||
* Email: support@microkey.nl
|
||||
* Web: www.microkey.nl
|
||||
* ---------------------------------------------------------------------------
|
||||
* Description:
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Feb 15, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __COMMLISTENERS_H__
|
||||
#define __COMMLISTENERS_H__
|
||||
/** \file CommListeners.h
|
||||
\brief
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** \brief Initialises the COM1 listener for handling IspProtocol on COM1 */
|
||||
void initCom1Listener();
|
||||
/** \brief Initialises the COM2 listener for handling IspProtocol on COM2 */
|
||||
void initCom2Listener();
|
||||
/** \brief Initialises the BUS1 listener for handling IspProtocol on BUS1 */
|
||||
void initBus1Listener();
|
||||
/** \brief Initialises the BUS2 listener for handling IspProtocol on BUS2 */
|
||||
void initBus2Listener();
|
||||
|
||||
/** \brief Does IspProtocol handling for fresh received bytes on COM1 */
|
||||
void listen2Com1();
|
||||
/** \brief Does IspProtocol handling for fresh received bytes on COM2 */
|
||||
void listen2Com2();
|
||||
/** \brief Does IspProtocol handling for fresh received bytes on BUS1 */
|
||||
void listen2Bus1();
|
||||
/** \brief Does IspProtocol handling for fresh received bytes on BUS2 */
|
||||
void listen2Bus2();
|
||||
|
||||
|
||||
#endif /* __COMMLISTENERS_H__ */
|
||||
@@ -0,0 +1,123 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Crc.c - v0.1 (c) 2008 Micro-key bv
|
||||
* ---------------------------------------------------------------------------
|
||||
* Micro-key bv
|
||||
* Industrieweg 28, 9804 TG Noordhorn
|
||||
* Postbus 92, 9800 AB Zuidhorn
|
||||
* The Netherlands
|
||||
* Tel: +31 594 503020
|
||||
* Fax: +31 594 505825
|
||||
* Email: support@microkey.nl
|
||||
* Web: www.microkey.nl
|
||||
* ---------------------------------------------------------------------------
|
||||
* Description:
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Jan 31, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "crc.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
const UINT16 CRC_table[256] =
|
||||
{
|
||||
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
|
||||
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
|
||||
0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
|
||||
0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
|
||||
0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
|
||||
0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
|
||||
0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
|
||||
0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
|
||||
0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
|
||||
0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
|
||||
0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
|
||||
0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
|
||||
0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
|
||||
0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
|
||||
0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
|
||||
0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
|
||||
0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
|
||||
0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
|
||||
0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
|
||||
0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
|
||||
0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
|
||||
0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
|
||||
0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
|
||||
0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
|
||||
0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
|
||||
0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
|
||||
0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
|
||||
0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
|
||||
0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
|
||||
0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
|
||||
0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
|
||||
0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Calculate 16 bit CRC
|
||||
*
|
||||
* a function to calculate an serial 16 bit CRC
|
||||
* according to the CCITT V.024 standard
|
||||
* To short down the calculation time of the serial CRC
|
||||
* a hash table is used.
|
||||
* This CRC is a fast (with hash table) and good CRC for
|
||||
* data transfer and integrity test of data storage. It can effectively
|
||||
* can detect errors by data transfer. 16 Bit is good for data blocks from
|
||||
* 0 - 4 KByte with a residual risk for non detection of 10E-8 per transfer.
|
||||
* (Multiply this with the error factor of the transmit line)
|
||||
*
|
||||
* The polynoom of CRC-16-CCIT = x^16 + x^12 + x^5 + 1
|
||||
*
|
||||
* \param data Build the crc from this data block
|
||||
* \param length Length of the data block
|
||||
* \param feed Initial CRC value (take 0 by default)
|
||||
*/
|
||||
UINT16 crcCalc(UINT8 * data, UINT32 length, UINT16 feed)
|
||||
{
|
||||
unsigned short crc = feed;
|
||||
unsigned char index;
|
||||
unsigned int count;
|
||||
|
||||
for(count=0; count<length; count++)
|
||||
{
|
||||
index = (unsigned char)(crc >> 8);
|
||||
crc = crc & 0x00FF;
|
||||
crc = (crc << 8);
|
||||
crc &= 0xFF00;
|
||||
crc = crc ^ CRC_table[index] ^ (*data & 0x00FF);
|
||||
data++;
|
||||
}
|
||||
|
||||
return crc;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Crc.h - v0.1 (c) 2008 Micro-key bv
|
||||
* ---------------------------------------------------------------------------
|
||||
* Micro-key bv
|
||||
* Industrieweg 28, 9804 TG Noordhorn
|
||||
* Postbus 92, 9800 AB Zuidhorn
|
||||
* The Netherlands
|
||||
* Tel: +31 594 503020
|
||||
* Fax: +31 594 505825
|
||||
* Email: support@microkey.nl
|
||||
* Web: www.microkey.nl
|
||||
* ---------------------------------------------------------------------------
|
||||
* Description:
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Jan 31, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __CRC_H__
|
||||
#define __CRC_H__
|
||||
/** \file Crc.h
|
||||
\brief
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "types.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
UINT16 crcCalc(UINT8 * pData, UINT32 length, UINT16 feed);
|
||||
|
||||
#endif /* __CRC_H__ */
|
||||
|
||||
@@ -0,0 +1,620 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* IspProtocol.c - v0.1 (c) 2008 Micro-key bv
|
||||
* ---------------------------------------------------------------------------
|
||||
* Micro-key bv
|
||||
* Industrieweg 28, 9804 TG Noordhorn
|
||||
* Postbus 92, 9800 AB Zuidhorn
|
||||
* The Netherlands
|
||||
* Tel: +31 594 503020
|
||||
* Fax: +31 594 505825
|
||||
* Email: support@microkey.nl
|
||||
* Web: www.microkey.nl
|
||||
* ---------------------------------------------------------------------------
|
||||
* Description:
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Feb 13, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "types.h"
|
||||
#include "IspProtocol.h"
|
||||
#include "InternalFlash.h"
|
||||
#include "Crc.h"
|
||||
#include "Leds.h"
|
||||
#include "appImage.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define MAX_ADMINS (4)
|
||||
#define START_BYTE (0xAA)
|
||||
#define MAX_PAYLOAD_SIZE (80)
|
||||
|
||||
#define MSGID_ACKNOWLEDGE (0x01)
|
||||
#define MSGID_UNLOCK (0x02)
|
||||
#define MSGID_ERASEBLOCK (0x03)
|
||||
#define MSGID_PROGRAMFLASH (0x04)
|
||||
#define MSGID_VERIFYFLASH (0x05)
|
||||
#define MSGID_FINISHPROGRAMMING (0x06)
|
||||
#define MSGID_STARTPROGRAM (0x07)
|
||||
|
||||
#define APP_FLASH_START_ADDR (0x00005000)
|
||||
#define APP_FLASH_END_ADDR (0x0007DFFF)
|
||||
#define APP_FLASH_START_SECTOR (5)
|
||||
#define APP_FLASH_END_SECTOR (27)
|
||||
#define APP_IMAGE_LENGTH_OFFS 0x0008
|
||||
#define APP_IMAGE_CRC_OFFS 0x000C
|
||||
|
||||
#define PROGRAM_BLOCK_SIZE (256)
|
||||
#define INVALID_ADDRESS (0xFFFFFFFF)
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
IDLE,
|
||||
MESSAGE_ID,
|
||||
PAYLOAD_SIZE,
|
||||
PAYLOAD,
|
||||
CRC
|
||||
} t_isp_decodestatus;
|
||||
|
||||
typedef struct t_ISP_MESSAGE {
|
||||
UINT8 messageId;
|
||||
UINT8 payloadSize;
|
||||
UINT8 payload[MAX_PAYLOAD_SIZE];
|
||||
UINT16 crc;
|
||||
} t_isp_message;
|
||||
|
||||
typedef struct t_ISP_ADMIN {
|
||||
t_isp_decodestatus status;
|
||||
UINT8 rxIndex;
|
||||
UINT16 rxCrc;
|
||||
t_isp_message rxMessage;
|
||||
t_isp_ack_callback ackCallback;
|
||||
} t_isp_admin;
|
||||
|
||||
static t_isp_admin ispAdmins[MAX_ADMINS];
|
||||
static UINT8 lastReservedAdmin = 0;
|
||||
static UINT32 maxProgrammedAddress = 0;
|
||||
static UINT32 startAddress = INVALID_ADDRESS;
|
||||
static UINT8 verifyBlock[PROGRAM_BLOCK_SIZE] __attribute__((aligned(PROGRAM_BLOCK_SIZE)));
|
||||
static UINT8 programBlock[PROGRAM_BLOCK_SIZE] __attribute__((aligned(PROGRAM_BLOCK_SIZE)));
|
||||
static UINT8 programFirstBlock[PROGRAM_BLOCK_SIZE] __attribute__((aligned(PROGRAM_BLOCK_SIZE)));
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
void sendAcknowledge(t_isp_admin *handle, t_isp_responses response);
|
||||
BOOLEAN ValidMessageId( UINT8 messageId);
|
||||
void handleMessage(t_isp_admin *admin);
|
||||
void handleUnlockMessage(t_isp_admin *admin);
|
||||
void handleEraseBlockMessage(t_isp_admin *admin);
|
||||
void handleStartProgram(t_isp_admin *admin);
|
||||
void handleFinishProgramming(t_isp_admin *admin);
|
||||
void handleVerifyFlashMessage(t_isp_admin *admin);
|
||||
void handleProgramFlashMessage(t_isp_admin *admin);
|
||||
iflashresult fillProgramBlock( UINT32 address, UINT8 size, UINT8 *data);
|
||||
iflashresult programFlash();
|
||||
void resetRamBlock( UINT32 address );
|
||||
iflashresult StoreCrcAndLength( UINT32 imageSize );
|
||||
|
||||
|
||||
|
||||
/** \brief Initialises a instance of the ISP-protocol handler.
|
||||
*
|
||||
* For each communication port, one ISP-protocol handler must be initialised.
|
||||
*
|
||||
* \param ackCallback Callback-function used for parent to send acknowledge
|
||||
* \returns handle Handle for this ISP-protocol handler.
|
||||
*/
|
||||
int ispInitProtocol(t_isp_ack_callback ackCallback )
|
||||
{
|
||||
int result;
|
||||
if (lastReservedAdmin < MAX_ADMINS)
|
||||
{
|
||||
ispAdmins[lastReservedAdmin].status = IDLE;
|
||||
ispAdmins[lastReservedAdmin].ackCallback = ackCallback;
|
||||
|
||||
result = lastReservedAdmin;
|
||||
lastReservedAdmin++;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = -1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** \brief Does the protocol handling by parsing each byte received on the communication port.
|
||||
*
|
||||
* \param handle Handle for the ISP-protocol handler
|
||||
* \param byte The received byte on the communication port
|
||||
*/
|
||||
void ispHandleRxByte( int handle, UINT8 byte )
|
||||
{
|
||||
t_isp_admin *admin = &(ispAdmins[handle]);
|
||||
|
||||
switch( admin->status )
|
||||
{
|
||||
case(IDLE):
|
||||
if (byte == START_BYTE)
|
||||
{
|
||||
admin->status = MESSAGE_ID;
|
||||
}
|
||||
break;
|
||||
case(MESSAGE_ID):
|
||||
if (ValidMessageId(byte) == TRUE )
|
||||
{
|
||||
// Determine Payload-size
|
||||
admin->rxCrc = crcCalc(&byte, 1, 0);
|
||||
admin->rxMessage.messageId = byte;
|
||||
admin->status = PAYLOAD_SIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
sendAcknowledge( admin, ISP_INVALID_MESSAGE_ID );
|
||||
admin->status = IDLE;
|
||||
}
|
||||
break;
|
||||
case(PAYLOAD_SIZE):
|
||||
// Determine Payload-size
|
||||
if (byte <=MAX_PAYLOAD_SIZE)
|
||||
{
|
||||
admin->rxMessage.payloadSize = byte;
|
||||
admin->rxCrc = crcCalc(&byte, 1, admin->rxCrc);
|
||||
admin->rxIndex = 0;
|
||||
if (byte > 0)
|
||||
{
|
||||
admin->status = PAYLOAD;
|
||||
}
|
||||
else
|
||||
{
|
||||
admin->status = CRC;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sendAcknowledge( admin, ISP_PAYLOAD_TOO_LARGE );
|
||||
admin->status = IDLE;
|
||||
}
|
||||
break;
|
||||
case(PAYLOAD):
|
||||
admin->rxMessage.payload[ admin->rxIndex ] = byte;
|
||||
admin->rxCrc = crcCalc(&byte, 1, admin->rxCrc);
|
||||
admin->rxIndex++;
|
||||
|
||||
if (admin->rxIndex >= admin->rxMessage.payloadSize)
|
||||
{
|
||||
admin->rxIndex = 0;
|
||||
admin->status = CRC;
|
||||
}
|
||||
break;
|
||||
case(CRC):
|
||||
// Receive and check CRC
|
||||
if (admin->rxIndex == 0)
|
||||
{
|
||||
admin->rxMessage.crc = (byte << 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
admin->rxMessage.crc |= (byte & 0x00FF);
|
||||
}
|
||||
|
||||
admin->rxIndex++;
|
||||
|
||||
if (admin->rxIndex >= 2)
|
||||
{
|
||||
if (admin->rxCrc == admin->rxMessage.crc)
|
||||
{
|
||||
/* Crc was succesfully checked */
|
||||
handleMessage(admin);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendAcknowledge( admin, ISP_RECV_BAD_CRC );
|
||||
}
|
||||
admin->status = IDLE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
admin->status = IDLE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void handleMessage(t_isp_admin *admin)
|
||||
{
|
||||
switch( admin->rxMessage.messageId )
|
||||
{
|
||||
case(MSGID_UNLOCK):
|
||||
//sendAcknowledge( admin, ISP_CMD_SUCCESS);
|
||||
handleUnlockMessage( admin );
|
||||
break;
|
||||
case(MSGID_ERASEBLOCK):
|
||||
handleEraseBlockMessage( admin );
|
||||
break;
|
||||
case(MSGID_PROGRAMFLASH):
|
||||
handleProgramFlashMessage( admin );
|
||||
break;
|
||||
case(MSGID_VERIFYFLASH):
|
||||
handleVerifyFlashMessage( admin );
|
||||
break;
|
||||
case(MSGID_FINISHPROGRAMMING):
|
||||
handleFinishProgramming( admin );
|
||||
break;
|
||||
case(MSGID_STARTPROGRAM):
|
||||
handleStartProgram( admin );
|
||||
break;
|
||||
default:
|
||||
sendAcknowledge( admin, ISP_INVALID_MESSAGE_ID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN ValidMessageId( UINT8 messageId)
|
||||
{
|
||||
if ((messageId >= 0x01) && (messageId <= 0x07))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void sendAcknowledge(t_isp_admin *handle, t_isp_responses response)
|
||||
{
|
||||
handle->ackCallback( response );
|
||||
}
|
||||
|
||||
|
||||
void handleUnlockMessage(t_isp_admin *admin)
|
||||
{
|
||||
iflashresult unlockResult = ISP_CMD_SUCCESS;
|
||||
|
||||
maxProgrammedAddress = 0;
|
||||
unlockResult =iflashPrepare( APP_FLASH_START_SECTOR, APP_FLASH_END_SECTOR);
|
||||
|
||||
admin->ackCallback( (t_isp_responses)unlockResult );
|
||||
}
|
||||
|
||||
void handleEraseBlockMessage(t_isp_admin *admin)
|
||||
{
|
||||
iflashresult result;
|
||||
UINT8 blockNr;
|
||||
|
||||
// Extract block nr from message
|
||||
blockNr = admin->rxMessage.payload[0];
|
||||
|
||||
if ( ( blockNr >= APP_FLASH_START_SECTOR)
|
||||
&& ( blockNr <= APP_FLASH_END_SECTOR))
|
||||
{
|
||||
result = iflashErase( blockNr );
|
||||
}
|
||||
else
|
||||
{
|
||||
result = ISP_INVALID_SECTOR;
|
||||
}
|
||||
|
||||
admin->ackCallback( (t_isp_responses)result );
|
||||
}
|
||||
|
||||
void handleProgramFlashMessage(t_isp_admin *admin)
|
||||
{
|
||||
iflashresult result;
|
||||
UINT32 address;
|
||||
UINT8 size;
|
||||
UINT8 *data;
|
||||
UINT8 index = 0;
|
||||
|
||||
// Extract address, datalength & data from message
|
||||
address = ispGet32bit(admin->rxMessage.payload, &index);
|
||||
size = ispGet8bit(admin->rxMessage.payload, &index);
|
||||
data = &(admin->rxMessage.payload[index]);
|
||||
|
||||
if (maxProgrammedAddress < address) maxProgrammedAddress = address;
|
||||
|
||||
if ( (address >= APP_FLASH_START_ADDR)
|
||||
&& (address <= APP_FLASH_END_ADDR)
|
||||
)
|
||||
{
|
||||
result = fillProgramBlock(address, size, data );
|
||||
}
|
||||
else
|
||||
{
|
||||
result = ISP_DST_ADDR_ERROR;
|
||||
}
|
||||
|
||||
admin->ackCallback( (t_isp_responses)result );
|
||||
}
|
||||
|
||||
void handleVerifyFlashMessage(t_isp_admin *admin)
|
||||
{
|
||||
iflashresult result;
|
||||
UINT32 address;
|
||||
UINT8 size;
|
||||
UINT8 index = 0;
|
||||
UINT8 bufferIdx;
|
||||
|
||||
// Extract address, datalength & data from message
|
||||
address = ispGet32bit(admin->rxMessage.payload, &index);
|
||||
size = ispGet8bit(admin->rxMessage.payload, &index);
|
||||
for (bufferIdx = 0; bufferIdx < size; bufferIdx++)
|
||||
{
|
||||
verifyBlock[bufferIdx] = ispGet8bit(admin->rxMessage.payload, &index);
|
||||
}
|
||||
|
||||
// Make size dividable by 4
|
||||
size = size - (size % 4);
|
||||
|
||||
if ((size >= 4) && (address != APP_FLASH_START_ADDR))
|
||||
{
|
||||
result = iflashVerify( address, size, verifyBlock );
|
||||
}
|
||||
else
|
||||
{
|
||||
result = ISP_CMD_SUCCESS;
|
||||
}
|
||||
|
||||
admin->ackCallback( (t_isp_responses)result );
|
||||
}
|
||||
|
||||
void handleFinishProgramming(t_isp_admin *admin)
|
||||
{
|
||||
iflashresult result;
|
||||
UINT32 imageSize;
|
||||
|
||||
// Program remaining block on flash
|
||||
fillProgramBlock(0, 0, 0 );
|
||||
|
||||
// Calculate image length
|
||||
imageSize = maxProgrammedAddress - APP_FLASH_START_ADDR;
|
||||
|
||||
// Calculate and store Crc & imageSize on flash
|
||||
result = StoreCrcAndLength( imageSize );
|
||||
|
||||
admin->ackCallback( (t_isp_responses)result );
|
||||
}
|
||||
|
||||
void handleStartProgram(t_isp_admin *admin)
|
||||
{
|
||||
//if (appiValidAppImageAvail() == TRUE)
|
||||
{
|
||||
ledSet( LED1, 0 );
|
||||
ledSet( LED0, 0 );
|
||||
|
||||
appiJumpToAppImage();
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// admin->ackCallback( ISP_BUSY );
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
void ispAdd16bit(UINT8 *payloadlocation, UINT16 data)
|
||||
{
|
||||
UINT8 index = 0;
|
||||
|
||||
payloadlocation[index] = (UINT8)(data >> 8);
|
||||
index++;
|
||||
payloadlocation[index] = (UINT8)(data & 0x00FF);
|
||||
}
|
||||
|
||||
|
||||
void ispAdd32bit(UINT8 *payloadlocation, UINT32 data)
|
||||
{
|
||||
UINT8 index = 0;
|
||||
|
||||
payloadlocation[index] = (UINT8)(data >> 24);
|
||||
index++;
|
||||
payloadlocation[index] = (UINT8)(data >> 16);
|
||||
index++;
|
||||
payloadlocation[index] = (UINT8)(data >> 8);
|
||||
index++;
|
||||
payloadlocation[index] = (UINT8)(data & 0xFF);
|
||||
|
||||
}
|
||||
|
||||
UINT8 ispGet8bit(UINT8 *payload, UINT8 *payloadIndex)
|
||||
{
|
||||
UINT8 result;
|
||||
|
||||
result = (UINT8)payload[*payloadIndex];
|
||||
(*payloadIndex)++;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
UINT16 ispGet16bit(UINT8 *payload, UINT8 *payloadIndex)
|
||||
{
|
||||
UINT16 result;
|
||||
|
||||
result = ((UINT16)payload[*payloadIndex]) << 8;
|
||||
(*payloadIndex)++;
|
||||
result += ((UINT16)payload[*payloadIndex] & 0x00FF);
|
||||
(*payloadIndex)++;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
UINT32 ispGet32bit(UINT8 *payload, UINT8 *payloadIndex)
|
||||
{
|
||||
UINT32 result;
|
||||
|
||||
result = ((UINT32)payload[*payloadIndex]) << 24;
|
||||
(*payloadIndex)++;
|
||||
result += ((UINT32)payload[*payloadIndex]) << 16;
|
||||
(*payloadIndex)++;
|
||||
result += ((UINT32)payload[*payloadIndex]) << 8;
|
||||
(*payloadIndex)++;
|
||||
result += ((UINT32)payload[*payloadIndex] & 0x000000FF);
|
||||
(*payloadIndex)++;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
iflashresult fillProgramBlock( UINT32 address, UINT8 size, UINT8 *data)
|
||||
{
|
||||
UINT32 programIndex;
|
||||
UINT32 beginIndex;
|
||||
UINT32 dataIndex;
|
||||
UINT32 endIndex;
|
||||
iflashresult result = ISP_CMD_SUCCESS;
|
||||
|
||||
if (data == 0)
|
||||
{
|
||||
// finish sending last block
|
||||
if (startAddress > 0)
|
||||
{
|
||||
result = programFlash();
|
||||
}
|
||||
else
|
||||
{
|
||||
result = ISP_CMD_SUCCESS;
|
||||
}
|
||||
startAddress = INVALID_ADDRESS;
|
||||
return result;
|
||||
}
|
||||
|
||||
// Determine startAddress.
|
||||
if (startAddress == INVALID_ADDRESS)
|
||||
{
|
||||
// Make sure address is alligned to 256
|
||||
resetRamBlock(address - (address % PROGRAM_BLOCK_SIZE));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (address > (startAddress + PROGRAM_BLOCK_SIZE))
|
||||
{
|
||||
result = programFlash();
|
||||
resetRamBlock( address );
|
||||
}
|
||||
}
|
||||
|
||||
// Determine endIndex;
|
||||
if ( (startAddress + PROGRAM_BLOCK_SIZE) > (address + size) )
|
||||
{
|
||||
endIndex = (address - startAddress) + size;
|
||||
}
|
||||
else
|
||||
{
|
||||
endIndex = PROGRAM_BLOCK_SIZE;
|
||||
}
|
||||
|
||||
// Copy data into programblock
|
||||
dataIndex = 0;
|
||||
beginIndex = address - startAddress;
|
||||
for (programIndex = beginIndex; programIndex < endIndex; programIndex++)
|
||||
{
|
||||
programBlock[programIndex] = data[dataIndex];
|
||||
dataIndex++;
|
||||
}
|
||||
|
||||
// if program block is full, program it
|
||||
if (dataIndex < size)
|
||||
{
|
||||
result = programFlash();
|
||||
resetRamBlock( startAddress + PROGRAM_BLOCK_SIZE );
|
||||
|
||||
// Copy rest in new block
|
||||
endIndex = size - dataIndex;
|
||||
for (programIndex = 0; programIndex < endIndex; programIndex++)
|
||||
{
|
||||
programBlock[programIndex] = data[dataIndex];
|
||||
dataIndex++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((startAddress + PROGRAM_BLOCK_SIZE) == (address + size))
|
||||
{
|
||||
result = programFlash();
|
||||
resetRamBlock( INVALID_ADDRESS );
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void resetRamBlock( UINT32 address )
|
||||
{
|
||||
UINT32 programIndex;
|
||||
|
||||
startAddress = address;
|
||||
for (programIndex = 0; programIndex < PROGRAM_BLOCK_SIZE; programIndex++)
|
||||
{
|
||||
programBlock[programIndex] = 0x00;
|
||||
}
|
||||
}
|
||||
|
||||
iflashresult programFlash()
|
||||
{
|
||||
UINT16 index;
|
||||
|
||||
if (startAddress != APP_FLASH_START_ADDR)
|
||||
{
|
||||
iflashPrepare( APP_FLASH_START_SECTOR, APP_FLASH_END_SECTOR);
|
||||
return iflashProgram( startAddress, PROGRAM_BLOCK_SIZE, programBlock );
|
||||
}
|
||||
else
|
||||
{
|
||||
// keep copy of first block, programmed later at FinishedProgramming
|
||||
for (index = 0; index < PROGRAM_BLOCK_SIZE; index++)
|
||||
{
|
||||
programFirstBlock[index] = programBlock[index];
|
||||
}
|
||||
|
||||
return ISP_CMD_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
iflashresult StoreCrcAndLength( UINT32 imageSize )
|
||||
{
|
||||
static UINT16 crc = 0;
|
||||
static UINT8 *image = 0;
|
||||
|
||||
// Calculate Crc over part before Length & CRC
|
||||
crc = crcCalc(programFirstBlock, APP_IMAGE_LENGTH_OFFS, crc);
|
||||
|
||||
// Calculate Crc over part after Length & CRC in first program block
|
||||
image = (UINT8 *)(programFirstBlock + APP_IMAGE_CRC_OFFS + 4);
|
||||
crc = crcCalc(image, PROGRAM_BLOCK_SIZE - (APP_IMAGE_CRC_OFFS + 4), crc);
|
||||
|
||||
// Calculate Crc over rest of image already programmed
|
||||
image = (UINT8 *)(APP_FLASH_START_ADDR + PROGRAM_BLOCK_SIZE);
|
||||
crc = crcCalc(image, imageSize - PROGRAM_BLOCK_SIZE, crc);
|
||||
|
||||
// Fill in Length & CRC
|
||||
ispAdd32bit(programFirstBlock + APP_IMAGE_LENGTH_OFFS, imageSize);
|
||||
ispAdd16bit(programFirstBlock + APP_IMAGE_CRC_OFFS, crc);
|
||||
|
||||
// Program first block on flash
|
||||
iflashPrepare( APP_FLASH_START_SECTOR, APP_FLASH_START_SECTOR);
|
||||
return iflashProgram( APP_FLASH_START_ADDR, PROGRAM_BLOCK_SIZE, programFirstBlock );
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* IspProtocol.h - v0.1 (c) 2008 Micro-key bv
|
||||
* ---------------------------------------------------------------------------
|
||||
* Micro-key bv
|
||||
* Industrieweg 28, 9804 TG Noordhorn
|
||||
* Postbus 92, 9800 AB Zuidhorn
|
||||
* The Netherlands
|
||||
* Tel: +31 594 503020
|
||||
* Fax: +31 594 505825
|
||||
* Email: support@microkey.nl
|
||||
* Web: www.microkey.nl
|
||||
* ---------------------------------------------------------------------------
|
||||
* Description: Handles the ISP-protocol (standard In System Programming -protocol)
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Feb 13, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __ISPPROTOCOL_H__
|
||||
#define __ISPPROTOCOL_H__
|
||||
/** \file IspProtocol.h
|
||||
\brief Handles the ISP-protocol (standard In System Programming -protocol)
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#define ISP_MAX_ADMINS (4)
|
||||
#define ISP_START_BYTE (0xAA)
|
||||
#define ISP_MAX_PAYLOAD_SIZE (80)
|
||||
|
||||
#define ISP_MSGID_ACKNOWLEDGE (0x01)
|
||||
#define ISP_MSGID_UNLOCK (0x02)
|
||||
#define ISP_MSGID_ERASEBLOCK (0x03)
|
||||
#define ISP_MSGID_PROGRAMFLASH (0x04)
|
||||
#define ISP_MSGID_VERIFYFLASH (0x05)
|
||||
#define ISP_MSGID_FINISHPROGRAMMING (0x06)
|
||||
#define ISP_MSGID_STARTPROGRAM (0x07)
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ISP_CMD_SUCCESS = 0,
|
||||
ISP_INVALID_COMMAND = 1,
|
||||
ISP_SRC_ADDR_ERROR = 2,
|
||||
ISP_DST_ADDR_ERROR = 3,
|
||||
ISP_SRC_ADDR_NOT_MAPPED = 4,
|
||||
ISP_DST_ADDR_NOT_MAPPED = 5,
|
||||
ISP_COUNT_ERROR = 6,
|
||||
ISP_INVALID_SECTOR = 7,
|
||||
ISP_SECTOR_NOT_BLANK = 8,
|
||||
ISP_SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION = 9,
|
||||
ISP_COMPARE_ERROR = 10,
|
||||
ISP_BUSY = 11,
|
||||
ISP_PAYLOAD_TOO_LARGE = 12,
|
||||
ISP_RECV_BAD_CRC = 13,
|
||||
ISP_INVALID_MESSAGE_ID = 14
|
||||
} t_isp_responses;
|
||||
|
||||
typedef void (*t_isp_ack_callback)(t_isp_responses response);
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
/** \brief Initialises a instance of the ISP-protocol handler */
|
||||
int ispInitProtocol(t_isp_ack_callback);
|
||||
|
||||
/** \brief Does the protocol handling by parsing each byte received on the communication port. */
|
||||
void ispHandleRxByte( int handle, UINT8 byte );
|
||||
|
||||
void ispAdd16bit(UINT8 *payloadlocation, UINT16 data);
|
||||
void ispAdd32bit(UINT8 *payloadlocation, UINT32 data);
|
||||
UINT8 ispGet8bit(UINT8 *payload, UINT8 *payloadIndex);
|
||||
UINT16 ispGet16bit(UINT8 *payload, UINT8 *payloadIndex);
|
||||
UINT32 ispGet32bit(UINT8 *payload, UINT8 *payloadIndex);
|
||||
|
||||
|
||||
#endif /* __ISPPROTOCOL_H__ */
|
||||
@@ -0,0 +1,158 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* appImage.c - v0.1 (c) 2008 Micro-key bv
|
||||
* ---------------------------------------------------------------------------
|
||||
* Micro-key bv
|
||||
* Industrieweg 28, 9804 TG Noordhorn
|
||||
* Postbus 92, 9800 AB Zuidhorn
|
||||
* The Netherlands
|
||||
* Tel: +31 594 503020
|
||||
* Fax: +31 594 505825
|
||||
* Email: support@microkey.nl
|
||||
* Web: www.microkey.nl
|
||||
* ---------------------------------------------------------------------------
|
||||
* Description:
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Feb 12, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#include "types.h"
|
||||
#include "appImage.h"
|
||||
#include "LPC23xx.h"
|
||||
#include "crc.h"
|
||||
#include "IspProtocol.h"
|
||||
#include "bootloader.h"
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local constant and macro definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
typedef void (*t_application_startup)(void);
|
||||
|
||||
#define APPI_FLASH_START_ADDR 0x5000
|
||||
#define APPI_FLASH_END_ADDR 0x7E000
|
||||
#define APPI_C_ENTRY_OFFS 0x0020
|
||||
#define APPI_IMAGE_LENGTH_OFFS 0x0008
|
||||
#define APPI_IMAGE_CRC_OFFS 0x000C
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Global variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local variable definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Local function definitions
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
void appiCalculateCrc( UINT32 imageLength, UINT16 *crc );
|
||||
|
||||
|
||||
/** \brief Checks if the Application image requests a Image update
|
||||
*
|
||||
* When the application image wants to start an image update, it sets
|
||||
* a pattern on a known RAM-location and resets the CPU. Now the bootloader
|
||||
* can verify this pattern.
|
||||
*
|
||||
* \retval TRUE Application did request an update
|
||||
* \retval FALSE Application did not request an update
|
||||
*/
|
||||
BOOLEAN appiApplicationRequestsUpdate()
|
||||
{
|
||||
if (blGetBootmode() == STAY_IN_BOOTLOADER)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** \brief Checks if a valid Application image.
|
||||
*
|
||||
* \retval TRUE Flash contains a valid Application image
|
||||
* \retval FALSE Flash doesn't contain a valid Application image
|
||||
*/
|
||||
BOOLEAN appiValidAppImageAvail()
|
||||
{
|
||||
static UINT32 imageSize = 0;
|
||||
static UINT16 recordedCrc = 0;
|
||||
UINT8 index;
|
||||
static UINT16 calculatedCrc;
|
||||
|
||||
index = APPI_IMAGE_LENGTH_OFFS;
|
||||
imageSize = ispGet32bit((UINT8 *)APPI_FLASH_START_ADDR, &index);
|
||||
recordedCrc = ispGet16bit((UINT8 *)APPI_FLASH_START_ADDR, &index);
|
||||
|
||||
if ( (imageSize >= 100)
|
||||
&& (imageSize <= (APPI_FLASH_START_ADDR - APPI_FLASH_END_ADDR))
|
||||
)
|
||||
{
|
||||
appiCalculateCrc(imageSize, &calculatedCrc);
|
||||
|
||||
if (recordedCrc != calculatedCrc)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (imageSize == 0)
|
||||
{
|
||||
// escape for debugging
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Jumps to the Application image. Function won't return.
|
||||
*/
|
||||
void appiJumpToAppImage()
|
||||
{
|
||||
unsigned int application_start_addr = APPI_FLASH_START_ADDR + APPI_C_ENTRY_OFFS;
|
||||
|
||||
blResetBootmode();
|
||||
|
||||
DISABLE_INTERRUPTS();
|
||||
|
||||
((t_application_startup)application_start_addr)();
|
||||
}
|
||||
|
||||
void appiCalculateCrc( UINT32 imageLength, UINT16 *crc )
|
||||
{
|
||||
UINT8 *image = (UINT8 *)(APPI_FLASH_START_ADDR);
|
||||
*crc = 0;
|
||||
|
||||
// Calculate Crc over part before Length & CRC
|
||||
*crc = crcCalc(image, APPI_IMAGE_LENGTH_OFFS, *crc);
|
||||
|
||||
// Calculate Crc over part after Length & CRC
|
||||
image = (UINT8 *)(APPI_FLASH_START_ADDR + APPI_IMAGE_CRC_OFFS + 4);
|
||||
*crc = crcCalc(image, imageLength - (APPI_IMAGE_CRC_OFFS + 4), *crc);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/* ---------------------------------------------------------------------------
|
||||
* appImage.h - v0.1 (c) 2008 Micro-key bv
|
||||
* ---------------------------------------------------------------------------
|
||||
* Micro-key bv
|
||||
* Industrieweg 28, 9804 TG Noordhorn
|
||||
* Postbus 92, 9800 AB Zuidhorn
|
||||
* The Netherlands
|
||||
* Tel: +31 594 503020
|
||||
* Fax: +31 594 505825
|
||||
* Email: support@microkey.nl
|
||||
* Web: www.microkey.nl
|
||||
* ---------------------------------------------------------------------------
|
||||
* Description:
|
||||
* ---------------------------------------------------------------------------
|
||||
* Version(s): 0.1, Feb 12, 2008, FSc
|
||||
* Creation.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef __APPIMAGE_H__
|
||||
#define __APPIMAGE_H__
|
||||
/** \file appImage.h
|
||||
\brief
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* System include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Application include files.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Constant and macro definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Type definitions.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Variable declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Function declarations.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** \brief Checks if the Application image requests a Image update */
|
||||
BOOLEAN appiApplicationRequestsUpdate();
|
||||
|
||||
/** \brief Checks if a valid Application image. */
|
||||
BOOLEAN appiValidAppImageAvail();
|
||||
|
||||
/** \brief Jumps to the Application image. Function won't return. */
|
||||
void appiJumpToAppImage();
|
||||
|
||||
|
||||
|
||||
#endif /* __APPIMAGE_H__ */
|
||||
@@ -0,0 +1,158 @@
|
||||
/* Sample initialization file */
|
||||
|
||||
.extern main
|
||||
.extern exit
|
||||
|
||||
.text
|
||||
.code 32
|
||||
|
||||
|
||||
.align 0
|
||||
|
||||
.extern __bss_beg__
|
||||
.extern __bss_end__
|
||||
.extern __stack_end__
|
||||
.extern __data_beg__
|
||||
.extern __data_end__
|
||||
.extern __data+beg_src__
|
||||
|
||||
.global start
|
||||
.global endless_loop
|
||||
|
||||
/* Stack Sizes */
|
||||
.set UND_STACK_SIZE, 0x00000004
|
||||
.set ABT_STACK_SIZE, 0x00000004
|
||||
.set FIQ_STACK_SIZE, 0x00000004
|
||||
.set IRQ_STACK_SIZE, 0X00000100
|
||||
.set SVC_STACK_SIZE, 0x00000100
|
||||
|
||||
/* Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs */
|
||||
.set MODE_USR, 0x10 /* User Mode */
|
||||
.set MODE_FIQ, 0x11 /* FIQ Mode */
|
||||
.set MODE_IRQ, 0x12 /* IRQ Mode */
|
||||
.set MODE_SVC, 0x13 /* Supervisor Mode */
|
||||
.set MODE_ABT, 0x17 /* Abort Mode */
|
||||
.set MODE_UND, 0x1B /* Undefined Mode */
|
||||
.set MODE_SYS, 0x1F /* System Mode */
|
||||
|
||||
.equ I_BIT, 0x80 /* when I bit is set, IRQ is disabled */
|
||||
.equ F_BIT, 0x40 /* when F bit is set, FIQ is disabled */
|
||||
|
||||
start:
|
||||
_start:
|
||||
_mainCRTStartup:
|
||||
|
||||
/* Setup a stack for each mode - note that this only sets up a usable stack
|
||||
for system/user, SWI and IRQ modes. Also each mode is setup with
|
||||
interrupts initially disabled. */
|
||||
ldr r0, .LC6
|
||||
msr CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode */
|
||||
mov sp, r0
|
||||
sub r0, r0, #UND_STACK_SIZE
|
||||
msr CPSR_c, #MODE_ABT|I_BIT|F_BIT /* Abort Mode */
|
||||
mov sp, r0
|
||||
sub r0, r0, #ABT_STACK_SIZE
|
||||
msr CPSR_c, #MODE_FIQ|I_BIT|F_BIT /* FIQ Mode */
|
||||
mov sp, r0
|
||||
sub r0, r0, #FIQ_STACK_SIZE
|
||||
msr CPSR_c, #MODE_IRQ|I_BIT|F_BIT /* IRQ Mode */
|
||||
mov sp, r0
|
||||
sub r0, r0, #IRQ_STACK_SIZE
|
||||
msr CPSR_c, #MODE_SVC|I_BIT|F_BIT /* Supervisor Mode */
|
||||
mov sp, r0
|
||||
sub r0, r0, #SVC_STACK_SIZE
|
||||
msr CPSR_c, #MODE_SYS|I_BIT|F_BIT /* System Mode */
|
||||
mov sp, r0
|
||||
|
||||
/* We want to start in supervisor mode. Operation will switch to system
|
||||
mode when the first task starts. */
|
||||
msr CPSR_c, #MODE_SVC|I_BIT|F_BIT
|
||||
|
||||
/* Clear BSS. */
|
||||
|
||||
mov a2, #0 /* Fill value */
|
||||
mov fp, a2 /* Null frame pointer */
|
||||
mov r7, a2 /* Null frame pointer for Thumb */
|
||||
|
||||
ldr r1, .LC1 /* Start of memory block */
|
||||
ldr r3, .LC2 /* End of memory block */
|
||||
subs r3, r3, r1 /* Length of block */
|
||||
beq .end_clear_loop
|
||||
mov r2, #0
|
||||
|
||||
.clear_loop:
|
||||
strb r2, [r1], #1
|
||||
subs r3, r3, #1
|
||||
bgt .clear_loop
|
||||
|
||||
.end_clear_loop:
|
||||
|
||||
/* Initialise data. */
|
||||
|
||||
ldr r1, .LC3 /* Start of memory block */
|
||||
ldr r2, .LC4 /* End of memory block */
|
||||
ldr r3, .LC5
|
||||
subs r3, r3, r1 /* Length of block */
|
||||
beq .end_set_loop
|
||||
|
||||
.set_loop:
|
||||
ldrb r4, [r2], #1
|
||||
strb r4, [r1], #1
|
||||
subs r3, r3, #1
|
||||
bgt .set_loop
|
||||
|
||||
.end_set_loop:
|
||||
|
||||
mov r0, #0 /* no arguments */
|
||||
mov r1, #0 /* no argv either */
|
||||
|
||||
bl main
|
||||
|
||||
endless_loop:
|
||||
b endless_loop
|
||||
|
||||
|
||||
.align 0
|
||||
|
||||
.LC1:
|
||||
.word __bss_beg__
|
||||
.LC2:
|
||||
.word __bss_end__
|
||||
.LC3:
|
||||
.word __data_beg__
|
||||
.LC4:
|
||||
.word __data_beg_src__
|
||||
.LC5:
|
||||
.word __data_end__
|
||||
.LC6:
|
||||
.word __stack_end__
|
||||
|
||||
|
||||
/* Setup vector table. Note that undf, pabt, dabt, fiq just execute
|
||||
a null loop. */
|
||||
|
||||
.section .startup,"ax"
|
||||
.code 32
|
||||
.align 0
|
||||
|
||||
b _start /* reset - _start */
|
||||
ldr pc, _undf /* undefined - _undf */
|
||||
ldr pc, _swi /* SWI - _swi */
|
||||
ldr pc, _pabt /* program abort - _pabt */
|
||||
ldr pc, _dabt /* data abort - _dabt */
|
||||
nop /* reserved */
|
||||
ldr pc, [pc,#-0x120] /* IRQ - read the VIC */
|
||||
ldr pc, _fiq /* FIQ - _fiq */
|
||||
|
||||
_undf: .word __undf /* undefined */
|
||||
_swi: .word 0x40000008 /* SWI */
|
||||
_pabt: .word __pabt /* program abort */
|
||||
_dabt: .word __dabt /* data abort */
|
||||
.word 0
|
||||
_irq: .word 0
|
||||
_fiq: .word __fiq /* FIQ */
|
||||
|
||||
__undf: b . /* undefined */
|
||||
__pabt: b . /* program abort */
|
||||
__dabt: b . /* data abort */
|
||||
__fiq: b . /* FIQ */
|
||||
@@ -0,0 +1,68 @@
|
||||
MEMORY
|
||||
{
|
||||
flash : ORIGIN = 0x00000000, LENGTH = 20K
|
||||
ramheader : ORIGIN = 0x40000000, LENGTH = 0x60
|
||||
ram : ORIGIN = 0x40000060, LENGTH = 32K - 0x60
|
||||
usbram : ORIGIN = 0x7FD00000, LENGTH = 8K
|
||||
ethram : ORIGIN = 0x7FE00000, LENGTH = 16K
|
||||
}
|
||||
|
||||
__stack_end__ = 0x40000000 + 32K - 4;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = 0;
|
||||
startup : { *(.startup)} >flash
|
||||
|
||||
prog :
|
||||
{
|
||||
*(.text)
|
||||
*(.rodata)
|
||||
*(.rodata*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
} >flash
|
||||
|
||||
__end_of_text__ = .;
|
||||
|
||||
.data :
|
||||
{
|
||||
__data_beg__ = .;
|
||||
__data_beg_src__ = __end_of_text__;
|
||||
*(.data)
|
||||
__data_end__ = .;
|
||||
} >ram AT>flash
|
||||
|
||||
.bss :
|
||||
{
|
||||
__bss_beg__ = .;
|
||||
*(.bss)
|
||||
__bss_end__ = .;
|
||||
} >ram
|
||||
|
||||
/* Align here to ensure that the .bss section occupies space up to
|
||||
_end. Align after .bss to ensure correct alignment even if the
|
||||
.bss section disappears because there are no input sections. */
|
||||
. = ALIGN(32 / 8);
|
||||
|
||||
.usbram (NOLOAD):
|
||||
{
|
||||
__usbram_beg__ = .;
|
||||
*(.dmaram)
|
||||
__usbram_end__ = .;
|
||||
} >usbram
|
||||
|
||||
.ethram (NOLOAD):
|
||||
{
|
||||
__ethram_beg__ = .;
|
||||
*(.ethram)
|
||||
__ethram_end__ = .;
|
||||
} >ethram
|
||||
}
|
||||
. = ALIGN(32 / 8);
|
||||
_end = .;
|
||||
/*_bss_end__ = . ; __bss_end__ = . ; */
|
||||
__end__ = . ;
|
||||
PROVIDE (end = .);
|
||||
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
/*
|
||||
FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
FreeRTOS.org 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org 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 FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
|
||||
***************************************************************************
|
||||
See http://www.FreeRTOS.org for documentation, latest information, license
|
||||
and contact details. Please ensure to read the configuration and relevant
|
||||
port sections of the online documentation.
|
||||
|
||||
Also see http://www.SafeRTOS.com a version that has been certified for use
|
||||
in safety critical systems, plus commercial licensing, development and
|
||||
support options.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/* includes */
|
||||
#include "types.h"
|
||||
#include "sys_config.h"
|
||||
#include "dio.h"
|
||||
#include "leds.h"
|
||||
#include "serial.h"
|
||||
#include "irq.h"
|
||||
#include "bus.h"
|
||||
#include "appimage.h"
|
||||
#include "LPC23xx.h"
|
||||
#include "CommListeners.h"
|
||||
#include "InternalFlash.h"
|
||||
#include "Watchdog.h"
|
||||
|
||||
/* Constants to setup the PLL. */
|
||||
#define mainPLL_ENABLE ( ( UINT32 ) 0x0001 )
|
||||
#define mainPLL_CONNECT ( ( ( UINT32 ) 0x0002 ) | mainPLL_ENABLE )
|
||||
#define mainPLL_FEED_BYTE1 ( ( UINT32 ) 0xaa )
|
||||
#define mainPLL_FEED_BYTE2 ( ( UINT32 ) 0x55 )
|
||||
#define mainPLL_LOCK ( ( UINT32 ) 0x4000000 )
|
||||
#define mainPLL_CONNECTED ( ( UINT32 ) 0x2000000 )
|
||||
#define mainOSC_ENABLE ( ( UINT32 ) 0x20 )
|
||||
#define mainOSC_STAT ( ( UINT32 ) 0x40 )
|
||||
#define mainOSC_SELECT ( ( UINT32 ) 0x01 )
|
||||
|
||||
#define SWI_RAM_ADDR 0x40000008
|
||||
#define SWI_RAM_FUNC_ADDR 0x40000028
|
||||
|
||||
/* Constants to setup the MAM. */
|
||||
#define mainMAM_TIM_3 ( ( UINT8 ) 0x03 )
|
||||
#define mainMAM_MODE_FULL ( ( UINT8 ) 0x02 )
|
||||
|
||||
/* Configure the hardware as required by the demo. */
|
||||
static inline void prvSetVectors();
|
||||
static void prvSetupHardware( void );
|
||||
static void prvSetupDrivers( void );
|
||||
static void cpu_swi_isr( void );
|
||||
|
||||
BOOLEAN StopFlashing = FALSE;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
int main( void )
|
||||
{
|
||||
prvSetVectors();
|
||||
prvSetupHardware();
|
||||
prvSetupDrivers();
|
||||
|
||||
ENABLE_INTERRUPTS();
|
||||
|
||||
ledSet( LED1, 1 ); // Turn both LED's on to indicate Bootcode
|
||||
ledSet( LED0, 1 );
|
||||
|
||||
//watchdogEnable( 10000 );
|
||||
|
||||
if ((appiValidAppImageAvail() == TRUE) && (appiApplicationRequestsUpdate() == FALSE))
|
||||
{
|
||||
// Reset watchdog flag anyway
|
||||
watchdogCausedReset();
|
||||
|
||||
ledSet( LED1, 0 );
|
||||
ledSet( LED0, 0 );
|
||||
|
||||
appiJumpToAppImage();
|
||||
}
|
||||
|
||||
// Enter program state
|
||||
initCom1Listener();
|
||||
initCom2Listener();
|
||||
initBus1Listener();
|
||||
initBus2Listener();
|
||||
|
||||
// for now stay in bootloader to test different things
|
||||
for (;;)
|
||||
{
|
||||
listen2Com1();
|
||||
listen2Com2();
|
||||
listen2Bus1();
|
||||
listen2Bus2();
|
||||
|
||||
watchdogFeed();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline void prvSetVectors()
|
||||
{
|
||||
unsigned int *ptr;
|
||||
// Set vectors of interrupt, software interupt and fiq
|
||||
|
||||
// Set interrupt vectors
|
||||
ptr = (unsigned int *)SWI_RAM_ADDR;
|
||||
*ptr = 0xE59FF018; // This is a ldr pc, [pc,#24] instruction
|
||||
|
||||
// Put SWI, IRQ & FIQ vectors in RAM
|
||||
ptr = (unsigned int *)SWI_RAM_FUNC_ADDR;
|
||||
*ptr = (unsigned int)&cpu_swi_isr;
|
||||
}
|
||||
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void prvSetupHardware( void )
|
||||
{
|
||||
//UINT32 i = 0;
|
||||
//volatile UINT32 *vect_addr, *vect_prio;
|
||||
|
||||
#ifdef RUN_FROM_RAM
|
||||
/* Remap the interrupt vectors to RAM if we are are running from RAM. */
|
||||
SCB_MEMMAP = 2;
|
||||
#endif
|
||||
|
||||
/* Disable the PLL. */
|
||||
PLLCON = 0;
|
||||
PLLFEED = mainPLL_FEED_BYTE1;
|
||||
PLLFEED = mainPLL_FEED_BYTE2;
|
||||
|
||||
/* Configure clock source. */
|
||||
SCS |= mainOSC_ENABLE;
|
||||
while( !( SCS & mainOSC_STAT ) );
|
||||
CLKSRCSEL = mainOSC_SELECT;
|
||||
|
||||
/* Setup the PLL to multiply the XTAL input by 4. */
|
||||
PLLCFG = ( PLL_MUL | PLL_DIV );
|
||||
PLLFEED = mainPLL_FEED_BYTE1;
|
||||
PLLFEED = mainPLL_FEED_BYTE2;
|
||||
|
||||
/* Turn on and wait for the PLL to lock... */
|
||||
PLLCON = mainPLL_ENABLE;
|
||||
PLLFEED = mainPLL_FEED_BYTE1;
|
||||
PLLFEED = mainPLL_FEED_BYTE2;
|
||||
CCLKCFG = CCLK_DIV;
|
||||
while( !( PLLSTAT & mainPLL_LOCK ) );
|
||||
|
||||
/* Connecting the clock. */
|
||||
PLLCON = mainPLL_CONNECT;
|
||||
PLLFEED = mainPLL_FEED_BYTE1;
|
||||
PLLFEED = mainPLL_FEED_BYTE2;
|
||||
while( !( PLLSTAT & mainPLL_CONNECTED ) );
|
||||
|
||||
/* Setup and turn on the MAM. Three cycle access is used due to the fast
|
||||
PLL used. It is possible faster overall performance could be obtained by
|
||||
tuning the MAM and PLL settings. */
|
||||
MAMCR = 0;
|
||||
MAMTIM = mainMAM_TIM_3;
|
||||
MAMCR = mainMAM_MODE_FULL;
|
||||
|
||||
init_VIC();
|
||||
}
|
||||
|
||||
void prvSetupDrivers( void )
|
||||
{
|
||||
iflashInit();
|
||||
ledInit();
|
||||
ledSet( LED1, 1 );
|
||||
ledSet( LED0, 1 );
|
||||
//for(;;);
|
||||
|
||||
// Open both COM-ports
|
||||
serInit( COM1, B57600, UART_8N1, UART_FIFO_8);
|
||||
serInit( COM2, B57600, UART_8N1, UART_FIFO_8);
|
||||
busInit( BUS1 );
|
||||
busInit( BUS2 );
|
||||
}
|
||||
|
||||
void cpu_swi_isr()
|
||||
{
|
||||
for (;;);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user