project additions/changes
This commit is contained in:
@@ -10,54 +10,55 @@
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" 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.debug" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.758218853" 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.758218853." name="/" resourcePath="">
|
||||
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.314914023" 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.2093377595" 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.598834512" 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.1434910909" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" value="STM32F446RETx" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.2131219076" 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.1751600940" 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.fpu.595879761" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.value.fpv4-sp-d16" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.645252596" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.value.hard" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1432715638" 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.325975872" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" 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 || STM32F446RETx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Inc || || || STM32 | STM32F4 | STM32F446RETx || || Src | Startup | Inc || || || ${workspace_loc:/${ProjName}/STM32F446RETX_FLASH.ld} || true || NonSecure || || || " valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.option.internal.toolchain.type.2093377595" 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.598834512" 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.1434910909" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32F446RETx" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.2131219076" name="CPU" 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.1751600940" name="Core" 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.fpu.595879761" name="Floating-point unit" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.value.fpv4-sp-d16" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.645252596" name="Floating-point ABI" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.value.soft" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1432715638" 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.325975872" 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 || STM32F446RETx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Inc || || || STM32 | STM32F4 | STM32F446RETx || || Src | Startup | Inc || || || ${workspace_loc:/${ProjName}/STM32F446RETX_FLASH.ld} || true || NonSecure || || || " valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.2125311367" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||
<builder buildPath="${workspace_loc:/labW9barnestr}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.67455319" managedBuildOn="true" name="Gnu Make Builder.Debug" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
||||
<builder buildPath="${workspace_loc:/labW9barnestr}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.67455319" 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.501969741" 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.1622400702" 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.g3" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.1622400702" 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.g3" valueType="enumerated"/>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.50352591" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.442782747" 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.1089883811" 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.1530416816" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.862090619" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.1089883811" 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.1530416816" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.862090619" 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="STM32"/>
|
||||
<listOptionValue builtIn="false" value="STM32F4"/>
|
||||
<listOptionValue builtIn="false" value="STM32F446RETx"/>
|
||||
<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.341732715" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.341732715" 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="../Inc"/>
|
||||
</option>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.2027988495" 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.1762508739" 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.55998328" 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.1177548900" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.55998328" 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.1177548900" 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.1875494709" 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.12623546" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F446RETX_FLASH.ld}" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.12623546" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F446RETX_FLASH.ld}" valueType="string"/>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.1176904881" 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.1727870636" 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.1501269015" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F446RETX_FLASH.ld}" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.script.1501269015" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F446RETX_FLASH.ld}" valueType="string"/>
|
||||
</tool>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.191812363" 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.1765472370" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
|
||||
@@ -87,53 +88,54 @@
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" 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.670434234" 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.670434234." name="/" resourcePath="">
|
||||
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.1435344315" 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.305299133" 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.1767254861" 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.940350825" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" value="STM32F446RETx" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.871846741" 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.1147616462" 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.fpu.1572000731" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.value.fpv4-sp-d16" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.137811664" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.value.hard" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1094130940" 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.1091125772" 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 || STM32F446RETx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Inc || || || STM32 | STM32F4 | STM32F446RETx || || Src | Startup | Inc || || || ${workspace_loc:/${ProjName}/STM32F446RETX_FLASH.ld} || true || NonSecure || || || " valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.option.internal.toolchain.type.305299133" 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.1767254861" 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.940350825" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32F446RETx" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.871846741" name="CPU" 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.1147616462" name="Core" 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.fpu.1572000731" name="Floating-point unit" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.value.fpv4-sp-d16" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.137811664" name="Floating-point ABI" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.value.hard" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1094130940" 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.1091125772" 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 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32 || STM32F446RETx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Inc || || || STM32 | STM32F4 | STM32F446RETx || || Src | Startup | Inc || || || ${workspace_loc:/${ProjName}/STM32F446RETX_FLASH.ld} || true || NonSecure || || || " valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1450300657" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||
<builder buildPath="${workspace_loc:/labW9barnestr}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1576362828" managedBuildOn="true" name="Gnu Make Builder.Release" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
||||
<builder buildPath="${workspace_loc:/labW9barnestr}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1576362828" 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.753051246" 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.2082371696" 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"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.2082371696" 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.1449326138" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.737436250" 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.1907888448" 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.83277333" 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.o3" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1424299241" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.1907888448" 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.83277333" 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.o3" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1424299241" 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="STM32"/>
|
||||
<listOptionValue builtIn="false" value="STM32F4"/>
|
||||
<listOptionValue builtIn="false" value="STM32F446RETx"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.62969259" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.62969259" 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="../Inc"/>
|
||||
</option>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.989627519" 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.1227628442" 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.623520312" 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.1835692058" 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.o3" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.623520312" 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.1835692058" 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.o3" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.182512239" 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.957146942" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F446RETX_FLASH.ld}" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.957146942" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F446RETX_FLASH.ld}" valueType="string"/>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.703682751" 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.1793090001" 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.576850213" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F446RETX_FLASH.ld}" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.script.576850213" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F446RETX_FLASH.ld}" valueType="string"/>
|
||||
</tool>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.1465534740" 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.1702659418" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
|
||||
@@ -169,4 +171,5 @@
|
||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
</cproject>
|
||||
37
labW9barnestr/Inc/delay.h
Normal file
37
labW9barnestr/Inc/delay.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* delay.h
|
||||
*
|
||||
* Created on: Dec 10, 2021
|
||||
* Author: Trevor Barnes
|
||||
*/
|
||||
|
||||
//include guards
|
||||
#ifndef DELAY_H_
|
||||
#define DELAY_H_
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#define STK_CTRL (volatile uint32_t*) 0xE000E010
|
||||
#define STK_LOAD (volatile uint32_t*) 0xE000E014
|
||||
#define STK_VAL (volatile uint32_t*) 0xE000E018
|
||||
|
||||
#define EN 1
|
||||
#define TICKINT (1<<1)
|
||||
#define CLKSOURCE (1<<2)
|
||||
#define COUNTFLAG (1<<16)
|
||||
|
||||
/*
|
||||
* delay_1ms
|
||||
* Busy wait for n ms
|
||||
*
|
||||
* For n iterations
|
||||
* load number of cycles for 1 ms
|
||||
* set one to enable and clock source
|
||||
*
|
||||
* wait for countflag to be set
|
||||
*/
|
||||
void delay_1ms(uint32_t n);
|
||||
|
||||
|
||||
|
||||
#endif /* DELAY_H_ */
|
||||
101
labW9barnestr/Inc/led.h
Normal file
101
labW9barnestr/Inc/led.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* led.h
|
||||
*
|
||||
* Created on: Dec 10, 2021
|
||||
* Author: Trevor Barnes
|
||||
*/
|
||||
|
||||
#ifndef LED_H_
|
||||
#define LED_H_
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#define RCC_AHB1ENR (volatile uint32_t*) 0x40023830
|
||||
#define GPIOBEN 1
|
||||
#define GPIOB_MODER (volatile uint32_t*) 0x40020400
|
||||
#define GPIOB_PUPDR (volatile uint32_t*) 0x4002040C
|
||||
#define GPIOB_IDR (volatile uint32_t*) 0x40020410
|
||||
#define GPIOB_ODR (volatile uint32_t*) 0x40020414
|
||||
#define GPIOB_BSRR (volatile uint32_t*) 0x40020418
|
||||
|
||||
#define ALL_LEDS (0b11110111111<<5)
|
||||
|
||||
/*
|
||||
* led_init()
|
||||
* This function should:
|
||||
* 1. Enable the GPIOB in RCC_AHB1ENR
|
||||
* 2. Turn on to set LED0 - LED9 to output mode ("01")
|
||||
*/
|
||||
void led_init();
|
||||
|
||||
/*
|
||||
* led_allOn()
|
||||
* 1. Turn on all leds (hint use ODR or BSRR)
|
||||
* Note you should not effect other pins on PortB
|
||||
*/
|
||||
void led_allOn();
|
||||
|
||||
/*
|
||||
* led_allOff()
|
||||
* 1. Turn off all leds (hint use ODR or BSRR)
|
||||
* Note you should not effect other pins on PortB
|
||||
*/
|
||||
void led_allOff();
|
||||
|
||||
/*
|
||||
* led_on()
|
||||
* Args: 0-9 to turn on specific led
|
||||
* print error message is arg is out of range
|
||||
*/
|
||||
void led_on(uint8_t ledIndex);
|
||||
|
||||
/*
|
||||
* led_off()
|
||||
* Args: 0-9 to turn off specific led
|
||||
* print error message is arg is out of range
|
||||
*/
|
||||
void led_off(uint8_t ledIndex);
|
||||
|
||||
|
||||
/*
|
||||
* led_scan()
|
||||
* Scan the light across and back at the current speed
|
||||
*/
|
||||
void led_scan();
|
||||
|
||||
/*
|
||||
* led_flash()
|
||||
* flash all of the lights 10 times at the current speed
|
||||
*/
|
||||
void led_flash();
|
||||
|
||||
/*
|
||||
* led_setSpeed (uint8_t speed)
|
||||
* arg: speed (0 slow - 9 fast)
|
||||
* Args out of range should print error to console
|
||||
*/
|
||||
void led_setSpeed(uint8_t speed);
|
||||
|
||||
/*
|
||||
* led_incSpeed()
|
||||
* increases the speed by one
|
||||
* if maxed out leaves the speed at the max value
|
||||
*/
|
||||
void led_incSpeed();
|
||||
|
||||
/*
|
||||
* led_decSpeed()
|
||||
* decreases the speed by one
|
||||
* if at zero should stay at zero
|
||||
*/
|
||||
void led_decSpeed();
|
||||
|
||||
/*
|
||||
* getCurrentSpeed
|
||||
* returns the current speed
|
||||
*/
|
||||
uint8_t getCurrentSpeed();
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
41
labW9barnestr/Inc/tasker.h
Normal file
41
labW9barnestr/Inc/tasker.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @file tasker.h
|
||||
* @author Trevor Barnes
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2022-02-11
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
typedef enum{PAUSED, ACTIVE} task_state;
|
||||
|
||||
#define SCB_ICSR 0xE000D04
|
||||
#define PENDSVSET 28
|
||||
|
||||
extern int num_tasks;
|
||||
extern int current_task;
|
||||
extern int next_task;
|
||||
extern Task tasks[];
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint32_t* stack_pointer;
|
||||
uint32_t ticks_starting;
|
||||
uint32_t ticks_remaining;
|
||||
task_state state;
|
||||
} Task;
|
||||
|
||||
void SysTick_Init();
|
||||
|
||||
void tasker_tick();
|
||||
|
||||
void init_tasker(uint32_t total_tasks, uint32_t main_ticks);
|
||||
|
||||
void init_task(uint32_t task_num, uint32_t stacksize,
|
||||
void(*entry_point)(void), uint32_t ticks);
|
||||
|
||||
void PendSV_Handler(void __attribute__((naked)));
|
||||
49
labW9barnestr/Inc/uart_driver.h
Normal file
49
labW9barnestr/Inc/uart_driver.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* uart_driver.h
|
||||
*
|
||||
* Created on: Nov 8, 2016
|
||||
* Author: barnekow
|
||||
*/
|
||||
|
||||
#ifndef UART_DRIVER_H_
|
||||
#define UART_DRIVER_H_
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
// RCC registers
|
||||
#define RCC_APB1ENR (volatile uint32_t*) 0x40023840
|
||||
#define RCC_AHB1ENR (volatile uint32_t*) 0x40023830
|
||||
|
||||
#define GPIOAEN 0 // GPIOA Enable is bit 0 in RCC_APB1LPENR
|
||||
#define USART2EN 17 // USART2 enable is bit 17 in RCC_AHB1LPENR
|
||||
|
||||
// GPIOA registers
|
||||
#define GPIOA_MODER (volatile uint32_t*) 0x40020000
|
||||
#define GPIOA_AFRL (volatile uint32_t*) 0x40020020
|
||||
#define USART_SR (volatile uint32_t*) 0x40004400
|
||||
#define USART_DR (volatile uint32_t*) 0x40004404
|
||||
#define USART_BRR (volatile uint32_t*) 0x40004408
|
||||
#define USART_CR1 (volatile uint32_t*) 0x4000440c
|
||||
#define USART_CR2 (volatile uint32_t*) 0x40004410
|
||||
#define USART_CR3 (volatile uint32_t*) 0x40004414
|
||||
|
||||
// CR1 bits
|
||||
#define UE 13 //UART enable
|
||||
#define TE 3 // Transmitter enable
|
||||
#define RE 2 // Receiver enable
|
||||
|
||||
// Status register bits
|
||||
#define TXE 7 // Transmit register empty
|
||||
#define RXNE 5 // Receive register is not empty..char received
|
||||
|
||||
// Function prototypes
|
||||
extern void init_usart2(uint32_t baud, uint32_t sysclk);
|
||||
extern char usart2_getch();
|
||||
extern void usart2_putch(char c);
|
||||
|
||||
// syscalls overrides
|
||||
int _read(int file, char *ptr, int len);
|
||||
int _write(int file, char *ptr, int len);
|
||||
|
||||
|
||||
#endif /* UART_DRIVER_H_ */
|
||||
28
labW9barnestr/Src/delay.c
Normal file
28
labW9barnestr/Src/delay.c
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* delay.c
|
||||
*
|
||||
* Created on: Dec 10, 2021
|
||||
* Author: Trevor Barnes
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "delay.h" //include declaration header file
|
||||
|
||||
void delay_1ms(uint32_t n){
|
||||
|
||||
// 1ms = 16,000 ticks
|
||||
for (int i = n ; i > 0 ; i--) {
|
||||
// Clear value register
|
||||
*STK_VAL = 0x0000;
|
||||
// Store 16,000 in STK_LOAD
|
||||
*STK_LOAD = 16000;
|
||||
// Enable clock, no prescaler, no interrupt
|
||||
*STK_CTRL |= CLKSOURCE;
|
||||
*STK_CTRL |= EN;
|
||||
// Loop n times: Wait for countflag high
|
||||
int flag;
|
||||
do {
|
||||
flag = ((*STK_CTRL & (1<<16))>>16);
|
||||
} while (flag != 1);
|
||||
}
|
||||
}
|
||||
147
labW9barnestr/Src/led.c
Normal file
147
labW9barnestr/Src/led.c
Normal file
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
* led.c
|
||||
*
|
||||
* Created on: Dec 10, 2021
|
||||
* Author: Trevor Barnes
|
||||
*/
|
||||
|
||||
#include "led.h"
|
||||
#include "delay.h"
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int ledSpeed = 5;
|
||||
|
||||
void led_init(){
|
||||
// Initialize corresponding RCC and GPIO registers
|
||||
*RCC_AHB1ENR |= (1<<GPIOBEN);
|
||||
|
||||
*GPIOB_MODER &= ~(0x3FFF<<10);
|
||||
*GPIOB_MODER |= (0x555<<10);
|
||||
|
||||
*GPIOB_MODER &= ~(0xFF<<24);
|
||||
*GPIOB_MODER |= (0x55<<24);
|
||||
}
|
||||
|
||||
void led_allOn(){
|
||||
// Set all LED Bits
|
||||
*GPIOB_ODR |= ALL_LEDS;
|
||||
}
|
||||
|
||||
|
||||
void led_allOff(){
|
||||
// Reset all LED bits
|
||||
*GPIOB_ODR &= ~(ALL_LEDS);
|
||||
|
||||
}
|
||||
|
||||
void led_on(uint8_t ledIndex){
|
||||
// Set individual LED based on passed in index
|
||||
switch (ledIndex) {
|
||||
case 0:
|
||||
*GPIOB_BSRR = (1<<5);
|
||||
break;
|
||||
case 1:
|
||||
*GPIOB_BSRR = (1<<6);
|
||||
break;
|
||||
case 2:
|
||||
*GPIOB_BSRR = (1<<7);
|
||||
break;
|
||||
case 3:
|
||||
*GPIOB_BSRR = (1<<8);
|
||||
break;
|
||||
case 4:
|
||||
*GPIOB_BSRR = (1<<9);
|
||||
break;
|
||||
case 5:
|
||||
*GPIOB_BSRR = (1<<10);
|
||||
break;
|
||||
case 6:
|
||||
*GPIOB_BSRR = (1<<12);
|
||||
break;
|
||||
case 7:
|
||||
*GPIOB_BSRR = (1<<13);
|
||||
break;
|
||||
case 8:
|
||||
*GPIOB_BSRR = (1<<14);
|
||||
break;
|
||||
case 9:
|
||||
*GPIOB_BSRR = (1<<15);
|
||||
break;
|
||||
default:
|
||||
printf("LED index out of range\n\r");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void led_off(uint8_t ledIndex){
|
||||
// Reset individual LED based on passed in index
|
||||
if (ledIndex < 6) {
|
||||
*GPIOB_BSRR = (1<<(21+ledIndex));
|
||||
} else if (ledIndex >= 6) {
|
||||
// Add pin offset to index
|
||||
*GPIOB_BSRR = (1<<(22+ledIndex));
|
||||
} else {
|
||||
printf("LED index out of range\n\r");
|
||||
}
|
||||
}
|
||||
|
||||
void led_scan(){
|
||||
led_allOff();
|
||||
// Right to left each LED
|
||||
for (int i = 0; i <= 9 ; i++) {
|
||||
// Scaled Delay
|
||||
delay_1ms(50+(ledSpeed*50));
|
||||
if(i != 0){
|
||||
led_off(i-1);
|
||||
}
|
||||
led_on(i);
|
||||
}
|
||||
// Left to right each LED
|
||||
for (int i = 9; i >= 0; i--) {
|
||||
if(i != 9){
|
||||
led_off(i+1);
|
||||
}
|
||||
led_on(i);
|
||||
// Scaled Delay
|
||||
delay_1ms(50+(ledSpeed*50));
|
||||
}
|
||||
led_off(0);
|
||||
}
|
||||
|
||||
void led_flash(){
|
||||
// Flash LED on and off 10 times at a speed between 0-1 seconds
|
||||
for (int i = 0; i < 10; i++) {
|
||||
led_allOn();
|
||||
delay_1ms(100+(ledSpeed*100));
|
||||
led_allOff();
|
||||
delay_1ms(100+(ledSpeed*100));
|
||||
}
|
||||
}
|
||||
|
||||
void led_setSpeed(uint8_t speed){
|
||||
ledSpeed = speed;
|
||||
}
|
||||
|
||||
void led_incSpeed(){
|
||||
if (ledSpeed == 0){
|
||||
printf("Speed too fast\n\r");
|
||||
} else {
|
||||
ledSpeed--;
|
||||
}
|
||||
}
|
||||
|
||||
void led_decSpeed(){
|
||||
if (ledSpeed == 9){
|
||||
printf("Speed too slow\n\r");
|
||||
} else {
|
||||
ledSpeed++;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t getCurrentSpeed()
|
||||
{
|
||||
return ledSpeed;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file main.c
|
||||
* @author Auto-generated by STM32CubeIDE
|
||||
* @version V1.0
|
||||
* @brief Default main function.
|
||||
******************************************************************************
|
||||
*/
|
||||
* @file main.c
|
||||
* @author Trevor Barnes
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2022-02-11
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(__SOFT_FP__) && defined(__ARM_FP)
|
||||
#warning "FPU is not initialized, but the project is compiling for an FPU. Please initialize the FPU before use."
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "uart_driver.h"
|
||||
#include "delay.h"
|
||||
#include "led.h"
|
||||
#include "tasker.h"
|
||||
|
||||
int main(void) {
|
||||
|
||||
int main(void)
|
||||
{
|
||||
for(;;);
|
||||
}
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
/**
|
||||
*****************************************************************************
|
||||
**
|
||||
** File : syscalls.c
|
||||
**
|
||||
** Author : Auto-generated by STM32CubeIDE
|
||||
**
|
||||
** Abstract : STM32CubeIDE Minimal System calls file
|
||||
**
|
||||
** For more information about which c-functions
|
||||
** need which of these lowlevel functions
|
||||
** please consult the Newlib libc-manual
|
||||
**
|
||||
** Environment : STM32CubeIDE MCU
|
||||
**
|
||||
** Distribution: The file is distributed as is, without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
**
|
||||
** <h2><center>© COPYRIGHT(c) 2018 STMicroelectronics</center></h2>
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without modification,
|
||||
** are permitted provided that the following conditions are met:
|
||||
** 1. Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
** this list of conditions and the following disclaimer in the documentation
|
||||
** and/or other materials provided with the distribution.
|
||||
** 3. Neither the name of STMicroelectronics nor the names of its contributors
|
||||
** may be used to endorse or promote products derived from this software
|
||||
** without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes */
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/times.h>
|
||||
|
||||
|
||||
/* Variables */
|
||||
//#undef errno
|
||||
extern int errno;
|
||||
extern int __io_putchar(int ch) __attribute__((weak));
|
||||
extern int __io_getchar(void) __attribute__((weak));
|
||||
|
||||
register char * stack_ptr asm("sp");
|
||||
|
||||
char *__env[1] = { 0 };
|
||||
char **environ = __env;
|
||||
|
||||
|
||||
/* Functions */
|
||||
void initialise_monitor_handles()
|
||||
{
|
||||
}
|
||||
|
||||
int _getpid(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int _kill(int pid, int sig)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
void _exit (int status)
|
||||
{
|
||||
_kill(status, -1);
|
||||
while (1) {} /* Make sure we hang here */
|
||||
}
|
||||
|
||||
__attribute__((weak)) int _read(int file, char *ptr, int len)
|
||||
{
|
||||
int DataIdx;
|
||||
|
||||
for (DataIdx = 0; DataIdx < len; DataIdx++)
|
||||
{
|
||||
*ptr++ = __io_getchar();
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
__attribute__((weak)) int _write(int file, char *ptr, int len)
|
||||
{
|
||||
int DataIdx;
|
||||
|
||||
for (DataIdx = 0; DataIdx < len; DataIdx++)
|
||||
{
|
||||
__io_putchar(*ptr++);
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
int _close(int file)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int _fstat(int file, struct stat *st)
|
||||
{
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _isatty(int file)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int _lseek(int file, int ptr, int dir)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _open(char *path, int flags, ...)
|
||||
{
|
||||
/* Pretend like we always fail */
|
||||
return -1;
|
||||
}
|
||||
|
||||
int _wait(int *status)
|
||||
{
|
||||
errno = ECHILD;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int _unlink(char *name)
|
||||
{
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int _times(struct tms *buf)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int _stat(char *file, struct stat *st)
|
||||
{
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _link(char *old, char *new)
|
||||
{
|
||||
errno = EMLINK;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int _fork(void)
|
||||
{
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int _execve(char *name, char **argv, char **env)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
/**
|
||||
*****************************************************************************
|
||||
**
|
||||
** File : sysmem.c
|
||||
**
|
||||
** Author : Auto-generated by STM32CubeIDE
|
||||
**
|
||||
** Abstract : STM32CubeIDE Minimal System Memory calls file
|
||||
**
|
||||
** For more information about which c-functions
|
||||
** need which of these lowlevel functions
|
||||
** please consult the Newlib libc-manual
|
||||
**
|
||||
** Environment : STM32CubeIDE MCU
|
||||
**
|
||||
** Distribution: The file is distributed as is, without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
**
|
||||
** <h2><center>© COPYRIGHT(c) 2018 STMicroelectronics</center></h2>
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without modification,
|
||||
** are permitted provided that the following conditions are met:
|
||||
** 1. Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
** this list of conditions and the following disclaimer in the documentation
|
||||
** and/or other materials provided with the distribution.
|
||||
** 3. Neither the name of STMicroelectronics nor the names of its contributors
|
||||
** may be used to endorse or promote products derived from this software
|
||||
** without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes */
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* Variables */
|
||||
extern int errno;
|
||||
register char * stack_ptr asm("sp");
|
||||
|
||||
/* Functions */
|
||||
|
||||
/**
|
||||
_sbrk
|
||||
Increase program data space. Malloc and related functions depend on this
|
||||
**/
|
||||
caddr_t _sbrk(int incr)
|
||||
{
|
||||
extern char end asm("end");
|
||||
static char *heap_end;
|
||||
char *prev_heap_end;
|
||||
|
||||
if (heap_end == 0)
|
||||
heap_end = &end;
|
||||
|
||||
prev_heap_end = heap_end;
|
||||
if (heap_end + incr > stack_ptr)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return (caddr_t) -1;
|
||||
}
|
||||
|
||||
heap_end += incr;
|
||||
|
||||
return (caddr_t) prev_heap_end;
|
||||
}
|
||||
|
||||
76
labW9barnestr/Src/tasker.c
Normal file
76
labW9barnestr/Src/tasker.c
Normal file
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* @file tasker.c
|
||||
* @author Trevor Barnes
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2022-02-11
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include "tasker.h"
|
||||
|
||||
void SysTick_Init() {
|
||||
|
||||
}
|
||||
|
||||
void init_task(uint32_t task_num, uint32_t stacksize, void(*entry_point)(void), uint32_t ticks) {
|
||||
tasks[task_num].stack_pointer = (uint32_t*)malloc(stacksize*sizeof(uint32_t));
|
||||
tasks[task_num].stack_pointer += stacksize;
|
||||
*(--tasks[task_num].stack_pointer) = 0x01000000; // PSR
|
||||
*(--tasks[task_num].stack_pointer) = ((uint32_t)entry_point);
|
||||
*(--tasks[task_num].stack_pointer) = 0xFFFFFFFF;
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R12
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R3
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R2
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R1
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R0
|
||||
*(--tasks[task_num].stack_pointer) = 0xFFFFFFF9; // ISR LR
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R11
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R10
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R9
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R8
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R7
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R6
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R5
|
||||
*(--tasks[task_num].stack_pointer) = 0; // R4
|
||||
tasks[task_num].state = ACTIVE;
|
||||
tasks[task_num].ticks_starting = ticks;
|
||||
tasks[task_num].ticks_remaining = 0;
|
||||
}
|
||||
|
||||
void init_tasker(uint32_t total_tasks, uint32_t main_ticks) {
|
||||
num_tasks = total_tasks;
|
||||
*tasks = calloc(total_tasks, sizeof(Task));
|
||||
}
|
||||
|
||||
|
||||
void tasker_tick() {
|
||||
tasks[current_task].ticks_remaining--;
|
||||
|
||||
if(tasks[current_task].ticks_remaining == 0) {
|
||||
int i = 1;
|
||||
while(tasks[(next_task = (current_task + i)%num_tasks)].state != ACTIVE) {
|
||||
i++;
|
||||
}
|
||||
tasks[next_task].ticks_remaining = tasks[next_task].ticks_starting;
|
||||
//*scb_icsr |= 1<<PENDSVSET;
|
||||
}
|
||||
}
|
||||
|
||||
void SysTick_Handler(void) {
|
||||
|
||||
}
|
||||
|
||||
void PendSV_Handler(void) {
|
||||
register uint32_t* stack_pointer asm("r13");
|
||||
asm volatile("push {r4-r11,lr}");
|
||||
tasks[current_task].stack_pointer = stack_pointer;
|
||||
current_task = next_task;
|
||||
stack_pointer = tasks[current_task].stack_pointer;
|
||||
asm volatile("pop {r4-r11,lr}\n\t"
|
||||
"bx lr");
|
||||
}
|
||||
92
labW9barnestr/Src/uart_driver.c
Normal file
92
labW9barnestr/Src/uart_driver.c
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* uart_driver.c
|
||||
*
|
||||
* Created on: Nov 8, 2016
|
||||
* Author: barnekow
|
||||
*/
|
||||
#include "uart_driver.h"
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
// These will override _read and _write in syscalls.c, which are
|
||||
// prototyped as weak
|
||||
int _read(int file, char *ptr, int len)
|
||||
{
|
||||
int DataIdx;
|
||||
// Modified the for loop in order to get the correct behavior for fgets
|
||||
int byteCnt = 0;
|
||||
for (DataIdx = 0; DataIdx < len; DataIdx++)
|
||||
{
|
||||
//*ptr++ = __io_getchar();
|
||||
byteCnt++;
|
||||
//*ptr++ = usart2_getch();
|
||||
*ptr = usart2_getch();
|
||||
if(*ptr == '\n') break;
|
||||
ptr++;
|
||||
}
|
||||
|
||||
//return len;
|
||||
return byteCnt; // Return byte count
|
||||
}
|
||||
|
||||
int _write(int file, char *ptr, int len)
|
||||
{
|
||||
int DataIdx;
|
||||
|
||||
for (DataIdx = 0; DataIdx < len; DataIdx++)
|
||||
{
|
||||
usart2_putch(*ptr++);
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
|
||||
char usart2_getch(){
|
||||
char c;
|
||||
while((*(USART_SR)&(1<<RXNE)) != (1<<RXNE));
|
||||
c = ((char) *USART_DR); // Read character from usart
|
||||
usart2_putch(c); // Echo back
|
||||
|
||||
if (c == '\r'){ // If character is CR
|
||||
usart2_putch('\n'); // send it
|
||||
c = '\n'; // Return LF. fgets is terminated by LF
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
void usart2_putch(char c){
|
||||
while((*(USART_SR)&(1<<TXE)) != (1<<TXE));
|
||||
*(USART_DR) = c;
|
||||
}
|
||||
|
||||
void init_usart2(uint32_t baud, uint32_t sysclk){
|
||||
// Enable clocks for GPIOA and USART2
|
||||
*(RCC_AHB1ENR) |= (1<<GPIOAEN);
|
||||
*(RCC_APB1ENR) |= (1<<USART2EN);
|
||||
|
||||
// Function 7 of PORTA pins is USART
|
||||
*(GPIOA_AFRL) &= (0xFFFF00FF); // Clear the bits associated with PA3 and PA2
|
||||
*(GPIOA_AFRL) |= (0b01110111<<8); // Choose function 7 for both PA3 and PA2
|
||||
*(GPIOA_MODER) &= (0xFFFFFF0F); // Clear mode bits for PA3 and PA2
|
||||
*(GPIOA_MODER) |= (0b1010<<4); // Both PA3 and PA2 in alt function mode
|
||||
|
||||
// Set up USART2
|
||||
//USART2_init(); //8n1 no flow control
|
||||
// over8 = 0..oversample by 16
|
||||
// M = 0..1 start bit, data size is 8, 1 stop bit
|
||||
// PCE= 0..Parity check not enabled
|
||||
// no interrupts... using polling
|
||||
*(USART_CR1) = (1<<UE)|(1<<TE)|(1<<RE); // Enable UART, Tx and Rx
|
||||
*(USART_CR2) = 0; // This is the default, but do it anyway
|
||||
*(USART_CR3) = 0; // This is the default, but do it anyway
|
||||
*(USART_BRR) = sysclk/baud;
|
||||
|
||||
/* I'm not sure if this is needed for standard IO*/
|
||||
//setvbuf(stderr, NULL, _IONBF, 0);
|
||||
//setvbuf(stdin, NULL, _IONBF, 0);
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user