Refs #981. Added STM32CubeIDE demo programs for the Olimexino-STM32 board.
git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@823 5dc33758-31d5-4daf-9ae8-b24bf3d40d73master
parent
eb8bce018c
commit
6249db7170
@ -0,0 +1,198 @@ |
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> |
||||
<storageModule moduleId="org.eclipse.cdt.core.settings"> |
||||
<cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1747678622"> |
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1747678622" moduleId="org.eclipse.cdt.core.settings" name="Debug"> |
||||
<externalSettings/> |
||||
<extensions> |
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> |
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
</extensions> |
||||
</storageModule> |
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> |
||||
<configuration artifactExtension="elf" artifactName="openblt_olimexino_stm32" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1747678622" name="Debug" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug"> |
||||
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1747678622." name="/" resourcePath=""> |
||||
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.1350598169" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug"> |
||||
<option id="com.st.stm32cube.ide.mcu.option.internal.toolchain.type.1366454104" name="Internal Toolchain Type" superClass="com.st.stm32cube.ide.mcu.option.internal.toolchain.type" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32" valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.option.internal.toolchain.version.289599181" name="Internal Toolchain Version" superClass="com.st.stm32cube.ide.mcu.option.internal.toolchain.version" useByScannerDiscovery="false" value="7-2018-q2-update" valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.210079350" name="Mcu" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="false" value="STM32F103RBTx" valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.182237030" name="CpuId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.321597228" name="CpuCoreId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1758184733" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.794433775" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.3 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32 || STM32F103RBTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Drivers/CMSIS/Device/ST/STM32F1xx/Include | ../Drivers/CMSIS/Include | ../Core/Inc | ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | ../Drivers/STM32F1xx_HAL_Driver/Inc || || || USE_HAL_DRIVER | STM32F103xB | USE_FULL_LL_DRIVER || || Drivers | Core/Startup | Core || || || ${workspace_loc:/${ProjName}/STM32F103RBTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || " valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertbinary.1295622894" name="Convert to binary file (-O binary)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertbinary" useByScannerDiscovery="false" value="false" valueType="boolean"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertsrec.1350272922" name="Convert to Motorola S-record file (-O srec)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.convertsrec" useByScannerDiscovery="false" value="true" valueType="boolean"/> |
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.673552086" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/> |
||||
<builder buildPath="${workspace_loc:/Boot}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1444600390" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1534301123" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler"> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.996826240" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g3" valueType="enumerated"/> |
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.1361320127" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/> |
||||
</tool> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.835384842" name="MCU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler"> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.1654025191" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g3" valueType="enumerated"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.576355460" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.value.o2" valueType="enumerated"/> |
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1291018425" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols"> |
||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/> |
||||
<listOptionValue builtIn="false" value="STM32F103xB"/> |
||||
<listOptionValue builtIn="false" value="USE_FULL_LL_DRIVER"/> |
||||
<listOptionValue builtIn="false" value="DEBUG"/> |
||||
</option> |
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.1444070613" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath"> |
||||
<listOptionValue builtIn="false" value="../Core/Inc"/> |
||||
<listOptionValue builtIn="false" value="../Drivers/STM32F1xx_HAL_Driver/Inc"/> |
||||
<listOptionValue builtIn="false" value="../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy"/> |
||||
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32F1xx/Include"/> |
||||
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/> |
||||
<listOptionValue builtIn="false" value="../App"/> |
||||
<listOptionValue builtIn="false" value="../Library/FatFS"/> |
||||
<listOptionValue builtIn="false" value="../Library/STM32_USB_Device_Library/Core/Inc"/> |
||||
<listOptionValue builtIn="false" value="../USB_DEVICE/App"/> |
||||
<listOptionValue builtIn="false" value="../USB_DEVICE/Target"/> |
||||
<listOptionValue builtIn="false" value="../../../../Source"/> |
||||
<listOptionValue builtIn="false" value="../../../../Source/ARMCM3_STM32F1"/> |
||||
<listOptionValue builtIn="false" value="../../../../Source/third_party/fatfs/src"/> |
||||
</option> |
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1263842891" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/> |
||||
</tool> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.1433056563" name="MCU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler"> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.1485692494" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g3" valueType="enumerated"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.2022073577" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false"/> |
||||
</tool> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.506153573" name="MCU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker"> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.571936888" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" useByScannerDiscovery="false" value="../STM32F103RBTX.ld" valueType="string"/> |
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.1692186135" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input"> |
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> |
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/> |
||||
</inputType> |
||||
</tool> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.468246655" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.script.488252964" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F103RBTX_FLASH.ld}" valueType="string"/> |
||||
</tool> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.1106417788" name="MCU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.1711919051" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.1298694597" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.494116709" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.175100150" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.90426626" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.1698506585" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.1933598145" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/> |
||||
</toolChain> |
||||
</folderInfo> |
||||
<sourceEntries> |
||||
<entry excluding="flash_layout.c" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="App"/> |
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Library"/> |
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/> |
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Loader"/> |
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/> |
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="USB_DEVICE"/> |
||||
</sourceEntries> |
||||
</configuration> |
||||
</storageModule> |
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> |
||||
</cconfiguration> |
||||
<cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.805201426"> |
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.805201426" moduleId="org.eclipse.cdt.core.settings" name="Release"> |
||||
<externalSettings/> |
||||
<extensions> |
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> |
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
</extensions> |
||||
</storageModule> |
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> |
||||
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.805201426" name="Release" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release"> |
||||
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.805201426." name="/" resourcePath=""> |
||||
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.2040114106" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release"> |
||||
<option id="com.st.stm32cube.ide.mcu.option.internal.toolchain.type.521257838" name="Internal Toolchain Type" superClass="com.st.stm32cube.ide.mcu.option.internal.toolchain.type" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32" valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.option.internal.toolchain.version.1047068599" name="Internal Toolchain Version" superClass="com.st.stm32cube.ide.mcu.option.internal.toolchain.version" value="7-2018-q2-update" valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.199102137" name="Mcu" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" value="STM32F103RBTx" valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.923869493" name="CpuId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" value="0" valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.676019842" name="CpuCoreId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" value="0" valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.991655920" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" value="genericBoard" valueType="string"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.7179424" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.3 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32 || STM32F103RBTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Drivers/CMSIS/Device/ST/STM32F1xx/Include | ../Drivers/CMSIS/Include | ../Core/Inc | ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | ../Drivers/STM32F1xx_HAL_Driver/Inc || || || USE_HAL_DRIVER | STM32F103xB | USE_FULL_LL_DRIVER || || Drivers | Core/Startup | Core || || || ${workspace_loc:/${ProjName}/STM32F103RBTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || " valueType="string"/> |
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1146297029" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/> |
||||
<builder buildPath="${workspace_loc:/Boot}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1730361905" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1025419408" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler"> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.568847108" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g0" valueType="enumerated"/> |
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.1105010272" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/> |
||||
</tool> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.40567603" name="MCU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler"> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.1064666125" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g0" valueType="enumerated"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.1635399193" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.value.os" valueType="enumerated"/> |
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.765087989" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols"> |
||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/> |
||||
<listOptionValue builtIn="false" value="STM32F103xB"/> |
||||
<listOptionValue builtIn="false" value="USE_FULL_LL_DRIVER"/> |
||||
</option> |
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.1161812704" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath"> |
||||
<listOptionValue builtIn="false" value="../Core/Inc"/> |
||||
<listOptionValue builtIn="false" value="../Drivers/STM32F1xx_HAL_Driver/Inc"/> |
||||
<listOptionValue builtIn="false" value="../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy"/> |
||||
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32F1xx/Include"/> |
||||
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/> |
||||
</option> |
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1978885251" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/> |
||||
</tool> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.816394687" name="MCU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler"> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.1720935303" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g0" valueType="enumerated"/> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.2044215578" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.value.os" valueType="enumerated"/> |
||||
</tool> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.551580968" name="MCU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker"> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.514433003" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F103RBTX_FLASH.ld}" valueType="string"/> |
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.1257033553" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input"> |
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> |
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/> |
||||
</inputType> |
||||
</tool> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.501215775" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"> |
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.script.1426841196" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F103RBTX_FLASH.ld}" valueType="string"/> |
||||
</tool> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.832404251" name="MCU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.2128141408" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.1808367435" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.84069765" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.1497398270" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.2092372799" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.1850861455" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/> |
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.1766066943" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/> |
||||
</toolChain> |
||||
</folderInfo> |
||||
<sourceEntries> |
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/> |
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/> |
||||
</sourceEntries> |
||||
</configuration> |
||||
</storageModule> |
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> |
||||
</cconfiguration> |
||||
</storageModule> |
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> |
||||
<project id="Boot.null.277115787" name="Boot"/> |
||||
</storageModule> |
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> |
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> |
||||
<storageModule moduleId="scannerConfiguration"> |
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> |
||||
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1747678622;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1747678622.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.835384842;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1263842891"> |
||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/> |
||||
</scannerConfigBuildInfo> |
||||
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.805201426;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.805201426.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.40567603;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1978885251"> |
||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/> |
||||
</scannerConfigBuildInfo> |
||||
</storageModule> |
||||
<storageModule moduleId="refreshScope" versionNumber="2"> |
||||
<configuration configurationName="Debug"> |
||||
<resource resourceType="PROJECT" workspacePath="/Boot"/> |
||||
</configuration> |
||||
<configuration configurationName="Release"> |
||||
<resource resourceType="PROJECT" workspacePath="/Boot"/> |
||||
</configuration> |
||||
</storageModule> |
||||
</cproject> |
File diff suppressed because one or more lines are too long
@ -0,0 +1,102 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<projectDescription> |
||||
<name>Boot</name> |
||||
<comment></comment> |
||||
<projects> |
||||
</projects> |
||||
<buildSpec> |
||||
<buildCommand> |
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> |
||||
<triggers>clean,full,incremental,</triggers> |
||||
<arguments> |
||||
</arguments> |
||||
</buildCommand> |
||||
<buildCommand> |
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> |
||||
<triggers>full,incremental,</triggers> |
||||
<arguments> |
||||
</arguments> |
||||
</buildCommand> |
||||
</buildSpec> |
||||
<natures> |
||||
<nature>com.st.stm32cube.ide.mcu.MCUProjectNature</nature> |
||||
<nature>com.st.stm32cube.ide.mcu.MCUCubeProjectNature</nature> |
||||
<nature>org.eclipse.cdt.core.cnature</nature> |
||||
<nature>com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature</nature> |
||||
<nature>com.st.stm32cube.ide.mcu.MCUAdvancedStructureProjectNature</nature> |
||||
<nature>com.st.stm32cube.ide.mcu.MCUEndUserDisabledTrustZoneProjectNature</nature> |
||||
<nature>com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature</nature> |
||||
<nature>com.st.stm32cube.ide.mcu.MCURootProjectNature</nature> |
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> |
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> |
||||
</natures> |
||||
<linkedResources> |
||||
<link> |
||||
<name>Loader</name> |
||||
<type>2</type> |
||||
<locationURI>OPENBLT_ROOT</locationURI> |
||||
</link> |
||||
</linkedResources> |
||||
<filteredResources> |
||||
<filter> |
||||
<id>1607593091291</id> |
||||
<name>Loader</name> |
||||
<type>9</type> |
||||
<matcher> |
||||
<id>org.eclipse.ui.ide.multiFilter</id> |
||||
<arguments>1.0-name-matches-false-false-ARMCM3_STM32F1</arguments> |
||||
</matcher> |
||||
</filter> |
||||
<filter> |
||||
<id>1607593091322</id> |
||||
<name>Loader</name> |
||||
<type>9</type> |
||||
<matcher> |
||||
<id>org.eclipse.ui.ide.multiFilter</id> |
||||
<arguments>1.0-name-matches-false-false-third_party</arguments> |
||||
</matcher> |
||||
</filter> |
||||
<filter> |
||||
<id>1607593102938</id> |
||||
<name>Loader/ARMCM3_STM32F1</name> |
||||
<type>9</type> |
||||
<matcher> |
||||
<id>org.eclipse.ui.ide.multiFilter</id> |
||||
<arguments>1.0-name-matches-false-false-GCC</arguments> |
||||
</matcher> |
||||
</filter> |
||||
<filter> |
||||
<id>1607593114181</id> |
||||
<name>Loader/third_party</name> |
||||
<type>9</type> |
||||
<matcher> |
||||
<id>org.eclipse.ui.ide.multiFilter</id> |
||||
<arguments>1.0-name-matches-false-false-fatfs</arguments> |
||||
</matcher> |
||||
</filter> |
||||
<filter> |
||||
<id>1607593125684</id> |
||||
<name>Loader/third_party/fatfs</name> |
||||
<type>9</type> |
||||
<matcher> |
||||
<id>org.eclipse.ui.ide.multiFilter</id> |
||||
<arguments>1.0-name-matches-false-false-src</arguments> |
||||
</matcher> |
||||
</filter> |
||||
<filter> |
||||
<id>1607593137804</id> |
||||
<name>Loader/third_party/fatfs/src/option</name> |
||||
<type>5</type> |
||||
<matcher> |
||||
<id>org.eclipse.ui.ide.multiFilter</id> |
||||
<arguments>1.0-name-matches-false-false-unicode.c</arguments> |
||||
</matcher> |
||||
</filter> |
||||
</filteredResources> |
||||
<variableList> |
||||
<variable> |
||||
<name>OPENBLT_ROOT</name> |
||||
<value>$%7BPARENT-3-PROJECT_LOC%7D/Source</value> |
||||
</variable> |
||||
</variableList> |
||||
</projectDescription> |
@ -0,0 +1,27 @@ |
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||
<project> |
||||
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1747678622" name="Debug"> |
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider"> |
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> |
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> |
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> |
||||
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/> |
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="661730002489570611" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> |
||||
<language-scope id="org.eclipse.cdt.core.gcc"/> |
||||
<language-scope id="org.eclipse.cdt.core.g++"/> |
||||
</provider> |
||||
</extension> |
||||
</configuration> |
||||
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.805201426" name="Release"> |
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider"> |
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> |
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> |
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> |
||||
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/> |
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="661730002489570611" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> |
||||
<language-scope id="org.eclipse.cdt.core.gcc"/> |
||||
<language-scope id="org.eclipse.cdt.core.g++"/> |
||||
</provider> |
||||
</extension> |
||||
</configuration> |
||||
</project> |
@ -0,0 +1,61 @@ |
||||
/************************************************************************************//**
|
||||
* \file Demo/ARMCM3_STM32F1_Olimexino_STM32_CubeIDE/Boot/App/app.c |
||||
* \brief Bootloader application source file. |
||||
* \ingroup Boot_ARMCM3_STM32F1_Olimexino_STM32_CubeIDE |
||||
* \internal |
||||
*---------------------------------------------------------------------------------------- |
||||
* C O P Y R I G H T |
||||
*---------------------------------------------------------------------------------------- |
||||
* Copyright (c) 2020 by Feaser http://www.feaser.com All rights reserved
|
||||
* |
||||
*---------------------------------------------------------------------------------------- |
||||
* L I C E N S E |
||||
*---------------------------------------------------------------------------------------- |
||||
* This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or |
||||
* modify it under the terms of the GNU General Public License as published by the Free |
||||
* Software Foundation, either version 3 of the License, or (at your option) any later |
||||
* version. |
||||
* |
||||
* OpenBLT 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 have received a copy of the GNU General Public License along with OpenBLT. It |
||||
* should be located in ".\Doc\license.html". If not, contact Feaser to obtain a copy. |
||||
* |
||||
* \endinternal |
||||
****************************************************************************************/ |
||||
|
||||
/****************************************************************************************
|
||||
* Include files |
||||
****************************************************************************************/ |
||||
#include "boot.h" /* bootloader generic header */ |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Initializes the bootloader application. Should be called once during |
||||
** software program initialization. |
||||
** \return none. |
||||
** |
||||
****************************************************************************************/ |
||||
void AppInit(void) |
||||
{ |
||||
/* initialize the bootloader */ |
||||
BootInit(); |
||||
} /*** end of AppInit ***/ |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Task function of the bootloader application. Should be called continuously |
||||
** in the program loop. |
||||
** \return none. |
||||
** |
||||
****************************************************************************************/ |
||||
void AppTask(void) |
||||
{ |
||||
/* Run the bootloader task. */ |
||||
BootTask(); |
||||
} /*** end of AppTask ***/ |
||||
|
||||
|
||||
/*********************************** end of app.c **************************************/ |
@ -0,0 +1,39 @@ |
||||
/************************************************************************************//**
|
||||
* \file Demo/ARMCM3_STM32F1_Olimexino_STM32_CubeIDE/Boot/App/app.h |
||||
* \brief Bootloader application header file. |
||||
* \ingroup Boot_ARMCM3_STM32F1_Olimexino_STM32_CubeIDE |
||||
* \internal |
||||
*---------------------------------------------------------------------------------------- |
||||
* C O P Y R I G H T |
||||
*---------------------------------------------------------------------------------------- |
||||
* Copyright (c) 2020 by Feaser http://www.feaser.com All rights reserved
|
||||
* |
||||
*---------------------------------------------------------------------------------------- |
||||
* L I C E N S E |
||||
*---------------------------------------------------------------------------------------- |
||||
* This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or |
||||
* modify it under the terms of the GNU General Public License as published by the Free |
||||
* Software Foundation, either version 3 of the License, or (at your option) any later |
||||
* version. |
||||
* |
||||
* OpenBLT 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 have received a copy of the GNU General Public License along with OpenBLT. It |
||||
* should be located in ".\Doc\license.html". If not, contact Feaser to obtain a copy. |
||||
* |
||||
* \endinternal |
||||
****************************************************************************************/ |
||||
#ifndef APP_H |
||||
#define APP_H |
||||
|
||||
/****************************************************************************************
|
||||
* Function prototypes |
||||
****************************************************************************************/ |
||||
void AppInit(void); |
||||
void AppTask(void); |
||||
|
||||
|
||||
#endif /* APP_H */ |
||||
/*********************************** end of app.h **************************************/ |
@ -0,0 +1,223 @@ |
||||
/************************************************************************************//**
|
||||
* \file Demo/ARMCM3_STM32F1_Olimexino_STM32_CubeIDE/Boot/App/blt_conf.h |
||||
* \brief Bootloader configuration header file. |
||||
* \ingroup Boot_ARMCM3_STM32F1_Olimexino_STM32_CubeIDE |
||||
* \internal |
||||
*---------------------------------------------------------------------------------------- |
||||
* C O P Y R I G H T |
||||
*---------------------------------------------------------------------------------------- |
||||
* Copyright (c) 2020 by Feaser http://www.feaser.com All rights reserved
|
||||
* |
||||
*---------------------------------------------------------------------------------------- |
||||
* L I C E N S E |
||||
*---------------------------------------------------------------------------------------- |
||||
* This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or |
||||
* modify it under the terms of the GNU General Public License as published by the Free |
||||
* Software Foundation, either version 3 of the License, or (at your option) any later |
||||
* version. |
||||
* |
||||
* OpenBLT 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 have received a copy of the GNU General Public License along with OpenBLT. It
|
||||
* should be located in ".\Doc\license.html". If not, contact Feaser to obtain a copy. |
||||
*
|
||||
* \endinternal |
||||
****************************************************************************************/ |
||||
#ifndef BLT_CONF_H |
||||
#define BLT_CONF_H |
||||
|
||||
/****************************************************************************************
|
||||
* C P U D R I V E R C O N F I G U R A T I O N |
||||
****************************************************************************************/ |
||||
/* To properly initialize the baudrate clocks of the communication interface, typically
|
||||
* the speed of the crystal oscillator and/or the speed at which the system runs is
|
||||
* needed. Set these through configurables BOOT_CPU_XTAL_SPEED_KHZ and |
||||
* BOOT_CPU_SYSTEM_SPEED_KHZ, respectively. To enable data exchange with the host that is |
||||
* not dependent on the targets architecture, the byte ordering needs to be known.
|
||||
* Setting BOOT_CPU_BYTE_ORDER_MOTOROLA to 1 selects big endian mode and 0 selects
|
||||
* little endian mode. |
||||
*
|
||||
* Set BOOT_CPU_USER_PROGRAM_START_HOOK to 1 if you would like a hook function to be |
||||
* called the moment the user program is about to be started. This could be used to |
||||
* de-initialize application specific parts, for example to stop blinking an LED, etc. |
||||
*/
|
||||
/** \brief Frequency of the external crystal oscillator. */ |
||||
#define BOOT_CPU_XTAL_SPEED_KHZ (8000) |
||||
/** \brief Desired system speed. */ |
||||
#define BOOT_CPU_SYSTEM_SPEED_KHZ (72000) |
||||
/** \brief Motorola or Intel style byte ordering. */ |
||||
#define BOOT_CPU_BYTE_ORDER_MOTOROLA (0) |
||||
/** \brief Enable/disable hook function call right before user program start. */ |
||||
#define BOOT_CPU_USER_PROGRAM_START_HOOK (1) |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* C O M M U N I C A T I O N I N T E R F A C E C O N F I G U R A T I O N |
||||
****************************************************************************************/ |
||||
/* The CAN communication interface is selected by setting the BOOT_COM_CAN_ENABLE
|
||||
* configurable to 1. Configurable BOOT_COM_CAN_BAUDRATE selects the communication speed |
||||
* in bits/second. Two CAN messages are reserved for communication with the host. The
|
||||
* message identifier for sending data from the target to the host is configured with |
||||
* BOOT_COM_CAN_TXMSG_ID. The one for receiving data from the host is configured with |
||||
* BOOT_COM_CAN_RXMSG_ID. Note that an extended 29-bit CAN identifier is configured by |
||||
* OR-ing with mask 0x80000000. The maximum amount of data bytes in a message for data |
||||
* transmission and reception is set through BOOT_COM_CAN_TX_MAX_DATA and
|
||||
* BOOT_COM_CAN_RX_MAX_DATA, respectively. It is common for a microcontroller to have more |
||||
* than 1 CAN controller on board. The zero-based BOOT_COM_CAN_CHANNEL_INDEX selects the |
||||
* CAN controller channel. |
||||
*
|
||||
*/ |
||||
/** \brief Enable/disable CAN transport layer. */ |
||||
#define BOOT_COM_CAN_ENABLE (0) |
||||
/** \brief Configure the desired CAN baudrate. */ |
||||
#define BOOT_COM_CAN_BAUDRATE (500000) |
||||
/** \brief Configure CAN message ID target->host. */ |
||||
#define BOOT_COM_CAN_TX_MSG_ID (0x7E1 /*| 0x80000000*/) |
||||
/** \brief Configure number of bytes in the target->host CAN message. */ |
||||
#define BOOT_COM_CAN_TX_MAX_DATA (8) |
||||
/** \brief Configure CAN message ID host->target. */ |
||||
#define BOOT_COM_CAN_RX_MSG_ID (0x667 /*| 0x80000000*/) |
||||
/** \brief Configure number of bytes in the host->target CAN message. */ |
||||
#define BOOT_COM_CAN_RX_MAX_DATA (8) |
||||
/** \brief Select the desired CAN peripheral as a zero based index. */ |
||||
#define BOOT_COM_CAN_CHANNEL_INDEX (0) |
||||
|
||||
/* The USB communication interface is selected by setting the BOOT_COM_USB_ENABLE
|
||||
* configurable to 1. The maximum amount of data bytes in a message for data transmission |
||||
* and reception is set through BOOT_COM_USB_TX_MAX_DATA and BOOT_COM_USB_RX_MAX_DATA, |
||||
* respectively. |
||||
* |
||||
*/ |
||||
/** \brief Enable/disable USB transport layer. */ |
||||
#define BOOT_COM_USB_ENABLE (1) |
||||
/** \brief Configure number of bytes in the target->host data packet. */ |
||||
#define BOOT_COM_USB_TX_MAX_DATA (63) |
||||
/** \brief Configure number of bytes in the host->target data packet. */ |
||||
#define BOOT_COM_USB_RX_MAX_DATA (63) |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* F I L E S Y S T E M I N T E R F A C E C O N F I G U R A T I O N |
||||
****************************************************************************************/ |
||||
/* The file system interface is selected by setting the BOOT_FILE_SYS_ENABLE configurable
|
||||
* to 1. This enables support for firmware updates from a file stored on a locally |
||||
* attached file system such as an SD-card. Note that this interface can be enabled |
||||
* together with one of the remote communication interfaces such as UART, CAN or USB. |
||||
* |
||||
* Set BOOT_FILE_LOGGING_ENABLE to 1 if you would like log messages to be created during |
||||
* a firmware update. The hook function FileFirmwareUpdateLogHook() will be called each |
||||
* time a new string formatted log entry is available. This could be used during testing |
||||
* by outputting the string on UART or to create a log file on the file system itself. |
||||
* |
||||
* Set BOOT_FILE_ERROR_HOOK_ENABLE to 1 if you would like to be informed in case an error |
||||
* occurs during the firmware update. This could for example be used to turn on an error |
||||
* LED to inform the user that something went wrong. Inspecting the log messages provides |
||||
* additional information on the error cause. |
||||
* |
||||
* Set BOOT_FILE_STARTED_HOOK_ENABLE to 1 if you would like to be informed when a new |
||||
* firmware update is started by the bootloader. |
||||
* |
||||
* Set BOOT_FILE_COMPLETED_HOOK_ENABLE to 1 if you would like to be informed when a |
||||
* firmware update is completed by the bootloader. |
||||
*/ |
||||
/** \brief Enable/disable support for firmware updates from a locally attached storage.*/ |
||||
#define BOOT_FILE_SYS_ENABLE (1) |
||||
/** \brief Enable/disable logging messages during firmware updates. */ |
||||
#define BOOT_FILE_LOGGING_ENABLE (1) |
||||
/** \brief Enable/disable a hook function that is called upon detection of an error. */ |
||||
#define BOOT_FILE_ERROR_HOOK_ENABLE (1) |
||||
/** \brief Enable/disable a hook function that is called at the start of the update. */ |
||||
#define BOOT_FILE_STARTED_HOOK_ENABLE (1) |
||||
/** \brief Enable/disable a hook function that is called at the end of the update. */ |
||||
#define BOOT_FILE_COMPLETED_HOOK_ENABLE (1) |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* B A C K D O O R E N T R Y C O N F I G U R A T I O N |
||||
****************************************************************************************/ |
||||
/* It is possible to implement an application specific method to force the bootloader to
|
||||
* stay active after a reset. Such a backdoor entry into the bootloader is desired in |
||||
* situations where the user program does not run properly and therefore cannot |
||||
* reactivate the bootloader. By enabling these hook functions, the application can |
||||
* implement the backdoor, which overrides the default backdoor entry that is programmed |
||||
* into the bootloader. When desired for security purposes, these hook functions can |
||||
* also be implemented in a way that disables the backdoor entry altogether. |
||||
*/ |
||||
/** \brief Enable/disable the backdoor override hook functions. */ |
||||
#define BOOT_BACKDOOR_HOOKS_ENABLE (0) |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* N O N - V O L A T I L E M E M O R Y D R I V E R C O N F I G U R A T I O N |
||||
****************************************************************************************/ |
||||
/* The NVM driver typically supports erase and program operations of the internal memory
|
||||
* present on the microcontroller. Through these hook functions the NVM driver can be |
||||
* extended to support additional memory types such as external flash memory and serial |
||||
* eeproms. The size of the internal memory in kilobytes is specified with configurable |
||||
* BOOT_NVM_SIZE_KB. If desired the internal checksum writing and verification method can |
||||
* be overridden with a application specific method by enabling configuration switch |
||||
* BOOT_NVM_CHECKSUM_HOOKS_ENABLE. |
||||
*/ |
||||
/** \brief Enable/disable the NVM hook function for supporting additional memory devices. */ |
||||
#define BOOT_NVM_HOOKS_ENABLE (0) |
||||
/** \brief Configure the size of the default memory device (typically flash EEPROM). */ |
||||
#define BOOT_NVM_SIZE_KB (128) |
||||
/** \brief Enable/disable hooks functions to override the user program checksum handling. */ |
||||
#define BOOT_NVM_CHECKSUM_HOOKS_ENABLE (0) |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* F L A S H M E M O R Y D R I V E R C O N F I G U R A T I O N |
||||
****************************************************************************************/ |
||||
/** \brief This microcontroller has a smaller vector table then the default STM32F1xx
|
||||
* project as assumed in the bootloader's core. This means the user program has |
||||
* a different checksum location, because this one is added at the end of the |
||||
* user program's vector table. |
||||
*/ |
||||
#define BOOT_FLASH_VECTOR_TABLE_CS_OFFSET (0x10c) |
||||
/** \brief Enable support for a custom flash layout table. It is located in
|
||||
* flash_layout.c. This was done because the default flashLayout[] table |
||||
* in the bootloader's core has more flash memory reserved for the bootloader |
||||
* than is needed for this demo. |
||||
*/ |
||||
#define BOOT_FLASH_CUSTOM_LAYOUT_ENABLE (1) |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* W A T C H D O G D R I V E R C O N F I G U R A T I O N |
||||
****************************************************************************************/ |
||||
/* The COP driver cannot be configured internally in the bootloader, because its use
|
||||
* and configuration is application specific. The bootloader does need to service the |
||||
* watchdog in case it is used. When the application requires the use of a watchdog, |
||||
* set BOOT_COP_HOOKS_ENABLE to be able to initialize and service the watchdog through |
||||
* hook functions. |
||||
*/ |
||||
/** \brief Enable/disable the hook functions for controlling the watchdog. */ |
||||
#define BOOT_COP_HOOKS_ENABLE (1) |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N |
||||
****************************************************************************************/ |
||||
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
|
||||
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming |
||||
* operations can be performed, access to this resource need to be unlocked. |
||||
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that |
||||
* implements the unlocking algorithm. The demo programs are configured for the (simple) |
||||
* algorithm in "libseednkey.dll". The source code for this DLL is available so it can be |
||||
* customized to your needs. |
||||
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in |
||||
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes |
||||
* a key, which is also a byte array, and sends this back to the bootloader. The |
||||
* bootloader then verifies this key to determine if programming and erase operations are |
||||
* permitted. |
||||
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook() |
||||
* are called by the bootloader to obtain the seed and to verify the key, respectively. |
||||
*/ |
||||
#define BOOT_XCP_SEED_KEY_ENABLE (0) |
||||
|
||||
|
||||
#endif /* BLT_CONF_H */ |
||||
/*********************************** end of blt_conf.h *********************************/ |
@ -0,0 +1,59 @@ |
||||
/************************************************************************************//**
|
||||
* \file Demo/ARMCM3_STM32F1_Olimexino_STM32_CubeIDE/Boot/App/flash_layout.c |
||||
* \brief Custom flash layout table source file. |
||||
* \ingroup Boot_ARMCM3_STM32F1_Olimexino_STM32_CubeIDE |
||||
* \internal |
||||
*---------------------------------------------------------------------------------------- |
||||
* C O P Y R I G H T |
||||
*---------------------------------------------------------------------------------------- |
||||
* Copyright (c) 2020 by Feaser http://www.feaser.com All rights reserved
|
||||
* |
||||
*---------------------------------------------------------------------------------------- |
||||
* L I C E N S E |
||||
*---------------------------------------------------------------------------------------- |
||||
* This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or |
||||
* modify it under the terms of the GNU General Public License as published by the Free |
||||
* Software Foundation, either version 3 of the License, or (at your option) any later |
||||
* version. |
||||
* |
||||
* OpenBLT 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 have received a copy of the GNU General Public License along with OpenBLT. It |
||||
* should be located in ".\Doc\license.html". If not, contact Feaser to obtain a copy. |
||||
* |
||||
* \endinternal |
||||
****************************************************************************************/ |
||||
|
||||
/** \brief Array wit the layout of the flash memory.
|
||||
* \details Also controls what part of the flash memory is reserved for the bootloader. |
||||
* If the bootloader size changes, the reserved sectors for the bootloader |
||||
* might need adjustment to make sure the bootloader doesn't get overwritten. |
||||
*/ |
||||
static const tFlashSector flashLayout[] = |
||||
{ |
||||
/* space is reserved for a bootloader configuration with all supported communication
|
||||
* interfaces enabled. when for example only UART is needed, than the space required |
||||
* for the bootloader can be made a lot smaller here. |
||||
*/ |
||||
/* { 0x08000000, 0x02000 }, flash sector 0 - reserved for bootloader */ |
||||
/* { 0x08002000, 0x02000 }, flash sector 1 - reserved for bootloader */ |
||||
/* { 0x08004000, 0x02000 }, flash sector 2 - reserved for bootloader */ |
||||
/* { 0x08006000, 0x02000 }, flash sector 3 - reserved for bootloader */ |
||||
{ 0x08008000, 0x02000 }, /* flash sector 4 - 8kb */ |
||||
{ 0x0800A000, 0x02000 }, /* flash sector 5 - 8kb */ |
||||
{ 0x0800C000, 0x02000 }, /* flash sector 6 - 8kb */ |
||||
{ 0x0800E000, 0x02000 }, /* flash sector 7 - 8kb */ |
||||
{ 0x08010000, 0x02000 }, /* flash sector 8 - 8kb */ |
||||
{ 0x08012000, 0x02000 }, /* flash sector 9 - 8kb */ |
||||
{ 0x08014000, 0x02000 }, /* flash sector 10 - 8kb */ |
||||
{ 0x08016000, 0x02000 }, /* flash sector 11 - 8kb */ |
||||
{ 0x08018000, 0x02000 }, /* flash sector 12 - 8kb */ |
||||
{ 0x0801A000, 0x02000 }, /* flash sector 13 - 8kb */ |
||||
{ 0x0801C000, 0x02000 }, /* flash sector 14 - 8kb */ |
||||
{ 0x0801E000, 0x02000 }, /* flash sector 15 - 8kb */ |
||||
}; |
||||
|
||||
|
||||
/*********************************** end of flash_layout.c *****************************/ |
@ -0,0 +1,518 @@ |
||||
/************************************************************************************//**
|
||||
* \file Demo/ARMCM3_STM32F1_Olimexino_STM32_CubeIDE/Boot/App/hooks.c |
||||
* \brief Bootloader callback source file. |
||||
* \ingroup Boot_ARMCM3_STM32F1_Olimexino_STM32_CubeIDE |
||||
* \internal |
||||
*---------------------------------------------------------------------------------------- |
||||
* C O P Y R I G H T |
||||
*---------------------------------------------------------------------------------------- |
||||
* Copyright (c) 2020 by Feaser http://www.feaser.com All rights reserved
|
||||
* |
||||
*---------------------------------------------------------------------------------------- |
||||
* L I C E N S E |
||||
*---------------------------------------------------------------------------------------- |
||||
* This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or |
||||
* modify it under the terms of the GNU General Public License as published by the Free |
||||
* Software Foundation, either version 3 of the License, or (at your option) any later |
||||
* version. |
||||
* |
||||
* OpenBLT 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 have received a copy of the GNU General Public License along with OpenBLT. It |
||||
* should be located in ".\Doc\license.html". If not, contact Feaser to obtain a copy. |
||||
* |
||||
* \endinternal |
||||
****************************************************************************************/ |
||||
|
||||
/****************************************************************************************
|
||||
* Include files |
||||
****************************************************************************************/ |
||||
#include "boot.h" /* bootloader generic header */ |
||||
#include "led.h" /* LED driver header */ |
||||
#include "stm32f1xx.h" /* STM32 registers and drivers */ |
||||
#include "stm32f1xx_ll_gpio.h" /* STM32 LL GPIO header */ |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* U S B C O M M U N I C A T I O N I N T E R F A C E H O O K F U N C T I O N S |
||||
****************************************************************************************/ |
||||
|
||||
#if (BOOT_COM_USB_ENABLE > 0) |
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called whenever the USB device should be connected |
||||
** to the USB bus.
|
||||
** \param connect BLT_TRUE to connect and BLT_FALSE to disconnect. |
||||
** \return none. |
||||
** |
||||
****************************************************************************************/ |
||||
void UsbConnectHook(blt_bool connect) |
||||
{ |
||||
/* determine if the USB should be connected or disconnected */ |
||||
if (connect == BLT_TRUE) |
||||
{ |
||||
/* the GPIO has a pull-up so to connect to the USB bus the pin needs to go low */ |
||||
LL_GPIO_ResetOutputPin(GPIOC, LL_GPIO_PIN_12); |
||||
} |
||||
else |
||||
{ |
||||
/* the GPIO has a pull-up so to disconnect to the USB bus the pin needs to go high */ |
||||
LL_GPIO_SetOutputPin(GPIOC, LL_GPIO_PIN_12); |
||||
} |
||||
} /*** end of UsbConnect ***/ |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called whenever the USB host requests the device |
||||
** to enter a low power mode. |
||||
** \return none. |
||||
** |
||||
****************************************************************************************/ |
||||
void UsbEnterLowPowerModeHook(void) |
||||
{ |
||||
/* support to enter a low power mode can be implemented here */ |
||||
} /*** end of UsbEnterLowPowerMode ***/ |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called whenever the USB host requests the device to |
||||
** exit low power mode. |
||||
** \return none. |
||||
** |
||||
****************************************************************************************/ |
||||
void UsbLeaveLowPowerModeHook(void) |
||||
{ |
||||
/* support to leave a low power mode can be implemented here */ |
||||
} /*** end of UsbLeaveLowPowerMode ***/ |
||||
#endif /* BOOT_COM_USB_ENABLE > 0 */ |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* B A C K D O O R E N T R Y H O O K F U N C T I O N S |
||||
****************************************************************************************/ |
||||
|
||||
#if (BOOT_BACKDOOR_HOOKS_ENABLE > 0) |
||||
/************************************************************************************//**
|
||||
** \brief Initializes the backdoor entry option. |
||||
** \return none. |
||||
** |
||||
****************************************************************************************/ |
||||
void BackDoorInitHook(void) |
||||
{ |
||||
} /*** end of BackDoorInitHook ***/ |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Checks if a backdoor entry is requested. |
||||
** \return BLT_TRUE if the backdoor entry is requested, BLT_FALSE otherwise. |
||||
** |
||||
****************************************************************************************/ |
||||
blt_bool BackDoorEntryHook(void) |
||||
{ |
||||
/* default implementation always activates the bootloader after a reset */ |
||||
return BLT_TRUE; |
||||
} /*** end of BackDoorEntryHook ***/ |
||||
#endif /* BOOT_BACKDOOR_HOOKS_ENABLE > 0 */ |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* C P U D R I V E R H O O K F U N C T I O N S |
||||
****************************************************************************************/ |
||||
|
||||
#if (BOOT_CPU_USER_PROGRAM_START_HOOK > 0) |
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called when the bootloader is about to exit and |
||||
** hand over control to the user program. This is the last moment that |
||||
** some final checking can be performed and if necessary prevent the |
||||
** bootloader from activiting the user program. |
||||
** \return BLT_TRUE if it is okay to start the user program, BLT_FALSE to keep |
||||
** keep the bootloader active. |
||||
** |
||||
****************************************************************************************/ |
||||
blt_bool CpuUserProgramStartHook(void) |
||||
{ |
||||
/* do not start the user program if D2 (PA0) is connected to ground */ |
||||
if (LL_GPIO_IsInputPinSet(GPIOA, LL_GPIO_PIN_0) == 0) |
||||
{ |
||||
return BLT_FALSE; |
||||
} |
||||
|
||||
/* clean up the LED driver */ |
||||
LedBlinkExit(); |
||||
|
||||
/* okay to start the user program */ |
||||
return BLT_TRUE; |
||||
} /*** end of CpuUserProgramStartHook ***/ |
||||
#endif /* BOOT_CPU_USER_PROGRAM_START_HOOK > 0 */ |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* W A T C H D O G D R I V E R H O O K F U N C T I O N S |
||||
****************************************************************************************/ |
||||
|
||||
#if (BOOT_COP_HOOKS_ENABLE > 0) |
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called at the end of the internal COP driver |
||||
** initialization routine. It can be used to configure and enable the |
||||
** watchdog. |
||||
** \return none. |
||||
** |
||||
****************************************************************************************/ |
||||
void CopInitHook(void) |
||||
{ |
||||
/* this function is called upon initialization. might as well use it to initialize
|
||||
* the LED driver. It is kind of a visual watchdog anyways. |
||||
*/ |
||||
LedBlinkInit(100); |
||||
} /*** end of CopInitHook ***/ |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called at the end of the internal COP driver |
||||
** service routine. This gets called upon initialization and during |
||||
** potential long lasting loops and routine. It can be used to service |
||||
** the watchdog to prevent a watchdog reset. |
||||
** \return none. |
||||
** |
||||
****************************************************************************************/ |
||||
void CopServiceHook(void) |
||||
{ |
||||
/* run the LED blink task. this is a better place to do it than in the main() program
|
||||
* loop. certain operations such as flash erase can take a long time, which would cause |
||||
* a blink interval to be skipped. this function is also called during such operations, |
||||
* so no blink intervals will be skipped when calling the LED blink task here. |
||||
*/ |
||||
LedBlinkTask(); |
||||
} /*** end of CopServiceHook ***/ |
||||
#endif /* BOOT_COP_HOOKS_ENABLE > 0 */ |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* N O N - V O L A T I L E M E M O R Y D R I V E R H O O K F U N C T I O N S |
||||
****************************************************************************************/ |
||||
|
||||
#if (BOOT_NVM_HOOKS_ENABLE > 0) |
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called at the start of the internal NVM driver |
||||
** initialization routine. |
||||
** \return none. |
||||
** |
||||
****************************************************************************************/ |
||||
void NvmInitHook(void) |
||||
{ |
||||
} /*** end of NvmInitHook ***/ |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called at the start of a firmware update to reinitialize |
||||
** the NVM driver. |
||||
** \return none. |
||||
** |
||||
****************************************************************************************/ |
||||
void NvmReinitHook(void) |
||||
{ |
||||
} /*** end of NvmReinitHook ***/ |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called at the start of the NVM driver write |
||||
** routine. It allows additional memory to be operated on. If the address |
||||
** is not within the range of the additional memory, then |
||||
** BLT_NVM_NOT_IN_RANGE must be returned to indicate that the data hasn't |
||||
** been written yet. |
||||
** \param addr Start address. |
||||
** \param len Length in bytes. |
||||
** \param data Pointer to the data buffer. |
||||
** \return BLT_NVM_OKAY if successful, BLT_NVM_NOT_IN_RANGE if the address is |
||||
** not within the supported memory range, or BLT_NVM_ERROR is the write |
||||
** operation failed. |
||||
** |
||||
****************************************************************************************/ |
||||
blt_int8u NvmWriteHook(blt_addr addr, blt_int32u len, blt_int8u *data) |
||||
{ |
||||
return BLT_NVM_NOT_IN_RANGE; |
||||
} /*** end of NvmWriteHook ***/ |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called at the start of the NVM driver erase |
||||
** routine. It allows additional memory to be operated on. If the address |
||||
** is not within the range of the additional memory, then |
||||
** BLT_NVM_NOT_IN_RANGE must be returned to indicate that the memory |
||||
** hasn't been erased yet. |
||||
** \param addr Start address. |
||||
** \param len Length in bytes. |
||||
** \return BLT_NVM_OKAY if successful, BLT_NVM_NOT_IN_RANGE if the address is |
||||
** not within the supported memory range, or BLT_NVM_ERROR is the erase |
||||
** operation failed. |
||||
** |
||||
****************************************************************************************/ |
||||
blt_int8u NvmEraseHook(blt_addr addr, blt_int32u len) |
||||
{ |
||||
return BLT_NVM_NOT_IN_RANGE; |
||||
} /*** end of NvmEraseHook ***/ |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called at the end of the NVM programming session. |
||||
** \return BLT_TRUE is successful, BLT_FALSE otherwise. |
||||
** |
||||
****************************************************************************************/ |
||||
blt_bool NvmDoneHook(void) |
||||
{ |
||||
return BLT_TRUE; |
||||
} /*** end of NvmDoneHook ***/ |
||||
#endif /* BOOT_NVM_HOOKS_ENABLE > 0 */ |
||||
|
||||
|
||||
#if (BOOT_NVM_CHECKSUM_HOOKS_ENABLE > 0) |
||||
/************************************************************************************//**
|
||||
** \brief Verifies the checksum, which indicates that a valid user program is |
||||
** present and can be started. |
||||
** \return BLT_TRUE if successful, BLT_FALSE otherwise. |
||||
** |
||||
****************************************************************************************/ |
||||
blt_bool NvmVerifyChecksumHook(void) |
||||
{ |
||||
return BLT_TRUE; |
||||
} /*** end of NvmVerifyChecksum ***/ |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Writes a checksum of the user program to non-volatile memory. This is |
||||
** performed once the entire user program has been programmed. Through |
||||
** the checksum, the bootloader can check if a valid user programming is |
||||
** present and can be started. |
||||
** \return BLT_TRUE if successful, BLT_FALSE otherwise. |
||||
** |
||||
****************************************************************************************/ |
||||
blt_bool NvmWriteChecksumHook(void) |
||||
{ |
||||
return BLT_TRUE; |
||||
} |
||||
#endif /* BOOT_NVM_CHECKSUM_HOOKS_ENABLE > 0 */ |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* F I L E S Y S T E M I N T E R F A C E H O O K F U N C T I O N S |
||||
****************************************************************************************/ |
||||
|
||||
#if (BOOT_FILE_SYS_ENABLE > 0) |
||||
|
||||
/****************************************************************************************
|
||||
* Constant data declarations |
||||
****************************************************************************************/ |
||||
/** \brief Firmware filename. */ |
||||
static const blt_char firmwareFilename[] = "/demoprog_olimexino_stm32.srec"; |
||||
|
||||
|
||||
/****************************************************************************************
|
||||
* Local data declarations |
||||
****************************************************************************************/ |
||||
#if (BOOT_FILE_LOGGING_ENABLE > 0) |
||||
/** \brief Data structure for grouping log-file related information. */ |
||||
static struct |
||||
{ |
||||
FIL handle; /**< FatFS handle to the log-file. */ |
||||
blt_bool canUse; /**< Flag to indicate if the log-file can be used. */ |
||||
} logfile; |
||||
#endif |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called to check whether a firmware update from |
||||
** local file storage should be started. This could for example be when |
||||
** a switch is pressed, when a certain file is found on the local file |
||||
** storage, etc. |
||||
** \return BLT_TRUE if a firmware update is requested, BLT_FALSE otherwise. |
||||
** |
||||
****************************************************************************************/ |
||||
blt_bool FileIsFirmwareUpdateRequestedHook(void) |
||||
{ |
||||
FILINFO fileInfoObject = { 0 }; /* needs to be zeroed according to f_stat docs */; |
||||
|
||||
/* Current example implementation looks for a predetermined firmware file on the
|
||||
* SD-card. If the SD-card is accessible and the firmware file was found the firmware |
||||
* update is started. When successfully completed, the firmware file is deleted. |
||||
* During the firmware update, progress information is written to a file called |
||||
* bootlog.txt and additionally outputted on UART @57600 bps for debugging purposes. |
||||
*/ |
||||
/* check if firmware file is present and SD-card is accessible */ |
||||
if (f_stat(firmwareFilename, &fileInfoObject) == FR_OK) |
||||
{ |
||||
/* check if the filesize is valid and that it is not a directory */ |
||||
if ( (fileInfoObject.fsize > 0) && (!(fileInfoObject.fattrib & AM_DIR)) ) |
||||
{ |
||||
/* all conditions are met to start a firmware update from local file storage */ |
||||
return BLT_TRUE; |
||||
} |
||||
} |
||||
/* still here so no firmware update request is pending */ |
||||
return BLT_FALSE; |
||||
} /*** end of FileIsFirmwareUpdateRequestedHook ***/ |
||||
|
||||
|
||||
/************************************************************************************//**
|
||||
** \brief Callback to obtain the filename of the firmware file that should be |
||||
** used during the firmware update from the local file storage. This |
||||
** hook function is called at the beginning of the firmware update from |
||||
** local storage sequence. |
||||
** \return valid firmware filename with full path or BLT_NULL. |
||||
** |
||||
****************************************************************************************/ |
||||
const blt_char *FileGetFirmwareFilenameHook(void) |
||||
{ |
||||
return firmwareFilename; |
||||
} /*** end of FileGetFirmwareFilenameHook ***/ |
||||
|
||||
|
||||
#if (BOOT_FILE_STARTED_HOOK_ENABLE > 0) |
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called to inform the application that a firmware |
||||
** update from local storage just started. |
||||
** \return none. |
||||
** |
||||
****************************************************************************************/ |
||||
void FileFirmwareUpdateStartedHook(void) |
||||
{ |
||||
#if (BOOT_FILE_LOGGING_ENABLE > 0) |
||||
/* create/overwrite the logfile */ |
||||
logfile.canUse = BLT_FALSE; |
||||
if (f_open(&logfile.handle, "/bootlog.txt", FA_CREATE_ALWAYS | FA_WRITE) == FR_OK) |
||||
{ |
||||
logfile.canUse = BLT_TRUE; |
||||
} |
||||
#endif |
||||
} /*** end of FileFirmwareUpdateStartedHook ***/ |
||||
#endif /* BOOT_FILE_STARTED_HOOK_ENABLE > 0 */ |
||||
|
||||
|
||||
#if (BOOT_FILE_COMPLETED_HOOK_ENABLE > 0) |
||||
/************************************************************************************//**
|
||||
** \brief Callback that gets called to inform the application that a firmware |
||||
** update was successfully completed. |
||||
** \return none. |
||||
** |
||||
****************************************************************************************/ |
||||
void FileFirmwareUpdateCompletedHook(void) |
||||
{ |
||||
#if (BOOT_FILE_LOGGING_ENABLE > 0) |
||||
/* close the log file */ |
||||
if (logfile.canUse == BLT_TRUE) |
||||
{ |
||||
f_close(&logfile.handle); |
||||