first commit

This commit is contained in:
fewikay committed 2026-10-16 13:08:06 +02:00
commit 92cbe97616
1978 files changed
+1688498

No files matched your search

+282
View File
@@ -0,0 +1,282 @@
<?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.1194244083">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083" 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="${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.1194244083" 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.1194244083." name="/" resourcePath="">
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.828207417" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.437059308" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32H755ZITx" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1019120318" 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.2106454890" 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.2011355551" 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.fpv5-d16" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.1587876848" 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.263425911" 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.68099515" 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.6 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32H755ZITx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../../Drivers/STM32H7xx_HAL_Driver/Inc | ../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy | ../../Drivers/CMSIS/Device/ST/STM32H7xx/Include | ../../Drivers/CMSIS/Include | ../OPENAMP | ../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include | ../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include | ../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc | ../../Middlewares/Third_Party/OpenAMP/virtual_driver | ../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg || || || CORE_CM7 | USE_HAL_DRIVER | STM32H755xx | METAL_INTERNAL | METAL_MAX_DEVICE_REGIONS=2 | RPMSG_BUFFER_SIZE=512 | VIRTIO_MASTER_ONLY | NO_ATOMIC_64_SUPPORT | USE_PWR_DIRECT_SMPS_SUPPLY || || Core/Src | Drivers | OPENAMP | Core/Startup | Middlewares | Common || || || ${workspace_loc:/${ProjName}/STM32H755ZITX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || || ::" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1152195024" name="Cpu clock frequence" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="200" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.runtimelibrary_c.1180963885" name="Runtime library" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.runtimelibrary_c" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.runtimelibrary_c.value.nano_c" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoprintffloat.1500291335" name="Use float with printf from newlib-nano (-u _printf_float)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoprintffloat" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoscanffloat.1674214688" name="Use float with scanf from newlib-nano (-u _scanf_float)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoscanffloat" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.717110142" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
<builder buildPath="${workspace_loc:/stepper_h7_CM7}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.189481723" 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.2126497667" 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.1966634911" 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"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols.805168015" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="VIRTIO_MASTER_ONLY"/>
<listOptionValue builtIn="false" value="METAL_INTERNAL"/>
<listOptionValue builtIn="false" value="METAL_MAX_DEVICE_REGIONS=2"/>
<listOptionValue builtIn="false" value="NO_ATOMIC_64_SUPPORT"/>
<listOptionValue builtIn="false" value="RPMSG_BUFFER_SIZE=512"/>
<listOptionValue builtIn="false" value="STM32H7"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths.592520860" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths" valueType="includePath">
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../../../libs/LibL6474/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibSpindle/inc"/>
<listOptionValue builtIn="false" value="../Core/Inc/Stepper"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/conf"/>
<listOptionValue builtIn="false" value="../OPENAMP"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.224848552" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1324252333" 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.2043881931" 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.214193850" 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.1895861679" 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="DEBUG"/>
<listOptionValue builtIn="false" value="CORE_CM7"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32H755xx"/>
<listOptionValue builtIn="false" value="VIRTIO_MASTER_ONLY"/>
<listOptionValue builtIn="false" value="METAL_INTERNAL"/>
<listOptionValue builtIn="false" value="METAL_MAX_DEVICE_REGIONS=2"/>
<listOptionValue builtIn="false" value="NO_ATOMIC_64_SUPPORT"/>
<listOptionValue builtIn="false" value="STM32H7"/>
<listOptionValue builtIn="false" value="USE_PWR_DIRECT_SMPS_SUPPLY"/>
<listOptionValue builtIn="false" value="RPMSG_BUFFER_SIZE=512"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.2037184141" 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="../OPENAMP"/>
<listOptionValue builtIn="false" value="../Core/Inc"/>
<listOptionValue builtIn="false" value="../../Drivers/STM32H7xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../../Drivers/CMSIS/Device/ST/STM32H7xx/Include"/>
<listOptionValue builtIn="false" value="../../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../../../libs/LibL6474/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibSpindle/inc"/>
<listOptionValue builtIn="false" value="../Core/Inc/Stepper"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/conf"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/virtual_driver"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.808169832" 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.2065828702" 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.1671765798" 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.1568560894" 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.1783271802" 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.1797991315" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32H755ZITX_FLASH.ld}" valueType="string"/>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.2023946675" 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.585275424" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.971959260" 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.562656190" 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.712023138" 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.1194938928" 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.824238684" 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.465756616" 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.1501101643" 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.2134289215" 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="Common"/>
<entry excluding="Src/FreeRTOS-Kernel/portable/Common/mpu_wrappers.c|Src/FreeRTOS-Kernel/portable/MSVC-MingW|Src/FreeRTOS-Kernel/portable/Clang-Win32|Src/sysmem.c|Src/syscalls.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
<entry excluding="FreeRTOS-Kernel/portable/GCC/ARM_CM4F|FreeRTOS-Kernel/portable/MemMang|FreeRTOS-Kernel/portable/MSVC-MingW|FreeRTOS-Kernel/portable/Clang-Win32" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="OPENAMP"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1660277473">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1660277473" 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.1660277473" 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.1660277473." name="/" resourcePath="">
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.1373760315" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.1001657360" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32H755ZITx" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1397933605" 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.741203287" 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.359026103" 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.fpv5-d16" valueType="enumerated"/>
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.1076148112" 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.310363595" 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.2076124675" 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.6 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32H755ZITx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | ../../Drivers/STM32H7xx_HAL_Driver/Inc | ../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy | ../../Drivers/CMSIS/Device/ST/STM32H7xx/Include | ../../Drivers/CMSIS/Include | ../OPENAMP | ../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include | ../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include | ../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc | ../../Middlewares/Third_Party/OpenAMP/virtual_driver | ../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg || || || CORE_CM7 | USE_HAL_DRIVER | STM32H755xx | METAL_INTERNAL | METAL_MAX_DEVICE_REGIONS=2 | RPMSG_BUFFER_SIZE=512 | VIRTIO_MASTER_ONLY | NO_ATOMIC_64_SUPPORT | USE_PWR_DIRECT_SMPS_SUPPLY || || Core/Src | Drivers | OPENAMP | Core/Startup | Middlewares | Common || || || ${workspace_loc:/${ProjName}/STM32H755ZITX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || || ::" valueType="string"/>
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1927445715" name="Cpu clock frequence" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="200" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.2125210637" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
<builder buildPath="${workspace_loc:/stepper_h7_CM7}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.204738127" 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.102363953" 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.1118615991" 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"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths.703145142" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths" valueType="includePath">
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../../../libs/LibL6474/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibSpindle/inc"/>
<listOptionValue builtIn="false" value="../Core/Inc/Stepper"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/conf"/>
<listOptionValue builtIn="false" value="../OPENAMP"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols.1027009994" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="VIRTIO_MASTER_ONLY"/>
<listOptionValue builtIn="false" value="METAL_INTERNAL"/>
<listOptionValue builtIn="false" value="METAL_MAX_DEVICE_REGIONS=2"/>
<listOptionValue builtIn="false" value="NO_ATOMIC_64_SUPPORT"/>
<listOptionValue builtIn="false" value="RPMSG_BUFFER_SIZE=512"/>
<listOptionValue builtIn="false" value="STM32H7"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.306020802" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
</tool>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1322353819" 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.922859198" 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.123357632" 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.271711727" 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="CORE_CM7"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32H755xx"/>
<listOptionValue builtIn="false" value="VIRTIO_MASTER_ONLY"/>
<listOptionValue builtIn="false" value="METAL_INTERNAL"/>
<listOptionValue builtIn="false" value="METAL_MAX_DEVICE_REGIONS=2"/>
<listOptionValue builtIn="false" value="NO_ATOMIC_64_SUPPORT"/>
<listOptionValue builtIn="false" value="RPMSG_BUFFER_SIZE=512"/>
<listOptionValue builtIn="false" value="STM32H7"/>
<listOptionValue builtIn="false" value="USE_PWR_DIRECT_SMPS_SUPPLY"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.651899210" 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/STM32H7xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../../Drivers/CMSIS/Device/ST/STM32H7xx/Include"/>
<listOptionValue builtIn="false" value="../../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/include"/>
<listOptionValue builtIn="false" value="../../../libs/FreeRTOS-LTS/FreeRTOS/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1"/>
<listOptionValue builtIn="false" value="../../../libs/LibL6474/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/inc"/>
<listOptionValue builtIn="false" value="../../../libs/LibSpindle/inc"/>
<listOptionValue builtIn="false" value="../Core/Inc/Stepper"/>
<listOptionValue builtIn="false" value="../../../libs/LibRTOSConsole/conf"/>
<listOptionValue builtIn="false" value="../OPENAMP"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/libmetal/lib/include/metal/compiler/gcc"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/include"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg"/>
<listOptionValue builtIn="false" value="../../Middlewares/Third_Party/OpenAMP/virtual_driver"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.205497963" 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.416390792" 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.368073321" 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.1864894896" 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.1593047652" 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.1538795186" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32H755ZITX_FLASH.ld}" valueType="string"/>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.626636160" 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.1721506507" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.1372113103" 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.1540897759" 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.2072802314" 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.76942396" 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.1172432736" 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.515511909" 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.918200438" 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.2101137517" 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="Common"/>
<entry excluding="Src/FreeRTOS-Kernel/portable/Common/mpu_wrappers.c|Src/FreeRTOS-Kernel/portable/MSVC-MingW|Src/FreeRTOS-Kernel/portable/Clang-Win32|Src/sysmem.c|Src/syscalls.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
<entry excluding="FreeRTOS-Kernel/portable/GCC/ARM_CM4F|FreeRTOS-Kernel/portable/MemMang|FreeRTOS-Kernel/portable/MSVC-MingW|FreeRTOS-Kernel/portable/Clang-Win32" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="OPENAMP"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="stepper_h7_CM7.null.175305128" name="stepper_h7_CM7"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1660277473;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1660277473.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1322353819;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.205497963">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1324252333;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.808169832">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1098337479;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1098337479.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1007388151;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.2015107268">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1244977841;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1244977841.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.613622070;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1464540345">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1571300557;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1571300557.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.784689073;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.638121124">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1338325331;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1338325331.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1915944352;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1100093761">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>
@@ -0,0 +1,3 @@
build
Debug
Release
+883
View File
@@ -0,0 +1,883 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>stepper_h7_CM7</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>org.eclipse.cdt.core.cnature</nature>
<nature>com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature</nature>
<nature>com.st.stm32cube.ide.mcu.MCUCubeProjectNature</nature>
<nature>com.st.stm32cube.ide.mcu.MCUAdvancedStructureProjectNature</nature>
<nature>com.st.stm32cube.ide.mcu.MCUMultiCpuProjectNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<linkedResources>
<link>
<name>Common</name>
<type>2</type>
<locationURI>PARENT-1-PROJECT_LOC/Common</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/LICENSE.txt</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/LICENSE.txt</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/CMakeLists.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/CMakeLists.txt</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx.json</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx.json</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx.xml</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx.xml</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx.yaml</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/FreeRTOS-Kernel-V11.3.0-repository-SPDX2.3.spdx.yaml</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/GitHub-FreeRTOS-Kernel-Home.url</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/GitHub-FreeRTOS-Kernel-Home.url</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/History.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/History.txt</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/LICENSE.md</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/LICENSE.md</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/MISRA.md</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/MISRA.md</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/Quick_Start_Guide.url</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/Quick_Start_Guide.url</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/README.md</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/README.md</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/croutine.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/croutine.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/cspell.config.yaml</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/cspell.config.yaml</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/event_groups.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/event_groups.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/list.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/list.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/manifest.yml</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/manifest.yml</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/queue.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/queue.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/stream_buffer.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/stream_buffer.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/tasks.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/tasks.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/timers.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/timers.c</locationURI>
</link>
<link>
<name>Core/Inc/Console/inc</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Core/Inc/Stepper/conf</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Core/Inc/Stepper/inc</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Core/Src/Console/Console.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/LibRTOSConsole/src/Console.c</locationURI>
</link>
<link>
<name>Core/Src/Spindle/Spindle.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/LibSpindle/src/Spindle.c</locationURI>
</link>
<link>
<name>Core/Src/Stepper/src</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/Legacy</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cortex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_cortex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dma.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dma.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dma_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_dma_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_eth_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_exti.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_exti.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_flash_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_hsem.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_hsem.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2c.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2c.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2c_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_i2c_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_mdma.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_pwr_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_spi.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_spi.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_spi_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_spi_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_tim_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart_ex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_uart_ex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_bus.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_bus.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_cortex.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_cortex.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_crs.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_crs.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dma.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dma.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dmamux.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_dmamux.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_exti.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_exti.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_gpio.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_gpio.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_hsem.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_hsem.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_lpuart.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_lpuart.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_pwr.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_pwr.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rcc.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_rcc.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_spi.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_spi.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_system.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_system.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_tim.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_tim.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usart.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usart.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_utils.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_utils.h</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_eth.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_eth.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_eth_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_eth_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_exti.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_exti.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mdma.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mdma.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/CMakeLists.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/CMakeLists.txt</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/FreeRTOS.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/FreeRTOS.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/StackMacros.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/StackMacros.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/atomic.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/atomic.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/croutine.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/croutine.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/deprecated_definitions.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/deprecated_definitions.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/event_groups.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/event_groups.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/list.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/list.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/message_buffer.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/message_buffer.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/mpu_prototypes.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/mpu_prototypes.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/mpu_syscall_numbers.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/mpu_syscall_numbers.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/mpu_wrappers.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/mpu_wrappers.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/newlib-freertos.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/newlib-freertos.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/picolibc-freertos.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/picolibc-freertos.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/portable.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/portable.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/projdefs.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/projdefs.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/queue.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/queue.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/semphr.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/semphr.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/stack_macros.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/stack_macros.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/stdint.readme</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/stdint.readme</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/stream_buffer.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/stream_buffer.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/task.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/task.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/include/timers.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/include/timers.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/CMakeLists.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/CMakeLists.txt</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/Common</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MSVC-MingW</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/readme.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/readme.txt</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/condition.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/condition.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/device.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/device.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/generic_device.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/generic_device.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/generic_init.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/generic_init.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/generic_io.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/generic_io.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/generic_shmem.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/generic_shmem.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/init.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/init.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/io.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/io.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/log.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/log.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/remoteproc_virtio.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/open-amp/lib/remoteproc/remoteproc_virtio.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/rpmsg.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg/rpmsg.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/rpmsg_virtio.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg/rpmsg_virtio.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/shmem.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/shmem.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/sys.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/cortexm/sys.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/time.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/libmetal/lib/system/generic/time.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/virtio.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/open-amp/lib/virtio/virtio.c</locationURI>
</link>
<link>
<name>Middlewares/Third_Party/OpenAMP/virtqueue.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Middlewares/Third_Party/OpenAMP/open-amp/lib/virtio/virtqueue.c</locationURI>
</link>
<link>
<name>Core/Inc/Console/inc/Console.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/LibRTOSConsole/inc/Console.h</locationURI>
</link>
<link>
<name>Core/Inc/Stepper/conf/LibL6474Config.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/LibL6474/conf/LibL6474Config.h</locationURI>
</link>
<link>
<name>Core/Inc/Stepper/inc/LibL6474.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/LibL6474/inc/LibL6474.h</locationURI>
</link>
<link>
<name>Core/Src/Stepper/src/LibL6474x.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/LibL6474/src/LibL6474x.c</locationURI>
</link>
<link>
<name>Drivers/STM32H7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Drivers/STM32H7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/Common/mpu_wrappers.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/Common/mpu_wrappers.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/Common/mpu_wrappers_v2.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/Common/mpu_wrappers_v2.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM4F</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM7</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MSVC-MingW/port.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MSVC-MingW/port.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MSVC-MingW/portmacro.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MSVC-MingW/portmacro.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang/ReadMe.url</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MemMang/ReadMe.url</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang/heap_1.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MemMang/heap_1.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang/heap_2.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MemMang/heap_2.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang/heap_3.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MemMang/heap_3.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang/heap_4.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MemMang/heap_4.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/MemMang/heap_5.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/MemMang/heap_5.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM4F/portmacro.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM4F/portmacro.h</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM7/ReadMe.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM7/ReadMe.txt</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1/port.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1/port.c</locationURI>
</link>
<link>
<name>Middlewares/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1/portmacro.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/libs/FreeRTOS-LTS/202604.00/FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1/portmacro.h</locationURI>
</link>
</linkedResources>
</projectDescription>
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}}
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider-reference id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-864768909920134975" 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 &quot;${INPUTS}&quot;" 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.1660277473" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider-reference id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-864768909920134975" 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 &quot;${INPUTS}&quot;" 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,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
@@ -0,0 +1,4 @@
2F62501ED4689FB349E356AB974DBE57=D0CF62532CA6CA2614F74C6DE0AF97FD
8DF89ED150041C4CBC7CB9A9CAA90856=D0CF62532CA6CA2614F74C6DE0AF97FD
DC22A860405A8BF2F2C095E5B6529F12=7D1615E95F6C9AB913AD38D8A4D77383
eclipse.preferences.version=1
@@ -0,0 +1,18 @@
/*
* ConsoleConfig.h
*
* Created on: Dec 9, 2024
* Author: Thorsten
*/
#ifndef INC_CONSOLE_CONSOLECONFIG_H_
#define INC_CONSOLE_CONSOLECONFIG_H_
#define CONSOLE_USERNAME "STM32"
#define CONSOLE_USE_DYNAMIC_USERNAME 1
#define CONSOLE_LINE_HISTORY 8
#define CONSOLE_LINE_SIZE 120
#define CONSOLE_COMMAND_MAX_LENGTH 64
#define CONSOLE_HELP_MAX_LENGTH 512
#endif /* INC_CONSOLE_CONSOLECONFIG_H_ */
@@ -0,0 +1,141 @@
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
/*-----------------------------------------------------------
* Application specific definitions.
*
* These definitions should be adjusted for your particular hardware and
* application requirements.
*
* These parameters and more are described within the 'configuration' section of the
* FreeRTOS API documentation available on the FreeRTOS.org web site.
*
* See http://www.freertos.org/a00110.html
*----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* Section where include file can be added */
/* USER CODE END Includes */
/* Ensure definitions are only used by the compiler, and not by the assembler. */
#if defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__)
#include <stdint.h>
extern uint32_t SystemCoreClock;
/* USER CODE BEGIN 0 */
extern void configureTimerForRunTimeStats(void);
extern unsigned long getRunTimeCounterValue(void);
/* USER CODE END 0 */
#endif
#define configENABLE_FPU 1
#define configENABLE_MPU 0
#define configUSE_PREEMPTION 1
#define configSUPPORT_STATIC_ALLOCATION 0
#define configSUPPORT_DYNAMIC_ALLOCATION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( SystemCoreClock )
#define configTICK_RATE_HZ ((TickType_t)1000)
#define configMAX_PRIORITIES ( 7 )
#define configMINIMAL_STACK_SIZE ((uint16_t)1024)
#define configTOTAL_HEAP_SIZE ((size_t)0x20000)
#define configMAX_TASK_NAME_LEN ( 16 )
#define configQUEUE_REGISTRY_SIZE ( 32 )
#define configGENERATE_RUN_TIME_STATS 1
#define configUSE_TRACE_FACILITY 1
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
#define configUSE_16_BIT_TICKS 0
#define configUSE_MUTEXES 1
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
#define configTIMER_QUEUE_LENGTH 8
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 4 )
#define configCHECK_FOR_STACK_OVERFLOW 2
#define configUSE_RECURSIVE_MUTEXES 1
#define configUSE_MALLOC_FAILED_HOOK 1
#define configUSE_COUNTING_SEMAPHORES 1
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
/* USER CODE BEGIN MESSAGE_BUFFER_LENGTH_TYPE */
/* Defaults to size_t for backward compatibility, but can be changed
if lengths will always be less than the number of bytes in a size_t. */
#define configMESSAGE_BUFFER_LENGTH_TYPE size_t
/* USER CODE END MESSAGE_BUFFER_LENGTH_TYPE */
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* The following flag must be enabled only when using newlib */
#define configUSE_NEWLIB_REENTRANT 1
#define configCHECK_HANDLER_INSTALLATION 1
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
#define INCLUDE_xTaskGetSchedulerState 1
/* Cortex-M specific definitions. */
#ifdef __NVIC_PRIO_BITS
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
#define configPRIO_BITS __NVIC_PRIO_BITS
#else
#define configPRIO_BITS 4
#endif
/* The lowest interrupt priority that can be used in a call to a "set priority"
function. */
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15
/* The highest interrupt priority that can be used by any interrupt service
routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
PRIORITY THAN THIS! (higher priorities are lower numeric values. */
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
/* Interrupt priorities used by the kernel port layer itself. These are generic
to all Cortex-M ports, and do not rely on any particular library functions. */
#define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
/* Normal assert() semantics without relying on the provision of an assert.h
header file. */
/* USER CODE BEGIN 1 */
void vAssertCalled( const char * const pcFileName, unsigned long ulLine );
#define configASSERT( x ) if ((x) == 0) {taskDISABLE_INTERRUPTS(); vAssertCalled( __FILE__, __LINE__);}
/* USER CODE END 1 */
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
standard names. */
#define vPortSVCHandler SVC_Handler
#define xPortPendSVHandler PendSV_Handler
/* IMPORTANT: This define is commented when used with STM32Cube firmware, when the timebase source is SysTick,
to prevent overwriting SysTick_Handler defined within STM32Cube HAL */
//#define xPortSysTickHandler SysTick_Handler
/* USER CODE BEGIN 2 */
/* Definitions needed when configGENERATE_RUN_TIME_STATS is on */
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() //SetupRunTimeStatsTimer
#define portGET_RUN_TIME_COUNTER_VALUE() (xTaskGetTickCount())//GetHighFrequencyTickValue
#define configISR_STACK_SIZE_WORDS 4096
#define configUSE_NEWLIB_REENTRANT 1
/* USER CODE END 2 */
/* USER CODE BEGIN Defines */
#define configAPPLICATION_ALLOCATED_HEAP 1
#define configRECORD_STACK_HIGH_ADDRESS 1 /* 1: record stack high address for the debugger, 0: do not record stack high address */
/* Section where parameter definitions can be added (for instance, to override default ones in FreeRTOS.h) */
/* USER CODE END Defines */
#endif /* FREERTOS_CONFIG_H */
@@ -0,0 +1,101 @@
/*
* ipc_eth_producer.h
*
* Created on: 12.08.2026
* Author: Thorsten
*/
#ifndef INC_IPC_IPC_ETH_PRODUCER_H_
#define INC_IPC_IPC_ETH_PRODUCER_H_
//---------------------------------------------------------------------------------------------------------------------
#define IPC_PKT_HEADERLEN (20 )
#define IPC_PKT_CONTROL_TYPE (0xDEADBEEF )
#define IPC_PKT_MAXSIZE (RPMSG_BUFFER_SIZE-8*sizeof(void*)-IPC_PKT_HEADERLEN)
#define IPC_CTRLREMOTE_SPINDLE_START (0xA0 )
#define IPC_CTRLREMOTE_SPINDLE_STOP (0xA1 )
#define IPC_CTRLREMOTE_STEP_RESET (0xA2 )
#define IPC_CTRLREMOTE_STEP_REF (0xA3 )
#define IPC_CTRLREMOTE_STEP_ON (0xA4 )
#define IPC_CTRLREMOTE_STEP_OFF (0xA5 )
#define IPC_CTRLREMOTE_STEP_MOVE (0xA6 )
#define IPC_CTRLREMOTE_MAX_LENGTH (20 )
//---------------------------------------------------------------------------------------------------------------------
typedef struct ipc_eth_packet
//---------------------------------------------------------------------------------------------------------------------
{
unsigned int magic;
unsigned int type;
unsigned int length;
unsigned int seqID;
int result;
char payload[IPC_PKT_MAXSIZE];
} __attribute__((packed)) ipc_eth_packet_t;
//---------------------------------------------------------------------------------------------------------------------
typedef struct IPC_ETH_PRODUCER_Context *IPC_ETH_PRODUCER_Context_t;
//---------------------------------------------------------------------------------------------------------------------
typedef struct IPC_ETH_PRODUCER_Handle *IPC_ETH_PRODUCER_Handle_t;
struct IPC_ETH_PRODUCER_Handle
//---------------------------------------------------------------------------------------------------------------------
{
IPC_ETH_PRODUCER_Context_t priv;
struct
{
void* rxCtrlPriv;
void (*rxCtrlCallback)(IPC_ETH_PRODUCER_Handle_t, ipc_eth_packet_t*, void*);
void (*statusReqCallback)(IPC_ETH_PRODUCER_Handle_t, void*[3]);
void* statusReqPriv[3];
} callbacks;
};
/*!
* The IPC_ETH_PRODUCER_Init function is used to create the OpenAMP endpoints and to manage the IPC and protocol stuff to
* forward Ethernet packets to report current status of the system to a network application.
*
* The return value of IPC_ETH_PRODUCER_Init is a null pointer in case an error occured or a pointer of type IPC_ETH_PRODUCER_Handle_t.
*
* param endpoint is the endpoint name which has to fit the remote endpoint name exactly
*
* ATTENTION: This function is not locked or guarded and therefore its never thread safe when calling from two different threads
* at the same or nearly the same time while no instance has been created before! One pointer and its ressources could be lost
* which leads to a memory leak and/or to OpenAMP registration issues at runtime!
*/
IPC_ETH_PRODUCER_Handle_t IPC_ETH_PRODUCER_Init(const char *endpoint);
/*!
* The IPC_ETH_PRODUCER_GetIPAddress function is used to read back the current IP address of the system and can be used
* to determine whether a vital link is present or not
*
* The return value of IPC_ETH_PRODUCER_GetIPAddress is non-zero in case an error occured or 0 on success.
*
* param h is the handle of the IPC Controller which has been created before by calling IPC_ETH_PRODUCER_Init once
* param ipv4 is the current IPv4 address of the ETH-Stack on remote side and can be 0.0.0.0 = 0x00000000
* param subnet is the current subnet masks of the ETH-Stack on remote side and can be 0.0.0.0 = 0x00000000
*/
int IPC_ETH_PRODUCER_GetIPAddress(IPC_ETH_PRODUCER_Handle_t h, uint32_t *ipv4, uint32_t *subnet);
/*!
* The IPC_ETH_PRODUCER_SendPaket function is used to send data from the application to the remote network stack within the multi
* processor system. the size and a pointer to tthe raw buffer must be provided. The packet is encapsulated by an IP and UDP frame,
* The port and sender IP can not be changed and are managed by the remote network stack
*
* The return value of IPC_ETH_PRODUCER_GetIPAddress is non-zero in case an error occured or 0 on success.
*
* param h is the handle of the IPC Controller which has been created before by calling IPC_ETH_PRODUCER_Init once
* param buff is the raw data buffer pointer of the network packet
* param size is the number of bytes of the packet
*/
int IPC_ETH_PRODUCER_SendPaket(IPC_ETH_PRODUCER_Handle_t h, void* buff, int size);
#endif /* INC_IPC_IPC_ETH_PRODUCER_H_ */
Whitespace-only changes.
@@ -0,0 +1,16 @@
/*
* LibL6474Config.h
*
* Created on: Dec 2, 2024
* Author: Thorsten
*/
#ifndef INC_LIBL6474_CONFIG_H_
#define INC_LIBL6474_CONFIG_H_ INC_LIBL6474_CONFIG_H_
#define LIBL6474_STEP_ASYNC 0
#define LIBL6474_HAS_LOCKING 0
#define LIBL6474_DISABLE_OCD 0
#define LIBL6474_HAS_FLAG 0
#endif /* INC_LIBL6474_CONFIG_H_ */
@@ -0,0 +1,115 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_hal.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define SPINDLE_ENA_L_Pin GPIO_PIN_6
#define SPINDLE_ENA_L_GPIO_Port GPIOE
#define USR_BUTTON_Pin GPIO_PIN_13
#define USR_BUTTON_GPIO_Port GPIOC
#define SPINDLE_SI_R_Pin GPIO_PIN_0
#define SPINDLE_SI_R_GPIO_Port GPIOA
#define STEP_SPI_SCK_Pin GPIO_PIN_5
#define STEP_SPI_SCK_GPIO_Port GPIOA
#define STEP_SPI_MISO_Pin GPIO_PIN_6
#define STEP_SPI_MISO_GPIO_Port GPIOA
#define LED_GREEN_Pin GPIO_PIN_0
#define LED_GREEN_GPIO_Port GPIOB
#define SPINDLE_ENA_R_Pin GPIO_PIN_15
#define SPINDLE_ENA_R_GPIO_Port GPIOE
#define SPINDLE_PWM_L_Pin GPIO_PIN_10
#define SPINDLE_PWM_L_GPIO_Port GPIOB
#define SPINDLE_PWM_R_Pin GPIO_PIN_11
#define SPINDLE_PWM_R_GPIO_Port GPIOB
#define LED_RED_Pin GPIO_PIN_14
#define LED_RED_GPIO_Port GPIOB
#define DEBUG_UART_TX_Pin GPIO_PIN_8
#define DEBUG_UART_TX_GPIO_Port GPIOD
#define DEBUG_UART_RX_Pin GPIO_PIN_9
#define DEBUG_UART_RX_GPIO_Port GPIOD
#define STEP_SPI_CS_Pin GPIO_PIN_14
#define STEP_SPI_CS_GPIO_Port GPIOD
#define STEP_PULSE_Pin GPIO_PIN_15
#define STEP_PULSE_GPIO_Port GPIOD
#define STEP_RSTN_Pin GPIO_PIN_9
#define STEP_RSTN_GPIO_Port GPIOG
#define STEP_DIR_Pin GPIO_PIN_12
#define STEP_DIR_GPIO_Port GPIOG
#define STEP_FLAG_Pin GPIO_PIN_14
#define STEP_FLAG_GPIO_Port GPIOG
#define STEP_SPI_MOSI_Pin GPIO_PIN_5
#define STEP_SPI_MOSI_GPIO_Port GPIOB
#define REFERENCE_MARK_Pin GPIO_PIN_8
#define REFERENCE_MARK_GPIO_Port GPIOB
#define LIMIT_SWITCH_Pin GPIO_PIN_9
#define LIMIT_SWITCH_GPIO_Port GPIOB
#define SPINDLE_SI_L_Pin GPIO_PIN_0
#define SPINDLE_SI_L_GPIO_Port GPIOE
#define LED_YELLOW_Pin GPIO_PIN_1
#define LED_YELLOW_GPIO_Port GPIOE
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */
@@ -0,0 +1,514 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32h7xx_hal_conf.h
* @author MCD Application Team
* @brief HAL configuration file.
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef STM32H7xx_HAL_CONF_H
#define STM32H7xx_HAL_CONF_H
#ifdef __cplusplus
extern "C" {
#endif
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* ########################## Module Selection ############################## */
/**
* @brief This is the list of modules to be used in the HAL driver
*/
#define HAL_MODULE_ENABLED
/* #define HAL_ADC_MODULE_ENABLED */
/* #define HAL_FDCAN_MODULE_ENABLED */
/* #define HAL_FMAC_MODULE_ENABLED */
/* #define HAL_CEC_MODULE_ENABLED */
/* #define HAL_COMP_MODULE_ENABLED */
/* #define HAL_CORDIC_MODULE_ENABLED */
/* #define HAL_CRC_MODULE_ENABLED */
/* #define HAL_CRYP_MODULE_ENABLED */
/* #define HAL_DAC_MODULE_ENABLED */
/* #define HAL_DCMI_MODULE_ENABLED */
/* #define HAL_DMA2D_MODULE_ENABLED */
/* #define HAL_ETH_MODULE_ENABLED */
/* #define HAL_ETH_LEGACY_MODULE_ENABLED */
/* #define HAL_NAND_MODULE_ENABLED */
/* #define HAL_NOR_MODULE_ENABLED */
/* #define HAL_OTFDEC_MODULE_ENABLED */
/* #define HAL_SRAM_MODULE_ENABLED */
/* #define HAL_SDRAM_MODULE_ENABLED */
/* #define HAL_HASH_MODULE_ENABLED */
/* #define HAL_HRTIM_MODULE_ENABLED */
/* #define HAL_HSEM_MODULE_ENABLED */
/* #define HAL_GFXMMU_MODULE_ENABLED */
/* #define HAL_JPEG_MODULE_ENABLED */
/* #define HAL_OPAMP_MODULE_ENABLED */
/* #define HAL_OSPI_MODULE_ENABLED */
/* #define HAL_I2S_MODULE_ENABLED */
/* #define HAL_SMBUS_MODULE_ENABLED */
/* #define HAL_IWDG_MODULE_ENABLED */
/* #define HAL_LPTIM_MODULE_ENABLED */
/* #define HAL_LTDC_MODULE_ENABLED */
/* #define HAL_QSPI_MODULE_ENABLED */
/* #define HAL_RAMECC_MODULE_ENABLED */
/* #define HAL_RNG_MODULE_ENABLED */
/* #define HAL_RTC_MODULE_ENABLED */
/* #define HAL_SAI_MODULE_ENABLED */
/* #define HAL_SD_MODULE_ENABLED */
/* #define HAL_MMC_MODULE_ENABLED */
/* #define HAL_SPDIFRX_MODULE_ENABLED */
#define HAL_SPI_MODULE_ENABLED
/* #define HAL_SWPMI_MODULE_ENABLED */
#define HAL_TIM_MODULE_ENABLED
#define HAL_UART_MODULE_ENABLED
/* #define HAL_USART_MODULE_ENABLED */
/* #define HAL_IRDA_MODULE_ENABLED */
/* #define HAL_SMARTCARD_MODULE_ENABLED */
/* #define HAL_WWDG_MODULE_ENABLED */
/* #define HAL_PCD_MODULE_ENABLED */
/* #define HAL_HCD_MODULE_ENABLED */
/* #define HAL_DFSDM_MODULE_ENABLED */
/* #define HAL_DSI_MODULE_ENABLED */
/* #define HAL_JPEG_MODULE_ENABLED */
/* #define HAL_MDIOS_MODULE_ENABLED */
/* #define HAL_PSSI_MODULE_ENABLED */
/* #define HAL_DTS_MODULE_ENABLED */
#define HAL_GPIO_MODULE_ENABLED
#define HAL_DMA_MODULE_ENABLED
#define HAL_MDMA_MODULE_ENABLED
#define HAL_RCC_MODULE_ENABLED
#define HAL_FLASH_MODULE_ENABLED
#define HAL_EXTI_MODULE_ENABLED
#define HAL_PWR_MODULE_ENABLED
#define HAL_I2C_MODULE_ENABLED
#define HAL_CORTEX_MODULE_ENABLED
#define HAL_HSEM_MODULE_ENABLED
/* ########################## Oscillator Values adaptation ####################*/
/**
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
* This value is used by the RCC HAL module to compute the system frequency
* (when HSE is used as system clock source, directly or through the PLL).
*/
#if !defined (HSE_VALUE)
#define HSE_VALUE (8000000UL) /*!< Value of the External oscillator in Hz : FPGA case fixed to 60MHZ */
#endif /* HSE_VALUE */
#if !defined (HSE_STARTUP_TIMEOUT)
#define HSE_STARTUP_TIMEOUT (100UL) /*!< Time out for HSE start up, in ms */
#endif /* HSE_STARTUP_TIMEOUT */
/**
* @brief Internal oscillator (CSI) default value.
* This value is the default CSI value after Reset.
*/
#if !defined (CSI_VALUE)
#define CSI_VALUE (4000000UL) /*!< Value of the Internal oscillator in Hz*/
#endif /* CSI_VALUE */
/**
* @brief Internal High Speed oscillator (HSI) value.
* This value is used by the RCC HAL module to compute the system frequency
* (when HSI is used as system clock source, directly or through the PLL).
*/
#if !defined (HSI_VALUE)
#define HSI_VALUE (64000000UL) /*!< Value of the Internal oscillator in Hz*/
#endif /* HSI_VALUE */
/**
* @brief External Low Speed oscillator (LSE) value.
* This value is used by the UART, RTC HAL module to compute the system frequency
*/
#if !defined (LSE_VALUE)
#define LSE_VALUE (32768UL) /*!< Value of the External oscillator in Hz*/
#endif /* LSE_VALUE */
#if !defined (LSE_STARTUP_TIMEOUT)
#define LSE_STARTUP_TIMEOUT (5000UL) /*!< Time out for LSE start up, in ms */
#endif /* LSE_STARTUP_TIMEOUT */
#if !defined (LSI_VALUE)
#define LSI_VALUE (32000UL) /*!< LSI Typical Value in Hz*/
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
The real value may vary depending on the variations
in voltage and temperature.*/
/**
* @brief External clock source for I2S peripheral
* This value is used by the I2S HAL module to compute the I2S clock source
* frequency, this source is inserted directly through I2S_CKIN pad.
*/
#if !defined (EXTERNAL_CLOCK_VALUE)
#define EXTERNAL_CLOCK_VALUE 12288000UL /*!< Value of the External clock in Hz*/
#endif /* EXTERNAL_CLOCK_VALUE */
/* Tip: To avoid modifying this file each time you need to use different HSE,
=== you can define the HSE value in your toolchain compiler preprocessor. */
/* ########################### System Configuration ######################### */
/**
* @brief This is the HAL system configuration section
*/
#define VDD_VALUE (3300UL) /*!< Value of VDD in mv */
#define TICK_INT_PRIORITY (15UL) /*!< tick interrupt priority */
#define USE_RTOS 0
#define USE_SD_TRANSCEIVER 0U /*!< use uSD Transceiver */
#define USE_SPI_CRC 0U /*!< use CRC in SPI */
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
#define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */
#define USE_HAL_CORDIC_REGISTER_CALLBACKS 0U /* CORDIC register callback disabled */
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */
#define USE_HAL_DTS_REGISTER_CALLBACKS 0U /* DTS register callback disabled */
#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
#define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U /* FDCAN register callback disabled */
#define USE_HAL_FMAC_REGISTER_CALLBACKS 0U /* FMAC register callback disabled */
#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */
#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */
#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */
#define USE_HAL_GFXMMU_REGISTER_CALLBACKS 0U /* GFXMMU register callback disabled */
#define USE_HAL_HRTIM_REGISTER_CALLBACKS 0U /* HRTIM register callback disabled */
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U /* JPEG register callback disabled */
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */
#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U /* MDIO register callback disabled */
#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */
#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U /* MDIO register callback disabled */
#define USE_HAL_OSPI_REGISTER_CALLBACKS 0U /* OSPI register callback disabled */
#define USE_HAL_OTFDEC_REGISTER_CALLBACKS 0U /* OTFDEC register callback disabled */
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */
#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U /* SWPMI register callback disabled */
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
/* ########################### Ethernet Configuration ######################### */
#define ETH_TX_DESC_CNT 4U /* number of Ethernet Tx DMA descriptors */
#define ETH_RX_DESC_CNT 4U /* number of Ethernet Rx DMA descriptors */
#define ETH_MAC_ADDR0 (0x02UL)
#define ETH_MAC_ADDR1 (0x00UL)
#define ETH_MAC_ADDR2 (0x00UL)
#define ETH_MAC_ADDR3 (0x00UL)
#define ETH_MAC_ADDR4 (0x00UL)
#define ETH_MAC_ADDR5 (0x00UL)
/* ########################## Assert Selection ############################## */
/**
* @brief Uncomment the line below to expanse the "assert_param" macro in the
* HAL drivers code
*/
/* #define USE_FULL_ASSERT 1U */
/* Includes ------------------------------------------------------------------*/
/**
* @brief Include module's header file
*/
#ifdef HAL_RCC_MODULE_ENABLED
#include "stm32h7xx_hal_rcc.h"
#endif /* HAL_RCC_MODULE_ENABLED */
#ifdef HAL_GPIO_MODULE_ENABLED
#include "stm32h7xx_hal_gpio.h"
#endif /* HAL_GPIO_MODULE_ENABLED */
#ifdef HAL_DMA_MODULE_ENABLED
#include "stm32h7xx_hal_dma.h"
#endif /* HAL_DMA_MODULE_ENABLED */
#ifdef HAL_MDMA_MODULE_ENABLED
#include "stm32h7xx_hal_mdma.h"
#endif /* HAL_MDMA_MODULE_ENABLED */
#ifdef HAL_HASH_MODULE_ENABLED
#include "stm32h7xx_hal_hash.h"
#endif /* HAL_HASH_MODULE_ENABLED */
#ifdef HAL_DCMI_MODULE_ENABLED
#include "stm32h7xx_hal_dcmi.h"
#endif /* HAL_DCMI_MODULE_ENABLED */
#ifdef HAL_DMA2D_MODULE_ENABLED
#include "stm32h7xx_hal_dma2d.h"
#endif /* HAL_DMA2D_MODULE_ENABLED */
#ifdef HAL_DSI_MODULE_ENABLED
#include "stm32h7xx_hal_dsi.h"
#endif /* HAL_DSI_MODULE_ENABLED */
#ifdef HAL_DFSDM_MODULE_ENABLED
#include "stm32h7xx_hal_dfsdm.h"
#endif /* HAL_DFSDM_MODULE_ENABLED */
#ifdef HAL_DTS_MODULE_ENABLED
#include "stm32h7xx_hal_dts.h"
#endif /* HAL_DTS_MODULE_ENABLED */
#ifdef HAL_ETH_MODULE_ENABLED
#include "stm32h7xx_hal_eth.h"
#endif /* HAL_ETH_MODULE_ENABLED */
#ifdef HAL_ETH_LEGACY_MODULE_ENABLED
#include "stm32h7xx_hal_eth_legacy.h"
#endif /* HAL_ETH_LEGACY_MODULE_ENABLED */
#ifdef HAL_EXTI_MODULE_ENABLED
#include "stm32h7xx_hal_exti.h"
#endif /* HAL_EXTI_MODULE_ENABLED */
#ifdef HAL_CORTEX_MODULE_ENABLED
#include "stm32h7xx_hal_cortex.h"
#endif /* HAL_CORTEX_MODULE_ENABLED */
#ifdef HAL_ADC_MODULE_ENABLED
#include "stm32h7xx_hal_adc.h"
#endif /* HAL_ADC_MODULE_ENABLED */
#ifdef HAL_FDCAN_MODULE_ENABLED
#include "stm32h7xx_hal_fdcan.h"
#endif /* HAL_FDCAN_MODULE_ENABLED */
#ifdef HAL_CEC_MODULE_ENABLED
#include "stm32h7xx_hal_cec.h"
#endif /* HAL_CEC_MODULE_ENABLED */
#ifdef HAL_COMP_MODULE_ENABLED
#include "stm32h7xx_hal_comp.h"
#endif /* HAL_COMP_MODULE_ENABLED */
#ifdef HAL_CORDIC_MODULE_ENABLED
#include "stm32h7xx_hal_cordic.h"
#endif /* HAL_CORDIC_MODULE_ENABLED */
#ifdef HAL_CRC_MODULE_ENABLED
#include "stm32h7xx_hal_crc.h"
#endif /* HAL_CRC_MODULE_ENABLED */
#ifdef HAL_CRYP_MODULE_ENABLED
#include "stm32h7xx_hal_cryp.h"
#endif /* HAL_CRYP_MODULE_ENABLED */
#ifdef HAL_DAC_MODULE_ENABLED
#include "stm32h7xx_hal_dac.h"
#endif /* HAL_DAC_MODULE_ENABLED */
#ifdef HAL_FLASH_MODULE_ENABLED
#include "stm32h7xx_hal_flash.h"
#endif /* HAL_FLASH_MODULE_ENABLED */
#ifdef HAL_GFXMMU_MODULE_ENABLED
#include "stm32h7xx_hal_gfxmmu.h"
#endif /* HAL_GFXMMU_MODULE_ENABLED */
#ifdef HAL_FMAC_MODULE_ENABLED
#include "stm32h7xx_hal_fmac.h"
#endif /* HAL_FMAC_MODULE_ENABLED */
#ifdef HAL_HRTIM_MODULE_ENABLED
#include "stm32h7xx_hal_hrtim.h"
#endif /* HAL_HRTIM_MODULE_ENABLED */
#ifdef HAL_HSEM_MODULE_ENABLED
#include "stm32h7xx_hal_hsem.h"
#endif /* HAL_HSEM_MODULE_ENABLED */
#ifdef HAL_SRAM_MODULE_ENABLED
#include "stm32h7xx_hal_sram.h"
#endif /* HAL_SRAM_MODULE_ENABLED */
#ifdef HAL_NOR_MODULE_ENABLED
#include "stm32h7xx_hal_nor.h"
#endif /* HAL_NOR_MODULE_ENABLED */
#ifdef HAL_NAND_MODULE_ENABLED
#include "stm32h7xx_hal_nand.h"
#endif /* HAL_NAND_MODULE_ENABLED */
#ifdef HAL_I2C_MODULE_ENABLED
#include "stm32h7xx_hal_i2c.h"
#endif /* HAL_I2C_MODULE_ENABLED */
#ifdef HAL_I2S_MODULE_ENABLED
#include "stm32h7xx_hal_i2s.h"
#endif /* HAL_I2S_MODULE_ENABLED */
#ifdef HAL_IWDG_MODULE_ENABLED
#include "stm32h7xx_hal_iwdg.h"
#endif /* HAL_IWDG_MODULE_ENABLED */
#ifdef HAL_JPEG_MODULE_ENABLED
#include "stm32h7xx_hal_jpeg.h"
#endif /* HAL_JPEG_MODULE_ENABLED */
#ifdef HAL_MDIOS_MODULE_ENABLED
#include "stm32h7xx_hal_mdios.h"
#endif /* HAL_MDIOS_MODULE_ENABLED */
#ifdef HAL_MMC_MODULE_ENABLED
#include "stm32h7xx_hal_mmc.h"
#endif /* HAL_MMC_MODULE_ENABLED */
#ifdef HAL_LPTIM_MODULE_ENABLED
#include "stm32h7xx_hal_lptim.h"
#endif /* HAL_LPTIM_MODULE_ENABLED */
#ifdef HAL_LTDC_MODULE_ENABLED
#include "stm32h7xx_hal_ltdc.h"
#endif /* HAL_LTDC_MODULE_ENABLED */
#ifdef HAL_OPAMP_MODULE_ENABLED
#include "stm32h7xx_hal_opamp.h"
#endif /* HAL_OPAMP_MODULE_ENABLED */
#ifdef HAL_OSPI_MODULE_ENABLED
#include "stm32h7xx_hal_ospi.h"
#endif /* HAL_OSPI_MODULE_ENABLED */
#ifdef HAL_OTFDEC_MODULE_ENABLED
#include "stm32h7xx_hal_otfdec.h"
#endif /* HAL_OTFDEC_MODULE_ENABLED */
#ifdef HAL_PSSI_MODULE_ENABLED
#include "stm32h7xx_hal_pssi.h"
#endif /* HAL_PSSI_MODULE_ENABLED */
#ifdef HAL_PWR_MODULE_ENABLED
#include "stm32h7xx_hal_pwr.h"
#endif /* HAL_PWR_MODULE_ENABLED */
#ifdef HAL_QSPI_MODULE_ENABLED
#include "stm32h7xx_hal_qspi.h"
#endif /* HAL_QSPI_MODULE_ENABLED */
#ifdef HAL_RAMECC_MODULE_ENABLED
#include "stm32h7xx_hal_ramecc.h"
#endif /* HAL_RAMECC_MODULE_ENABLED */
#ifdef HAL_RNG_MODULE_ENABLED
#include "stm32h7xx_hal_rng.h"
#endif /* HAL_RNG_MODULE_ENABLED */
#ifdef HAL_RTC_MODULE_ENABLED
#include "stm32h7xx_hal_rtc.h"
#endif /* HAL_RTC_MODULE_ENABLED */
#ifdef HAL_SAI_MODULE_ENABLED
#include "stm32h7xx_hal_sai.h"
#endif /* HAL_SAI_MODULE_ENABLED */
#ifdef HAL_SD_MODULE_ENABLED
#include "stm32h7xx_hal_sd.h"
#endif /* HAL_SD_MODULE_ENABLED */
#ifdef HAL_SDRAM_MODULE_ENABLED
#include "stm32h7xx_hal_sdram.h"
#endif /* HAL_SDRAM_MODULE_ENABLED */
#ifdef HAL_SPI_MODULE_ENABLED
#include "stm32h7xx_hal_spi.h"
#endif /* HAL_SPI_MODULE_ENABLED */
#ifdef HAL_SPDIFRX_MODULE_ENABLED
#include "stm32h7xx_hal_spdifrx.h"
#endif /* HAL_SPDIFRX_MODULE_ENABLED */
#ifdef HAL_SWPMI_MODULE_ENABLED
#include "stm32h7xx_hal_swpmi.h"
#endif /* HAL_SWPMI_MODULE_ENABLED */
#ifdef HAL_TIM_MODULE_ENABLED
#include "stm32h7xx_hal_tim.h"
#endif /* HAL_TIM_MODULE_ENABLED */
#ifdef HAL_UART_MODULE_ENABLED
#include "stm32h7xx_hal_uart.h"
#endif /* HAL_UART_MODULE_ENABLED */
#ifdef HAL_USART_MODULE_ENABLED
#include "stm32h7xx_hal_usart.h"
#endif /* HAL_USART_MODULE_ENABLED */
#ifdef HAL_IRDA_MODULE_ENABLED
#include "stm32h7xx_hal_irda.h"
#endif /* HAL_IRDA_MODULE_ENABLED */
#ifdef HAL_SMARTCARD_MODULE_ENABLED
#include "stm32h7xx_hal_smartcard.h"
#endif /* HAL_SMARTCARD_MODULE_ENABLED */
#ifdef HAL_SMBUS_MODULE_ENABLED
#include "stm32h7xx_hal_smbus.h"
#endif /* HAL_SMBUS_MODULE_ENABLED */
#ifdef HAL_WWDG_MODULE_ENABLED
#include "stm32h7xx_hal_wwdg.h"
#endif /* HAL_WWDG_MODULE_ENABLED */
#ifdef HAL_PCD_MODULE_ENABLED
#include "stm32h7xx_hal_pcd.h"
#endif /* HAL_PCD_MODULE_ENABLED */
#ifdef HAL_HCD_MODULE_ENABLED
#include "stm32h7xx_hal_hcd.h"
#endif /* HAL_HCD_MODULE_ENABLED */
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
/**
* @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function
* which reports the name of the source file and the source
* line number of the call that failed.
* If expr is true, it returns no value.
* @retval None
*/
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
void assert_failed(uint8_t *file, uint32_t line);
#else
#define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */
#ifdef __cplusplus
}
#endif
#endif /* STM32H7xx_HAL_CONF_H */
@@ -0,0 +1,69 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32h7xx_it.h
* @brief This file contains the headers of the interrupt handlers.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32H7xx_IT_H
#define __STM32H7xx_IT_H
#ifdef __cplusplus
extern "C" {
#endif
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
void NMI_Handler(void);
void HardFault_Handler(void);
void MemManage_Handler(void);
void BusFault_Handler(void);
void UsageFault_Handler(void);
void SVC_Handler(void);
void DebugMon_Handler(void);
void PendSV_Handler(void);
void SysTick_Handler(void);
void USART3_IRQHandler(void);
void CM4_SEV_IRQHandler(void);
void HSEM1_IRQHandler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
#ifdef __cplusplus
}
#endif
#endif /* __STM32H7xx_IT_H */
@@ -0,0 +1 @@
used for symbolic linking or referencing from within IDEs, VSCode project is based on Makefiles and therefore this folder is not needed. It is more for CubeIDE Project structure!
@@ -0,0 +1,384 @@
/*
* ipc_eth_consumer.c
*
* Created on: 11.08.2026
* Author: Thorsten
*/
//---------------------------------------------------------------------------------------------------------------------
#include "main.h"
#include "openamp.h"
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "stdio.h"
#include "assert.h"
#include "message_buffer.h"
//---------------------------------------------------------------------------------------------------------------------
#include "IPC/ipc_eth_producer.h"
//---------------------------------------------------------------------------------------------------------------------
#define IPC_PKT_HEADERLEN (20 )
#define IPC_PKT_ETHERNET_TYPE (0xDEADC0DE )
#define IPC_PKT_DISCOVERY_TYPE (0xDEADDA7A )
#define IPC_CTRL_TYPE_GETPENDING (0x80 )
#define IPC_CTRL_TYPE_GETIPADDR (0xF0 )
#define IPC_CTRL_TYPE_GETSUBNET (0xF1 )
//---------------------------------------------------------------------------------------------------------------------
static ipc_eth_packet_t heartbeatPayload = {
//---------------------------------------------------------------------------------------------------------------------
.magic = IPC_PKT_DISCOVERY_TYPE,
.type = 0,
.length = 37,
.result = 0,
.seqID = 0,
.payload = "Hello from STM32H755ZI-Q on ARM CM7!"
};
//---------------------------------------------------------------------------------------------------------------------
struct IPC_ETH_PRODUCER_Context
//---------------------------------------------------------------------------------------------------------------------
{
struct rpmsg_endpoint rp_endpoint;
MessageBufferHandle_t mbufH;
TaskHandle_t taskH;
QueueHandle_t reqQH;
int running;
uint8_t tmp[(((IPC_PKT_MAXSIZE+sizeof(void*)-1)/sizeof(void*))*sizeof(void*))];
char payload[IPC_PKT_MAXSIZE+4*sizeof(void*)];
uint32_t ipaddr;
uint32_t bcast;
uint32_t subnet;
};
//---------------------------------------------------------------------------------------------------------------------
static ipc_eth_packet_t getIPAddress = {
//---------------------------------------------------------------------------------------------------------------------
.magic = IPC_PKT_CONTROL_TYPE,
.type = IPC_CTRL_TYPE_GETIPADDR,
.length = 0,
.result = 0,
.seqID = 0,
};
//---------------------------------------------------------------------------------------------------------------------
static ipc_eth_packet_t ethernetPkt = {
//---------------------------------------------------------------------------------------------------------------------
.magic = IPC_PKT_ETHERNET_TYPE,
.type = 0,
.length = 0,
.result = 0,
.seqID = 0,
};
//---------------------------------------------------------------------------------------------------------------------
static IPC_ETH_PRODUCER_Handle_t singleton_h;
//---------------------------------------------------------------------------------------------------------------------
static int ipc_eth_ProducerRpMsgRxCallback(struct rpmsg_endpoint *ept, void *data, size_t len, uint32_t src, void *priv)
//---------------------------------------------------------------------------------------------------------------------
{
(void)ept;
(void)src;
if(!priv)
return 0;
size_t alignedLen = (((len+sizeof(void*)-1)/sizeof(void*))*sizeof(void*));
IPC_ETH_PRODUCER_Handle_t h = (IPC_ETH_PRODUCER_Handle_t)priv;
if ( alignedLen >= sizeof(h->priv->tmp))
return 0;
// this is an additional copy step as it would be when just using the message buffer.
// its a worse idea at all but this helps overcoming an MPU region configuration, which
// requires us to handle addresses aligned when accessing the shared D3 SRAM. other way
// around would be to disable the MPU for the shared D3 region but i want to practice it
// in the correct way as non buffered, non cached and shared region config which requires
// us to handle it in aligned accesses at all. the message buffer has internal mechanism,
// where this handling is not guaranteed at buffer turn around conditions...
for( size_t i = 0; i < alignedLen/4; i++ ) {
((uint32_t*)h->priv->tmp)[i] = ((uint32_t*)(data))[i];
}
xMessageBufferSend(h->priv->mbufH, h->priv->tmp, len, 0);
return 0;
}
//---------------------------------------------------------------------------------------------------------------------
static void ipc_eth_ProducerRpMsgUnbindCallback(struct rpmsg_endpoint *ept)
//---------------------------------------------------------------------------------------------------------------------
{
if(ept->priv)
{
IPC_ETH_PRODUCER_Handle_t h = (IPC_ETH_PRODUCER_Handle_t)ept->priv;
h->priv->running = 0;
}
}
//---------------------------------------------------------------------------------------------------------------------
static void ipc_eth_ProducerRpMsgNewEndpoint(struct rpmsg_device *rdev, const char *name, uint32_t dest)
//---------------------------------------------------------------------------------------------------------------------
{
(void)rdev;
OPENAMP_create_endpoint(&singleton_h->priv->rp_endpoint, name, dest,
ipc_eth_ProducerRpMsgRxCallback, ipc_eth_ProducerRpMsgUnbindCallback);
}
//---------------------------------------------------------------------------------------------------------------------
static void ipc_eth_ProducerTaskFunction( void * arg )
//---------------------------------------------------------------------------------------------------------------------
{
if(!arg)
vTaskDelete(NULL);
IPC_ETH_PRODUCER_Handle_t h = (IPC_ETH_PRODUCER_Handle_t)arg;
size_t bLen = 0;
unsigned int currentPending = 0;
unsigned int rounds = 0;
unsigned int currentSeqID = 0;
__HAL_RCC_HSEM_CLK_ENABLE();
/*Take HSEM */
HAL_HSEM_FastTake(0U);
/*Release HSEM in order to notify the CPU2(CM4)*/
HAL_HSEM_Release(0U,0);
/* wait until CPU2 wakes up from stop mode */
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) == RESET)) {
vTaskDelay(pdMS_TO_TICKS(1));
};
if (!h)
goto error;
if (!h->priv)
goto error;
OPENAMP_Wait_EndPointready(&h->priv->rp_endpoint);
// give the network stack i bit of time before starting all the troubles
vTaskDelay(pdMS_TO_TICKS(6000));
while(h->priv->running) {
vTaskDelay(pdMS_TO_TICKS(1));
OPENAMP_check_for_message();
if ( (bLen = xMessageBufferReceive(h->priv->mbufH, h->priv->payload, sizeof(h->priv->payload), pdMS_TO_TICKS(0))) >= IPC_PKT_HEADERLEN) {
if (currentPending > 0 )
currentPending -= 1;
ipc_eth_packet_t *req = (ipc_eth_packet_t *)h->priv->payload;
if (req->length <= (bLen - IPC_PKT_HEADERLEN)) {
if (req->magic == IPC_PKT_CONTROL_TYPE && req->result == 0 && req->type == IPC_CTRL_TYPE_GETIPADDR) {
memcpy(&h->priv->ipaddr, req->payload, sizeof(h->priv->ipaddr));
}
else if (req->magic == IPC_PKT_CONTROL_TYPE && req->result != 0 && req->type == IPC_CTRL_TYPE_GETIPADDR) {
// in case IP address read was not valid, we will set Subnet and IP address back. this is used to indicate
// missing connection or non functional stack on remote processor
h->priv->subnet = 0;
h->priv->ipaddr = 0;
}
else if (req->magic == IPC_PKT_CONTROL_TYPE && req->result == 0 && req->type == IPC_CTRL_TYPE_GETSUBNET) {
memcpy(&h->priv->subnet, req->payload, sizeof(h->priv->subnet));
}
else if (req->magic == IPC_PKT_CONTROL_TYPE && req->result == 0 && req->type == IPC_CTRL_TYPE_GETPENDING &&
h->callbacks.rxCtrlCallback != NULL) {
int numRequests = req->length / (IPC_PKT_HEADERLEN + IPC_CTRLREMOTE_MAX_LENGTH);
int index = 0;
while(numRequests > 0) {
ipc_eth_packet_t *sreq = (ipc_eth_packet_t *)&req->payload[index * (IPC_PKT_HEADERLEN + IPC_CTRLREMOTE_MAX_LENGTH)];
if (sreq->magic == IPC_PKT_CONTROL_TYPE && sreq->result == 0 && sreq->type >= IPC_CTRLREMOTE_SPINDLE_START &&
sreq->type <= IPC_CTRLREMOTE_STEP_MOVE) {
h->callbacks.rxCtrlCallback(h, sreq, h->callbacks.rxCtrlPriv);
}
numRequests-=1;
index+=1;
}
}
}
}
OPENAMP_check_for_message();
//TODO: don't know why but when more messages are pending, everything is destroyed and
// ends up in hard faults caused by virtio structures and addresses
// outside the shared mem region
if(currentPending < 2) {
if (xQueueReceive(h->priv->reqQH, &ethernetPkt, 0) == pdPASS) {
ethernetPkt.type = 0;
ethernetPkt.magic = IPC_PKT_ETHERNET_TYPE;
if ( OPENAMP_send(&h->priv->rp_endpoint, &ethernetPkt, sizeof(ethernetPkt)) == 0 )
currentPending += 1;
currentSeqID += 1;
}
else if (rounds % 7 == 0) {
getIPAddress.type = IPC_CTRL_TYPE_GETPENDING;
getIPAddress.seqID = currentSeqID;
if( OPENAMP_send(&h->priv->rp_endpoint, &getIPAddress, sizeof(getIPAddress)) == 0 )
currentPending += 1;
currentSeqID += 1;
}
if (rounds % 1000 == 0) {
heartbeatPayload.seqID = currentSeqID;
if ( OPENAMP_send(&h->priv->rp_endpoint, &heartbeatPayload, sizeof(heartbeatPayload)) == 0 )
currentPending += 1;
currentSeqID += 1;
if ( h->callbacks.statusReqCallback != NULL ) {
h->callbacks.statusReqCallback(h, h->callbacks.statusReqPriv);
}
}
else if (rounds % 100 == 5) {
if ( h->callbacks.statusReqCallback != NULL ) {
h->callbacks.statusReqCallback(h, h->callbacks.statusReqPriv);
}
}
else if (rounds % 1000 == 1) {
getIPAddress.type = IPC_CTRL_TYPE_GETIPADDR;
getIPAddress.seqID = currentSeqID;
if ( OPENAMP_send(&h->priv->rp_endpoint, &getIPAddress, sizeof(getIPAddress)) == 0)
currentPending += 1;
currentSeqID += 1;
}
else if (rounds % 1000 == 2) {
getIPAddress.type = IPC_CTRL_TYPE_GETSUBNET;
getIPAddress.seqID = currentSeqID;
if ( OPENAMP_send(&h->priv->rp_endpoint, &getIPAddress, sizeof(getIPAddress)) == 0 )
currentPending += 1;
currentSeqID += 1;
}
rounds += 1;
}
OPENAMP_check_for_message();
}
error:
OPENAMP_DeInit();
vTaskDelete(NULL);
}
//---------------------------------------------------------------------------------------------------------------------
int IPC_ETH_PRODUCER_SendPaket(IPC_ETH_PRODUCER_Handle_t h, void* buff, int size)
//---------------------------------------------------------------------------------------------------------------------
{
if ( h == NULL || buff == NULL || size <= 0 )
return -1;
if ( h->priv == NULL || h->priv->reqQH == NULL )
return -1;
ipc_eth_packet_t pkt = {
.length = size,
.magic = IPC_PKT_ETHERNET_TYPE,
.seqID = 0,
.type = 0,
.result = 0,
};
if(size > sizeof(pkt.payload))
return -1;
memcpy(pkt.payload, buff, size);
return -(xQueueSend(h->priv->reqQH, &pkt, 0) == pdFALSE);
}
//---------------------------------------------------------------------------------------------------------------------
int IPC_ETH_PRODUCER_GetIPAddress(IPC_ETH_PRODUCER_Handle_t h, uint32_t *ipv4, uint32_t *subnet)
//---------------------------------------------------------------------------------------------------------------------
{
if (h == NULL)
return 0;
if (h->priv->ipaddr == 0)
return 0;
if(ipv4)
*ipv4 = h->priv->ipaddr;
if(subnet)
*subnet = h->priv->subnet;
return 1;
}
//---------------------------------------------------------------------------------------------------------------------
IPC_ETH_PRODUCER_Handle_t IPC_ETH_PRODUCER_Init(const char *endpoint)
//---------------------------------------------------------------------------------------------------------------------
{
IPC_ETH_PRODUCER_Handle_t h = NULL;
int OpenAmpInit = 0;
if(!endpoint)
goto error;
if(endpoint[0] == '\0')
goto error;
if (MAILBOX_Init())
goto error;
if(!(h = (IPC_ETH_PRODUCER_Handle_t)calloc(1, sizeof(struct IPC_ETH_PRODUCER_Handle))))
goto error;
h->priv = (IPC_ETH_PRODUCER_Context_t)calloc(1, sizeof(struct IPC_ETH_PRODUCER_Context));
if(!h->priv)
goto error;
rpmsg_init_ept(&h->priv->rp_endpoint, endpoint, RPMSG_ADDR_ANY, RPMSG_ADDR_ANY, NULL, NULL);
// set this instance as private data
h->priv->rp_endpoint.priv = h;
singleton_h = h;
if (MX_OPENAMP_Init(RPMSG_MASTER, ipc_eth_ProducerRpMsgNewEndpoint) != 0) {
goto error;
}
OpenAmpInit = 1;
if ((h->priv->mbufH = xMessageBufferCreate(4*IPC_PKT_MAXSIZE)) == NULL)
goto error;
if ((h->priv->reqQH = xQueueCreate(4, sizeof(ethernetPkt))) == NULL)
goto error;
h->priv->running = 1;
if (pdPASS != xTaskCreate(ipc_eth_ProducerTaskFunction, "user2ipc", 4096, h, configMAX_PRIORITIES - 2, &h->priv->taskH))
goto error;
return h;
error:
if (h) {
if(h->priv) {
if(h->priv->taskH) {
h->priv->running = 0;
vTaskDelete(h->priv->taskH);
}
if(h->priv->rp_endpoint.priv == h) {
// no abstraction for destroying, so calling library function directly
rpmsg_destroy_ept(&h->priv->rp_endpoint);
}
if(h->priv->mbufH) {
vMessageBufferDelete(h->priv->mbufH);
}
if(h->priv->reqQH) {
vQueueDelete(h->priv->reqQH);
}
free(h->priv);
}
free(h);
}
h = NULL;
if ( OpenAmpInit )
OPENAMP_DeInit();
return h;
}
@@ -0,0 +1 @@
used for symbolic linking or referencing from within IDEs, VSCode project is based on Makefiles and therefore this folder is not needed. It is more for CubeIDE Project structure!
@@ -0,0 +1,757 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "openamp.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "stdio.h"
#include "assert.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
#ifndef HSEM_ID_0
#define HSEM_ID_0 (0U) /* HW semaphore 0*/
#endif
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
SPI_HandleTypeDef hspi1;
TIM_HandleTypeDef htim2;
UART_HandleTypeDef huart3;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MPU_Config(void);
static void MX_GPIO_Init(void);
static void MX_SPI1_Init(void);
static void MX_TIM2_Init(void);
static void MX_USART3_UART_Init(void);
/* USER CODE BEGIN PFP */
extern void initialise_stdlib_abstraction( void );
void vApplicationMallocFailedHook( void )
{
taskDISABLE_INTERRUPTS();
__asm volatile( "bkpt #0" );
for (;;) {;}
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
( void ) pcTaskName;
( void ) pxTask;
taskDISABLE_INTERRUPTS();
__asm volatile( "bkpt #0" );
for (;;) {;}
}
static char myChar = 0;
QueueHandle_t uartRxQueue;
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
// --------------------------------------------------------------------------------------------------------------------
static void playgroundTask(void* args)
// --------------------------------------------------------------------------------------------------------------------
{
(void)args;
while(1) {
vTaskDelay(pdMS_TO_TICKS(10));
}
vTaskDelete(xTaskGetCurrentTaskHandle());
}
// --------------------------------------------------------------------------------------------------------------------
static int CapabilityFunc( int argc, char** argv, void* ctx )
// --------------------------------------------------------------------------------------------------------------------
{
(void)argc;
(void)argv;
(void)ctx;
printf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\r\nOK",
0, // has spindle
0, // has spindle status
0, // has stepper
0, // has stepper move relative
0, // has stepper move speed
0, // has stepper move async
0, // has stepper status
0, // has stepper refrun
0, // has stepper refrun timeout
0, // has stepper refrun skip
0, // has stepper refrun stay enabled
0, // has stepper reset
0, // has stepper position
0, // has stepper config
0, // has stepper config torque
0, // has stepper config throvercurr
0, // has stepper config powerena
0, // has stepper config stepmode
0, // has stepper config timeoff
0, // has stepper config timeon
0, // has stepper config timefast
0, // has stepper config mmperturn
0, // has stepper config posmax
0, // has stepper config posmin
0, // has stepper config posref
0, // has stepper config stepsperturn
0 // has stepper cancel
);
return 0;
}
#define BKPSRAM_BASE 0x38800000UL
typedef struct {
uint32_t magic;
uint32_t uuid[3];
} device_shared_t;
#define DEVICE_SHARED \
((volatile device_shared_t *)BKPSRAM_BASE)
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
__HAL_RCC_BKPRAM_CLK_ENABLE();
// TODO: in case we have one of these special MCUs,
// ask lecturer before commenting in this line!
//RCC->GCR |= RCC_GCR_BOOT_C2;
//HAL_PWREx_ReleaseCore(PWR_CORE_CPU2);
HAL_PWR_EnableBkUpAccess();
FLASH_OBProgramInitTypeDef OptionsBytesStruct;
//HAL_FLASHEx_EnableDebugger();
HAL_FLASHEx_OBGetConfig(&OptionsBytesStruct);
uint32_t prev = OptionsBytesStruct.USERConfig;
#define BCM4 (1 << 22)
#define BCM7 (1 << 23)
#define nRST_STOP_D2 (1 << 24)
#define nRST_STDY_D2 (1 << 25)
if (!(OptionsBytesStruct.USERConfig & BCM4))
OptionsBytesStruct.USERConfig |= BCM4;
if (!(OptionsBytesStruct.USERConfig & BCM7))
OptionsBytesStruct.USERConfig |= BCM7;
if (!(OptionsBytesStruct.USERConfig & nRST_STOP_D2))
OptionsBytesStruct.USERConfig |= nRST_STOP_D2;
if (!(OptionsBytesStruct.USERConfig & nRST_STDY_D2))
OptionsBytesStruct.USERConfig |= nRST_STDY_D2;
if ( prev != OptionsBytesStruct.USERConfig) {
// TODO: in case we have one of these special MCUs,
// ask lecturer before commenting in this line!
//HAL_FLASHEx_OBProgram(&OptionsBytesStruct);
}
DEVICE_SHARED->uuid[0] = *(volatile uint32_t *)0x1FF1E800UL;
DEVICE_SHARED->uuid[1] = *(volatile uint32_t *)0x1FF1E804UL;
DEVICE_SHARED->uuid[2] = *(volatile uint32_t *)0x1FF1E808UL;
__DMB();
DEVICE_SHARED->magic = 0x48475531; // "HGU1"
__DMB();
/* USER CODE END 1 */
/* USER CODE BEGIN Boot_Mode_Sequence_0 */
/* USER CODE END Boot_Mode_Sequence_0 */
/* MPU Configuration--------------------------------------------------------*/
MPU_Config();
/* USER CODE BEGIN Boot_Mode_Sequence_1 */
/* Wait until CPU2 boots and enters in stop mode or timeout*/
int timeout = 0xFFFF;
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));
/*if ( timeout < 0 )
{
Error_Handler();
}*/
/* USER CODE END Boot_Mode_Sequence_1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN Boot_Mode_Sequence_2 */
/* When system initialization is finished, Cortex-M7 will release Cortex-M4 by means of
HSEM notification */
/*HW semaphore Clock enable*/
__HAL_RCC_HSEM_CLK_ENABLE();
/*Take HSEM */
HAL_HSEM_FastTake(HSEM_ID_0);
/*Release HSEM in order to notify the CPU2(CM4)*/
HAL_HSEM_Release(HSEM_ID_0,0);
/* wait until CPU2 wakes up from stop mode */
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) == RESET));
/* USER CODE END Boot_Mode_Sequence_2 */
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_SPI1_Init();
MX_TIM2_Init();
MX_USART3_UART_Init();
/* USER CODE BEGIN 2 */
// cretae a free rtos queue to buffer console characters received from debug uart
uartRxQueue = xQueueCreate(64, sizeof(char));
HAL_UART_Receive_IT(&huart3, (uint8_t *)&myChar, sizeof(myChar));
// create a playground task at the very beginning
xTaskCreate(playgroundTask, "playground", 128, NULL, 1, NULL);
// mask a compiler warning by referencing the function but not using it (void cast)
(void)CapabilityFunc;
// start the scheduler and setup free rtos execution context
vTaskStartScheduler();
// we should never reach that point!
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Supply configuration update enable
*/
HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY);
/** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLM = 1;
RCC_OscInitStruct.PLL.PLLN = 100;
RCC_OscInitStruct.PLL.PLLP = 2;
RCC_OscInitStruct.PLL.PLLQ = 4;
RCC_OscInitStruct.PLL.PLLR = 2;
RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_3;
RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
RCC_OscInitStruct.PLL.PLLFRACN = 0;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2
|RCC_CLOCKTYPE_D3PCLK1|RCC_CLOCKTYPE_D1PCLK1;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
Error_Handler();
}
}
/**
* @brief SPI1 Initialization Function
* @param None
* @retval None
*/
static void MX_SPI1_Init(void)
{
/* USER CODE BEGIN SPI1_Init 0 */
/* USER CODE END SPI1_Init 0 */
/* USER CODE BEGIN SPI1_Init 1 */
/* USER CODE END SPI1_Init 1 */
/* SPI1 parameter configuration*/
hspi1.Instance = SPI1;
hspi1.Init.Mode = SPI_MODE_MASTER;
hspi1.Init.Direction = SPI_DIRECTION_2LINES;
hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
hspi1.Init.CLKPolarity = SPI_POLARITY_HIGH;
hspi1.Init.CLKPhase = SPI_PHASE_2EDGE;
hspi1.Init.NSS = SPI_NSS_SOFT;
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64;
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
hspi1.Init.CRCPolynomial = 0x0;
hspi1.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
hspi1.Init.NSSPolarity = SPI_NSS_POLARITY_LOW;
hspi1.Init.FifoThreshold = SPI_FIFO_THRESHOLD_01DATA;
hspi1.Init.TxCRCInitializationPattern = SPI_CRC_INITIALIZATION_ALL_ZERO_PATTERN;
hspi1.Init.RxCRCInitializationPattern = SPI_CRC_INITIALIZATION_ALL_ZERO_PATTERN;
hspi1.Init.MasterSSIdleness = SPI_MASTER_SS_IDLENESS_00CYCLE;
hspi1.Init.MasterInterDataIdleness = SPI_MASTER_INTERDATA_IDLENESS_00CYCLE;
hspi1.Init.MasterReceiverAutoSusp = SPI_MASTER_RX_AUTOSUSP_DISABLE;
hspi1.Init.MasterKeepIOState = SPI_MASTER_KEEP_IO_STATE_DISABLE;
hspi1.Init.IOSwap = SPI_IO_SWAP_DISABLE;
if (HAL_SPI_Init(&hspi1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN SPI1_Init 2 */
/* USER CODE END SPI1_Init 2 */
}
/**
* @brief TIM2 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM2_Init(void)
{
/* USER CODE BEGIN TIM2_Init 0 */
/* USER CODE END TIM2_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
TIM_OC_InitTypeDef sConfigOC = {0};
/* USER CODE BEGIN TIM2_Init 1 */
/* USER CODE END TIM2_Init 1 */
htim2.Instance = TIM2;
htim2.Init.Prescaler = 0;
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
htim2.Init.Period = 9999;
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
{
Error_Handler();
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK)
{
Error_Handler();
}
if (HAL_TIM_PWM_Init(&htim2) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
sConfigOC.Pulse = 0;
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_3) != HAL_OK)
{
Error_Handler();
}
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_4) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM2_Init 2 */
/* USER CODE END TIM2_Init 2 */
HAL_TIM_MspPostInit(&htim2);
}
/**
* @brief USART3 Initialization Function
* @param None
* @retval None
*/
static void MX_USART3_UART_Init(void)
{
/* USER CODE BEGIN USART3_Init 0 */
/* USER CODE END USART3_Init 0 */
/* USER CODE BEGIN USART3_Init 1 */
/* USER CODE END USART3_Init 1 */
huart3.Instance = USART3;
huart3.Init.BaudRate = 115200;
huart3.Init.WordLength = UART_WORDLENGTH_8B;
huart3.Init.StopBits = UART_STOPBITS_1;
huart3.Init.Parity = UART_PARITY_NONE;
huart3.Init.Mode = UART_MODE_TX_RX;
huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart3.Init.OverSampling = UART_OVERSAMPLING_16;
huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart3.Init.ClockPrescaler = UART_PRESCALER_DIV1;
huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart3) != HAL_OK)
{
Error_Handler();
}
if (HAL_UARTEx_SetTxFifoThreshold(&huart3, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK)
{
Error_Handler();
}
if (HAL_UARTEx_SetRxFifoThreshold(&huart3, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK)
{
Error_Handler();
}
if (HAL_UARTEx_DisableFifoMode(&huart3) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USART3_Init 2 */
/* USER CODE END USART3_Init 2 */
}
/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOE_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOE, SPINDLE_ENA_L_Pin|SPINDLE_ENA_R_Pin|LED_YELLOW_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOB, LED_GREEN_Pin|LED_RED_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOD, STEP_SPI_CS_Pin|STEP_PULSE_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOG, STEP_RSTN_Pin|STEP_DIR_Pin, GPIO_PIN_RESET);
/*Configure GPIO pins : SPINDLE_ENA_L_Pin SPINDLE_ENA_R_Pin LED_YELLOW_Pin */
GPIO_InitStruct.Pin = SPINDLE_ENA_L_Pin|SPINDLE_ENA_R_Pin|LED_YELLOW_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
/*Configure GPIO pin : USR_BUTTON_Pin */
GPIO_InitStruct.Pin = USR_BUTTON_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(USR_BUTTON_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pin : SPINDLE_SI_R_Pin */
GPIO_InitStruct.Pin = SPINDLE_SI_R_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(SPINDLE_SI_R_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : LED_GREEN_Pin LED_RED_Pin */
GPIO_InitStruct.Pin = LED_GREEN_Pin|LED_RED_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pins : STEP_SPI_CS_Pin STEP_PULSE_Pin */
GPIO_InitStruct.Pin = STEP_SPI_CS_Pin|STEP_PULSE_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
/*Configure GPIO pins : STEP_RSTN_Pin STEP_DIR_Pin */
GPIO_InitStruct.Pin = STEP_RSTN_Pin|STEP_DIR_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
/*Configure GPIO pin : STEP_FLAG_Pin */
GPIO_InitStruct.Pin = STEP_FLAG_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(STEP_FLAG_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : REFERENCE_MARK_Pin LIMIT_SWITCH_Pin */
GPIO_InitStruct.Pin = REFERENCE_MARK_Pin|LIMIT_SWITCH_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pin : SPINDLE_SI_L_Pin */
GPIO_InitStruct.Pin = SPINDLE_SI_L_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(SPINDLE_SI_L_GPIO_Port, &GPIO_InitStruct);
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
void vAssertCalled( const char * const pcFileName, unsigned long ulLine )
{
volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
/* Parameters are not used. */
( void ) ulLine;
( void ) pcFileName;
taskENTER_CRITICAL();
{
/* You can step out of this function to debug the assertion by using
the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero
value. */
while( ulSetToNonZeroInDebuggerToContinue == 0 )
{
}
}
taskEXIT_CRITICAL();
}
int __stdout_put_char(int ch)
{
uint8_t val = ch;
while((huart3.Instance->ISR & UART_FLAG_TXE) == 0);
huart3.Instance->TDR = val;
while((huart3.Instance->ISR & UART_FLAG_TC) == 0);
return 0;
}
int __stdin_get_char(void)
{
if ( xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED )
{
if (huart3.Instance->ISR & UART_FLAG_ORE)
huart3.Instance->ICR = UART_CLEAR_OREF;
if (huart3.Instance->ISR & UART_FLAG_NE)
huart3.Instance->ICR = UART_CLEAR_NEF;
if (huart3.Instance->ISR & UART_FLAG_FE)
huart3.Instance->ICR = UART_CLEAR_FEF;
if ((huart3.Instance->ISR & UART_FLAG_RXNE) == 0) return -1;
return huart3.Instance->RDR;
}
else
{
// we make sure that EOF is returned in case there is a small pause time
// in the input sequence, therefore we do not block infinitely long!
int value = EOF;
if ( xQueueReceive(uartRxQueue, &value, 10 ) ) return value;
else return EOF;
}
}
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if ( huart->Instance == USART3 )
{
if ( xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED )
{
xQueueSendFromISR(uartRxQueue, &myChar, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
HAL_UART_Receive_IT(&huart3, (uint8_t *)&myChar, sizeof(myChar));
}
}
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
{
if ( huart->Instance == USART3 )
{
HAL_UART_Receive_IT(&huart3, (uint8_t *)&myChar, sizeof(myChar));
}
}
/* USER CODE END 4 */
/* MPU Configuration */
void MPU_Config(void)
{
MPU_Region_InitTypeDef MPU_InitStruct = {0};
/* Disables the MPU */
HAL_MPU_Disable();
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER0;
MPU_InitStruct.BaseAddress = 0x0;
MPU_InitStruct.Size = MPU_REGION_SIZE_4GB;
MPU_InitStruct.SubRegionDisable = 0x87;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Number = MPU_REGION_NUMBER1;
MPU_InitStruct.BaseAddress = 0x38000000;
MPU_InitStruct.Size = MPU_REGION_SIZE_64KB;
MPU_InitStruct.SubRegionDisable = 0x0;
MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/* Enables the MPU */
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
}
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
@@ -0,0 +1,757 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "openamp.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "stdio.h"
#include "assert.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
#ifndef HSEM_ID_0
#define HSEM_ID_0 (0U) /* HW semaphore 0*/
#endif
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
SPI_HandleTypeDef hspi1;
TIM_HandleTypeDef htim2;
UART_HandleTypeDef huart3;
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MPU_Config(void);
static void MX_GPIO_Init(void);
static void MX_SPI1_Init(void);
static void MX_TIM2_Init(void);
static void MX_USART3_UART_Init(void);
/* USER CODE BEGIN PFP */
extern void initialise_stdlib_abstraction( void );
void vApplicationMallocFailedHook( void )
{
taskDISABLE_INTERRUPTS();
__asm volatile( "bkpt #0" );
for (;;) {;}
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
( void ) pcTaskName;
( void ) pxTask;
taskDISABLE_INTERRUPTS();
__asm volatile( "bkpt #0" );
for (;;) {;}
}
static char myChar = 0;
QueueHandle_t uartRxQueue;
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
// --------------------------------------------------------------------------------------------------------------------
static void playgroundTask(void* args)
// --------------------------------------------------------------------------------------------------------------------
{
(void)args;
while(1) {
vTaskDelay(pdMS_TO_TICKS(10));
}
vTaskDelete(xTaskGetCurrentTaskHandle());
}
// --------------------------------------------------------------------------------------------------------------------
static int CapabilityFunc( int argc, char** argv, void* ctx )
// --------------------------------------------------------------------------------------------------------------------
{
(void)argc;
(void)argv;
(void)ctx;
printf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\r\nOK",
0, // has spindle
0, // has spindle status
0, // has stepper
0, // has stepper move relative
0, // has stepper move speed
0, // has stepper move async
0, // has stepper status
0, // has stepper refrun
0, // has stepper refrun timeout
0, // has stepper refrun skip
0, // has stepper refrun stay enabled
0, // has stepper reset
0, // has stepper position
0, // has stepper config
0, // has stepper config torque
0, // has stepper config throvercurr
0, // has stepper config powerena
0, // has stepper config stepmode
0, // has stepper config timeoff
0, // has stepper config timeon
0, // has stepper config timefast
0, // has stepper config mmperturn
0, // has stepper config posmax
0, // has stepper config posmin
0, // has stepper config posref
0, // has stepper config stepsperturn
0 // has stepper cancel
);
return 0;
}
#define BKPSRAM_BASE 0x38800000UL
typedef struct {
uint32_t magic;
uint32_t uuid[3];
} device_shared_t;
#define DEVICE_SHARED \
((volatile device_shared_t *)BKPSRAM_BASE)
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
__HAL_RCC_BKPRAM_CLK_ENABLE();
// TODO: in case we have one of these special MCUs,
// ask lecturer before commenting in this line!
//RCC->GCR |= RCC_GCR_BOOT_C2;
//HAL_PWREx_ReleaseCore(PWR_CORE_CPU2);
HAL_PWR_EnableBkUpAccess();
FLASH_OBProgramInitTypeDef OptionsBytesStruct;
//HAL_FLASHEx_EnableDebugger();
HAL_FLASHEx_OBGetConfig(&OptionsBytesStruct);
uint32_t prev = OptionsBytesStruct.USERConfig;
#define BCM4 (1 << 22)
#define BCM7 (1 << 23)
#define nRST_STOP_D2 (1 << 24)
#define nRST_STDY_D2 (1 << 25)
if (!(OptionsBytesStruct.USERConfig & BCM4))
OptionsBytesStruct.USERConfig |= BCM4;
if (!(OptionsBytesStruct.USERConfig & BCM7))
OptionsBytesStruct.USERConfig |= BCM7;
if (!(OptionsBytesStruct.USERConfig & nRST_STOP_D2))
OptionsBytesStruct.USERConfig |= nRST_STOP_D2;
if (!(OptionsBytesStruct.USERConfig & nRST_STDY_D2))
OptionsBytesStruct.USERConfig |= nRST_STDY_D2;
if ( prev != OptionsBytesStruct.USERConfig) {
// TODO: in case we have one of these special MCUs,
// ask lecturer before commenting in this line!
//HAL_FLASHEx_OBProgram(&OptionsBytesStruct);
}
DEVICE_SHARED->uuid[0] = *(volatile uint32_t *)0x1FF1E800UL;
DEVICE_SHARED->uuid[1] = *(volatile uint32_t *)0x1FF1E804UL;
DEVICE_SHARED->uuid[2] = *(volatile uint32_t *)0x1FF1E808UL;
__DMB();
DEVICE_SHARED->magic = 0x48475531; // "HGU1"
__DMB();
/* USER CODE END 1 */
/* USER CODE BEGIN Boot_Mode_Sequence_0 */
/* USER CODE END Boot_Mode_Sequence_0 */
/* MPU Configuration--------------------------------------------------------*/
MPU_Config();
/* USER CODE BEGIN Boot_Mode_Sequence_1 */
/* Wait until CPU2 boots and enters in stop mode or timeout*/
int timeout = 0xFFFF;
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));
/*if ( timeout < 0 )
{
Error_Handler();
}*/
/* USER CODE END Boot_Mode_Sequence_1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN Boot_Mode_Sequence_2 */
/* When system initialization is finished, Cortex-M7 will release Cortex-M4 by means of
HSEM notification */
/*HW semaphore Clock enable*/
__HAL_RCC_HSEM_CLK_ENABLE();
/*Take HSEM */
HAL_HSEM_FastTake(HSEM_ID_0);
/*Release HSEM in order to notify the CPU2(CM4)*/
HAL_HSEM_Release(HSEM_ID_0,0);
/* wait until CPU2 wakes up from stop mode */
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) == RESET));
/* USER CODE END Boot_Mode_Sequence_2 */
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_SPI1_Init();
MX_TIM2_Init();
MX_USART3_UART_Init();
/* USER CODE BEGIN 2 */
// cretae a free rtos queue to buffer console characters received from debug uart
uartRxQueue = xQueueCreate(64, sizeof(char));
HAL_UART_Receive_IT(&huart3, (uint8_t *)&myChar, sizeof(myChar));
// create a playground task at the very beginning
xTaskCreate(playgroundTask, "playground", 128, NULL, 1, NULL);
// mask a compiler warning by referencing the function but not using it (void cast)
(void)CapabilityFunc;
// start the schedular and setup free rtos execution context
vTaskStartScheduler();
// we should never reach that point!
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Supply configuration update enable
*/
HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY);
/** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLM = 1;
RCC_OscInitStruct.PLL.PLLN = 100;
RCC_OscInitStruct.PLL.PLLP = 2;
RCC_OscInitStruct.PLL.PLLQ = 4;
RCC_OscInitStruct.PLL.PLLR = 2;
RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_3;
RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
RCC_OscInitStruct.PLL.PLLFRACN = 0;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2
|RCC_CLOCKTYPE_D3PCLK1|RCC_CLOCKTYPE_D1PCLK1;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
Error_Handler();
}
}
/**
* @brief SPI1 Initialization Function
* @param None
* @retval None
*/
static void MX_SPI1_Init(void)
{
/* USER CODE BEGIN SPI1_Init 0 */
/* USER CODE END SPI1_Init 0 */
/* USER CODE BEGIN SPI1_Init 1 */
/* USER CODE END SPI1_Init 1 */
/* SPI1 parameter configuration*/
hspi1.Instance = SPI1;
hspi1.Init.Mode = SPI_MODE_MASTER;
hspi1.Init.Direction = SPI_DIRECTION_2LINES;
hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
hspi1.Init.CLKPolarity = SPI_POLARITY_HIGH;
hspi1.Init.CLKPhase = SPI_PHASE_2EDGE;
hspi1.Init.NSS = SPI_NSS_SOFT;
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64;
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
hspi1.Init.CRCPolynomial = 0x0;
hspi1.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
hspi1.Init.NSSPolarity = SPI_NSS_POLARITY_LOW;
hspi1.Init.FifoThreshold = SPI_FIFO_THRESHOLD_01DATA;
hspi1.Init.TxCRCInitializationPattern = SPI_CRC_INITIALIZATION_ALL_ZERO_PATTERN;
hspi1.Init.RxCRCInitializationPattern = SPI_CRC_INITIALIZATION_ALL_ZERO_PATTERN;
hspi1.Init.MasterSSIdleness = SPI_MASTER_SS_IDLENESS_00CYCLE;
hspi1.Init.MasterInterDataIdleness = SPI_MASTER_INTERDATA_IDLENESS_00CYCLE;
hspi1.Init.MasterReceiverAutoSusp = SPI_MASTER_RX_AUTOSUSP_DISABLE;
hspi1.Init.MasterKeepIOState = SPI_MASTER_KEEP_IO_STATE_DISABLE;
hspi1.Init.IOSwap = SPI_IO_SWAP_DISABLE;
if (HAL_SPI_Init(&hspi1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN SPI1_Init 2 */
/* USER CODE END SPI1_Init 2 */
}
/**
* @brief TIM2 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM2_Init(void)
{
/* USER CODE BEGIN TIM2_Init 0 */
/* USER CODE END TIM2_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
TIM_OC_InitTypeDef sConfigOC = {0};
/* USER CODE BEGIN TIM2_Init 1 */
/* USER CODE END TIM2_Init 1 */
htim2.Instance = TIM2;
htim2.Init.Prescaler = 0;
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
htim2.Init.Period = 9999;
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim2) != HAL_OK)
{
Error_Handler();
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK)
{
Error_Handler();
}
if (HAL_TIM_PWM_Init(&htim2) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
sConfigOC.Pulse = 0;
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_3) != HAL_OK)
{
Error_Handler();
}
if (HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_4) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM2_Init 2 */
/* USER CODE END TIM2_Init 2 */
HAL_TIM_MspPostInit(&htim2);
}
/**
* @brief USART3 Initialization Function
* @param None
* @retval None
*/
static void MX_USART3_UART_Init(void)
{
/* USER CODE BEGIN USART3_Init 0 */
/* USER CODE END USART3_Init 0 */
/* USER CODE BEGIN USART3_Init 1 */
/* USER CODE END USART3_Init 1 */
huart3.Instance = USART3;
huart3.Init.BaudRate = 115200;
huart3.Init.WordLength = UART_WORDLENGTH_8B;
huart3.Init.StopBits = UART_STOPBITS_1;
huart3.Init.Parity = UART_PARITY_NONE;
huart3.Init.Mode = UART_MODE_TX_RX;
huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart3.Init.OverSampling = UART_OVERSAMPLING_16;
huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart3.Init.ClockPrescaler = UART_PRESCALER_DIV1;
huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart3) != HAL_OK)
{
Error_Handler();
}
if (HAL_UARTEx_SetTxFifoThreshold(&huart3, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK)
{
Error_Handler();
}
if (HAL_UARTEx_SetRxFifoThreshold(&huart3, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK)
{
Error_Handler();
}
if (HAL_UARTEx_DisableFifoMode(&huart3) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USART3_Init 2 */
/* USER CODE END USART3_Init 2 */
}
/**
* @brief GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOE_CLK_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOE, SPINDLE_ENA_L_Pin|SPINDLE_ENA_R_Pin|LED_YELLOW_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOB, LED_GREEN_Pin|LED_RED_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOD, STEP_SPI_CS_Pin|STEP_PULSE_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOG, STEP_RSTN_Pin|STEP_DIR_Pin, GPIO_PIN_RESET);
/*Configure GPIO pins : SPINDLE_ENA_L_Pin SPINDLE_ENA_R_Pin LED_YELLOW_Pin */
GPIO_InitStruct.Pin = SPINDLE_ENA_L_Pin|SPINDLE_ENA_R_Pin|LED_YELLOW_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
/*Configure GPIO pin : USR_BUTTON_Pin */
GPIO_InitStruct.Pin = USR_BUTTON_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(USR_BUTTON_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pin : SPINDLE_SI_R_Pin */
GPIO_InitStruct.Pin = SPINDLE_SI_R_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(SPINDLE_SI_R_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : LED_GREEN_Pin LED_RED_Pin */
GPIO_InitStruct.Pin = LED_GREEN_Pin|LED_RED_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pins : STEP_SPI_CS_Pin STEP_PULSE_Pin */
GPIO_InitStruct.Pin = STEP_SPI_CS_Pin|STEP_PULSE_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
/*Configure GPIO pins : STEP_RSTN_Pin STEP_DIR_Pin */
GPIO_InitStruct.Pin = STEP_RSTN_Pin|STEP_DIR_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
/*Configure GPIO pin : STEP_FLAG_Pin */
GPIO_InitStruct.Pin = STEP_FLAG_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(STEP_FLAG_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : REFERENCE_MARK_Pin LIMIT_SWITCH_Pin */
GPIO_InitStruct.Pin = REFERENCE_MARK_Pin|LIMIT_SWITCH_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pin : SPINDLE_SI_L_Pin */
GPIO_InitStruct.Pin = SPINDLE_SI_L_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(SPINDLE_SI_L_GPIO_Port, &GPIO_InitStruct);
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
void vAssertCalled( const char * const pcFileName, unsigned long ulLine )
{
volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
/* Parameters are not used. */
( void ) ulLine;
( void ) pcFileName;
taskENTER_CRITICAL();
{
/* You can step out of this function to debug the assertion by using
the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero
value. */
while( ulSetToNonZeroInDebuggerToContinue == 0 )
{
}
}
taskEXIT_CRITICAL();
}
int __stdout_put_char(int ch)
{
uint8_t val = ch;
while((huart3.Instance->ISR & UART_FLAG_TXE) == 0);
huart3.Instance->TDR = val;
while((huart3.Instance->ISR & UART_FLAG_TC) == 0);
return 0;
}
int __stdin_get_char(void)
{
if ( xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED )
{
if (huart3.Instance->ISR & UART_FLAG_ORE)
huart3.Instance->ICR = UART_CLEAR_OREF;
if (huart3.Instance->ISR & UART_FLAG_NE)
huart3.Instance->ICR = UART_CLEAR_NEF;
if (huart3.Instance->ISR & UART_FLAG_FE)
huart3.Instance->ICR = UART_CLEAR_FEF;
if ((huart3.Instance->ISR & UART_FLAG_RXNE) == 0) return -1;
return huart3.Instance->RDR;
}
else
{
// we make sure that EOF is returned in case there is a small pause time
// in the input sequence, therefore we do not block infinitely long!
int value = EOF;
if ( xQueueReceive(uartRxQueue, &value, 10 ) ) return value;
else return EOF;
}
}
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if ( huart->Instance == USART3 )
{
if ( xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED )
{
xQueueSendFromISR(uartRxQueue, &myChar, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
HAL_UART_Receive_IT(&huart3, (uint8_t *)&myChar, sizeof(myChar));
}
}
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
{
if ( huart->Instance == USART3 )
{
HAL_UART_Receive_IT(&huart3, (uint8_t *)&myChar, sizeof(myChar));
}
}
/* USER CODE END 4 */
/* MPU Configuration */
void MPU_Config(void)
{
MPU_Region_InitTypeDef MPU_InitStruct = {0};
/* Disables the MPU */
HAL_MPU_Disable();
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER0;
MPU_InitStruct.BaseAddress = 0x0;
MPU_InitStruct.Size = MPU_REGION_SIZE_4GB;
MPU_InitStruct.SubRegionDisable = 0x87;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Number = MPU_REGION_NUMBER1;
MPU_InitStruct.BaseAddress = 0x38000000;
MPU_InitStruct.Size = MPU_REGION_SIZE_64KB;
MPU_InitStruct.SubRegionDisable = 0x0;
MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/* Enables the MPU */
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
}
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
@@ -0,0 +1,868 @@
/**
* \file mvsyscall.c
* \brief Wrappers required to use newlib malloc-family within FreeRTOS.
* The syscalls for stdlib are implemented in a minimum way as well
*
* \par Overview
* Route FreeRTOS memory management functions to newlib's malloc family.
* Thus newlib and FreeRTOS share memory-management routines and memory pool,
* and all newlib's internal memory-management requirements are supported.
*
* \author Dave Nadler
* \author Thorsten Kimmel
* \date 20-August-2019
* \version 02-Dec-2021 implemented syscalls for stdlib
* \version 27-Jun-2020 Correct "FreeRTOS.h" capitalization, commentary
* \version 24-Jun-2020 commentary only
* \version 11-Sep-2019 malloc accounting, comments, newlib version check
*
* \see http://www.nadler.com/embedded/newlibAndFreeRTOS.html
* \see https://sourceware.org/newlib/libc.html#Reentrancy
* \see https://sourceware.org/newlib/libc.html#malloc
* \see https://sourceware.org/newlib/libc.html#index-_005f_005fenv_005flock
* \see https://sourceware.org/newlib/libc.html#index-_005f_005fmalloc_005flock
* \see https://sourceforge.net/p/freertos/feature-requests/72/
* \see http://www.billgatliff.com/newlib.html
* \see http://wiki.osdev.org/Porting_Newlib
* \see http://www.embecosm.com/appnotes/ean9/ean9-howto-newlib-1.0.html
*
*
* \copyright
* (c) Dave Nadler 2017-2020, All Rights Reserved.
* Web: http://www.nadler.com
* email: drn@nadler.com
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Use or redistributions of source code must retain the above copyright notice,
* this list of conditions, and the following disclaimer.
*
* - Use or redistributions of source code must retain ALL ORIGINAL COMMENTS, AND
* ANY CHANGES MUST BE DOCUMENTED, INCLUDING:
* - Reason for change (purpose)
* - Functional change
* - Date and author contact
*
* - 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.
*
* 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 <string.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>
#include <sys/time.h>
#include <sys/times.h>
#include <newlib.h>
#include <malloc.h>
#include <FreeRTOS.h>
/*!
* In case there is a FreeRTOS used for this application, we have to include
* additional dependencies which are used in memory wrappers
*/
// ----------------------------------------------------------------------------
#ifdef INC_FREERTOS_H
# include "task.h"
# include "semphr.h"
#endif
// ----------------------------------------------------------------------------
/*!
* conditional check to make sure this syscall abstraction and the memory
* wrapper fits to the correct newlib / stdlib version
*/
// ----------------------------------------------------------------------------
#if (( __NEWLIB__ != 3) && ( __NEWLIB__ != 4 )) || ((__NEWLIB__ != 3) && (__NEWLIB_MINOR__ < 1)) || \
((__NEWLIB__ == 3) && (__NEWLIB_MINOR__ > 3) )
#warning "This wrapper was verified for newlib versions 3.1 - 3.3; please ensure newlib's external requirements for malloc-family are unchanged!"
#endif
// ----------------------------------------------------------------------------
/*!
* conditional check to make sure the correct reentrancy configuration has been
* set. Otherwise the stdlib calls could be lead to undefined behavior whenever
* a function is called simultaneous by more than one thread
*/
// ----------------------------------------------------------------------------
#ifdef INC_FREERTOS_H
# if !defined(configUSE_NEWLIB_REENTRANT) || (configUSE_NEWLIB_REENTRANT != 1)
# error "#define configUSE_NEWLIB_REENTRANT 1 which is required for thread-safety of newlib sprintf, dtoa, strtok, etc..."
# endif
#endif
// ----------------------------------------------------------------------------
#ifdef INC_FREERTOS_H
// ----------------------------------------------------------------------------
// The following functions are used to lock IRQs to make sure the newlib functions
// can be used in an IRQ as well, this is not working as expected and so we disable it
// for our platform so far, therefore we have to make sure the user can not enter newlib
// functions when running in ISR context
//! Disables interrupts (after saving prior state)
# define NEWLIB_FUNCS_INSIDE_ISR 0
# if defined(NEWLIB_FUNCS_INSIDE_ISR) && NEWLIB_FUNCS_INSIDE_ISR != 0
define DRN_ENTER_CRITICAL_SECTION(_usis) { _usis = taskENTER_CRITICAL_FROM_ISR(); }
# else
# define DRN_ENTER_CRITICAL_SECTION(_usis) do { int insideAnISR = xPortIsInsideInterrupt(); configASSERT( !insideAnISR ); } while(0)
# endif
//! Re-enables interrupts (unless already disabled prior taskENTER_CRITICAL)
# if defined(NEWLIB_FUNCS_INSIDE_ISR) && NEWLIB_FUNCS_INSIDE_ISR != 0
# define DRN_EXIT_CRITICAL_SECTION(_usis) { taskEXIT_CRITICAL_FROM_ISR(_usis); }
# else
# define DRN_EXIT_CRITICAL_SECTION(_usis)
# endif
// ----------------------------------------------------------------------------
# define __HeapBase _end
# define __HeapLimit _estack
#define MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT
#define MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC
#define MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV
/*!
* The symbols __HeapBase and __HeapLimit are defined to read the
* heap parameters from symbols defined in the linker script. The
* define macros above are used to adapt these names to the name
* of the variable in the linker script. Both variables will be used
* later to allocate and manage memory of the heap and to detect a
* stack / heap crash...
*/
// ----------------------------------------------------------------------------
extern char __HeapBase, __HeapLimit;
int _write( int file, char* ptr, int len );
int _read( int file, char* ptr, int len );
/*!
* The following semaphore is used to prevent the stdout and stderr device
* to be accessed simultaneous while writing data. This is necessary because
* the stdlib itself is thread safe and has its own buffers for a thread but
* the access to the hardware must be locked as well
*/
// ----------------------------------------------------------------------------
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT)
static SemaphoreHandle_t stdioSemaphore;
#endif
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC)
static SemaphoreHandle_t mallocSemaphore;
#endif
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV)
static SemaphoreHandle_t envSemaphore;
#endif
#endif
/*!
* pointer to array of char* strings that define the current
* environment variables of the applications environment
*/
// ----------------------------------------------------------------------------
#define xstr(a) str(a)
#define str(a) #a
#define NEWLIB_ENV "STDLIB=newlib-" xstr(__NEWLIB__) "." xstr(__NEWLIB_MINOR__)
#ifdef NDEBUG
# define DEBUG_ENV "DEBUG_ENV=RELEASE"
#else
# define DEBUG_ENV "DEBUG_ENV=DEBUG"
#endif
#define GNUC_ENV "GNUC=" xstr(__GNUC__) "." xstr(__GNUC_MINOR__)
#define OS_VERSION_ENV "OSVERSION=" xstr(tskKERNEL_VERSION_MAJOR) "." xstr(tskKERNEL_VERSION_MINOR)
static char* __env[] = { "ARCH=ARM32", "MCU=STM32F746ZI", "PLATFORM=ARM_FW_PLAYGROUND", "OS=FreeRTOS", "USERNAME=STM32",
NEWLIB_ENV, OS_VERSION_ENV, GNUC_ENV, DEBUG_ENV, "BUILDTIME=" xstr(__TIME__), "BUILDDATE=" xstr(__DATE__),
NULL
};
char** environ = &__env[0];
// ----------------------------------------------------------------------------
/*!
* \brief is used to provide an overwritable stdout channel which can be used
* for debugging purposes in the application
* \param chr
*/
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __stdout_put_char( int chr );
// ----------------------------------------------------------------------------
/*!
* \brief is used to provide an overwritable stdin channel which can be used
* for debugging purposes in the application
*/
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) int __stdin_get_char( void )
{
return -1;
}
// ----------------------------------------------------------------------------
/*!
* \brief is used to provide an overwritable clock tick function which is used
* by the stdlib
*/
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) unsigned long long __stdlib_get_system_clock_ticks( void )
{
#if defined(INC_FREERTOS_H)
return (unsigned long long)xTaskGetTickCount();
#else
return 0;
#endif
}
// ----------------------------------------------------------------------------
/*!
* \brief semihosting initialization function which should be called when _start
* is called. afterwards main would be called.
*/
// ----------------------------------------------------------------------------
void initialise_monitor_handles( void )
// ----------------------------------------------------------------------------
{
}
/*!
* \brief this function will be called after initialization of the .bss, .text,
* and .data segment of the application and while the stdlib begins to initialize
* its requirements. This is done by calling the __libc_init_array in _start.S routine
* before calling the main function. By tagging a function with the "constructor"
* attribute, the compiler will add the function pointer to this initialization list.
* \attention This is a GCC attribute. In case the application is compiled with another
* compiler, this attribute must be ported as well!
*/
// ----------------------------------------------------------------------------
__attribute__((constructor))
void initialise_stdlib_abstraction( void )
// ----------------------------------------------------------------------------
{
initialise_monitor_handles();
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT)
stdioSemaphore = xSemaphoreCreateRecursiveMutex();
if ( stdioSemaphore == 0 )
{
vAssertCalled( __FILE__, __LINE__ );
}
#endif
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC)
mallocSemaphore = xSemaphoreCreateRecursiveMutex();
if ( mallocSemaphore == 0 )
{
vAssertCalled( __FILE__, __LINE__ );
}
#endif
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV)
envSemaphore = xSemaphoreCreateRecursiveMutex();
if ( envSemaphore == 0 )
{
vAssertCalled( __FILE__, __LINE__ );
}
#endif
}
/*!
* \brief returns the process ID (PID) of the calling process.
* \attention we have no real OS and so we only return PID 1 because
* this is the only running process. Everything is in "kernel space" or
* "machine mode"
*/
// ----------------------------------------------------------------------------
int _getpid( void )
// ----------------------------------------------------------------------------
{
return 1;
}
/*!
* \brief The command kill sends the specified signal to the specified
* process.
* \attention we have no real OS and so we cannot kill our only running
* process with PID 1
*/
// ----------------------------------------------------------------------------
int _kill( int pid, int sig )
// ----------------------------------------------------------------------------
{
( void )pid;
( void )sig;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EINVAL;
}
errno = EINVAL;
return -1;
}
/*!
* \brief The command exit is used to stop the process or application
* \attention if the application has called exit, we do must not return
* from this function anymore
*/
// ----------------------------------------------------------------------------
__attribute__( ( noreturn ) )
void _exit ( int status )
// ----------------------------------------------------------------------------
{
_kill( status, -1 );
while ( 1 ) {}
}
/*!
* \brief attempts to read up to 'len' bytes from file descriptor 'file'
* into the buffer starting at 'ptr'.
* \note currently there is only support for stdin. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _read( int file, char* ptr, int len )
// ----------------------------------------------------------------------------
{
( void )file;
int DataIdx;
int resLen = 0;
if ( file == STDIN_FILENO )
{
for ( DataIdx = 0; DataIdx < len; )
{
int result = __stdin_get_char();
if ( result == EOF )
{
if ( resLen == 0 )
{
resLen = EOF;
}
break;
}
*ptr++ = ( char )result;
resLen++;
DataIdx++;
}
}
else
{
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EBADF;
}
errno = EBADF;
return -1;
}
return resLen;
}
/*!
* \brief attempts to write 'len' bytes from file descriptor 'file'
* out of the buffer starting at 'ptr'.
* \note currently there is only support for stdout and stderr. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _write( int file, char* ptr, int len )
// ----------------------------------------------------------------------------
{
( void )file;
int DataIdx, locked = 0;
if ( file == STDOUT_FILENO || file == STDERR_FILENO )
{
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreTakeRecursive( stdioSemaphore, -1 );
locked = 1;
}
#endif
if (file == STDERR_FILENO)
{
__stdout_put_char('\033');
__stdout_put_char('[');
__stdout_put_char('3');
__stdout_put_char('1');
__stdout_put_char('m');
}
for ( DataIdx = 0; DataIdx < len; DataIdx++ )
{
__stdout_put_char( ptr[DataIdx] );
}
if (file == STDERR_FILENO)
{
__stdout_put_char('\033');
__stdout_put_char('[');
__stdout_put_char('0');
__stdout_put_char('m');
}
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_STDOUT)
if ( locked )
{
xSemaphoreGiveRecursive( stdioSemaphore );
}
#endif
return len;
}
else
{
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EBADF;
}
errno = EBADF;
return -1;
}
}
/*!
* \brief attempts to close a descriptor.
* \note currently there is no support for this function. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _close( int file )
// ----------------------------------------------------------------------------
{
( void )file;
return -1;
}
/*!
* \brief These function returns information about a file, in the buffer
* pointed to by stat
* \note currently there is only support for stdin/out/err function. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _fstat( int file, struct stat* st )
// ----------------------------------------------------------------------------
{
st->st_dev = file;
st->st_size = 0;
st->st_blocks = 0;
if ( file >= 1 && file <= 3 )
{
st->st_mode = S_IFCHR;
return 0;
}
else
{
st->st_mode = S_IFREG;
return -1;
}
}
/*!
* \brief checks wether a descriptor 'file' is a TTY device or not
* \note currently there is only support for stdin/out/err function. If any other devices
* have to be integrated as well, one should implement an abstraction layer
* which delegates the calls directly to the required device or ressource.
* An example can be seen in altera board support packages with the "dev" struct
*/
// ----------------------------------------------------------------------------
int _isatty( int file )
// ----------------------------------------------------------------------------
{
// is stdin, stdout or stderror
if ( file >= 0 && file <= 2 )
{
return file;
}
return 0;
}
// ----------------------------------------------------------------------------
int _lseek( int file, int ptr, int dir )
// ----------------------------------------------------------------------------
{
( void )file;
( void )ptr;
( void )dir;
return 0;
}
// ----------------------------------------------------------------------------
int _open( char* path, int flags, ... )
// ----------------------------------------------------------------------------
{
( void )path;
( void )flags;
/* Pretend like we always fail */
return -1;
}
// ----------------------------------------------------------------------------
int _wait( int* status )
// ----------------------------------------------------------------------------
{
( void )status;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = ECHILD;
}
errno = ECHILD;
return -1;
}
// ----------------------------------------------------------------------------
int _unlink( char* name )
// ----------------------------------------------------------------------------
{
( void )name;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = ENOENT;
}
errno = ENOENT;
return -1;
}
// ----------------------------------------------------------------------------
int _times( struct tms* buf )
// ----------------------------------------------------------------------------
{
buf->tms_utime = buf->tms_cutime = 0; // we have no user space!
buf->tms_stime = buf->tms_cstime = __stdlib_get_system_clock_ticks( ); // everything runs in one process!
return 0;
}
// ----------------------------------------------------------------------------
int _stat( char* file, struct stat* st )
// ----------------------------------------------------------------------------
{
( void )file;
( void )st;
st->st_mode = S_IFCHR;
return 0;
}
// ----------------------------------------------------------------------------
int _link( char* old, char* new )
// ----------------------------------------------------------------------------
{
( void )old;
( void )new;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EMLINK;
}
errno = EMLINK;
return -1;
}
// ----------------------------------------------------------------------------
int _fork( void )
// ----------------------------------------------------------------------------
{
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = EAGAIN;
}
errno = EAGAIN;
return -1;
}
// ----------------------------------------------------------------------------
int _execve( char* name, char** argv, char** env )
// ----------------------------------------------------------------------------
{
( void )env;
( void )name;
( void )argv;
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = ENOMEM;
}
errno = ENOMEM;
return -1;
}
// ================================================================================================
// External routines required by newlib's malloc (sbrk/_sbrk, __malloc_lock/unlock)
// ================================================================================================
#if !defined(INC_FREERTOS_H)
// ----------------------------------------------------------------------------
caddr_t _sbrk( int incr )
// ----------------------------------------------------------------------------
{
register char* stack_ptr asm( "sp" );
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 )
{
// write(1, "Heap and stack collision\n", 25);
// abort();
if ( _impure_ptr != 0 )
{
_impure_ptr->_errno = ENOMEM;
}
errno = ENOMEM;
return ( caddr_t ) -1;
}
heap_end += incr;
return ( caddr_t ) prev_heap_end;
}
#else
static int heapBytesRemaining;
static unsigned int stickyHeapBytesRemaining;
uint32_t TotalHeapSize;
// ----------------------------------------------------------------------------
static UBaseType_t malLock_uxSavedInterruptStatus;
// ----------------------------------------------------------------------------
void* _sbrk_r( struct _reent* pReent, int incr )
// ----------------------------------------------------------------------------
{
( void )malLock_uxSavedInterruptStatus;
( void )pReent;
( void )incr;
register char* stack_ptr asm( "sp" );
// make sure to calculate the correct heap size and bytes remaining at the first call!
if( TotalHeapSize == 0 )
{
TotalHeapSize = heapBytesRemaining = stickyHeapBytesRemaining
= ( int )( ( &__HeapLimit ) - ( &__HeapBase ) )
#ifdef configISR_STACK_SIZE_WORDS
- ( configISR_STACK_SIZE_WORDS * 4 )
#endif
;
};
static char* currentHeapEnd = &__HeapBase;
char* limit = ( xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED ) ?
stack_ptr : // Before scheduler is started, limit is stack pointer (risky!)
&__HeapLimit
#ifdef configISR_STACK_SIZE_WORDS
- ( configISR_STACK_SIZE_WORDS * 4 )
#endif
; // Once running, OK to reuse all remaining RAM except ISR stack (MSP) stack
DRN_ENTER_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
if ( currentHeapEnd + incr > limit )
{
// Ooops, no more memory available...
#if( configUSE_MALLOC_FAILED_HOOK == 1 )
{
extern void vApplicationMallocFailedHook( void );
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
vApplicationMallocFailedHook();
}
#elif defined(configHARD_STOP_ON_MALLOC_FAILURE)
// If you want to alert debugger or halt...
// WARNING: brkpt instruction may prevent watchdog operation...
while( 1 )
{
__asm( "bkpt #0" );
}; // Stop in GUI as if at a breakpoint (if debugging, otherwise loop forever)
#else
// Default, if you prefer to believe your application will gracefully trap out-of-memory...
pReent->_errno = ENOMEM; // newlib's thread-specific errno
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
#endif
return ( char* ) -1; // the malloc-family routine that called sbrk will return 0
}
char* previousHeapEnd = currentHeapEnd;
currentHeapEnd += incr;
heapBytesRemaining -= incr;
// implement the statistical feature to provide the minimum free heap size feature
// of FreeRTOS statistics
if ( stickyHeapBytesRemaining > xPortGetFreeHeapSize() )
{
stickyHeapBytesRemaining = xPortGetFreeHeapSize();
}
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
return ( char* ) previousHeapEnd;
}
/*! \brief non-reentrant sbrk uses is actually reentrant by using current context
* because the current _reent structure is pointed to by global _impure_ptr
*/
// ----------------------------------------------------------------------------
void* sbrk( ptrdiff_t __incr )
// ----------------------------------------------------------------------------
{
return _sbrk_r( _impure_ptr, __incr );
}
//! _sbrk is a synonym for sbrk.
// ----------------------------------------------------------------------------
char* _sbrk( int incr )
// ----------------------------------------------------------------------------
{
return sbrk( incr );
}
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __malloc_lock( struct _reent* r )
// ----------------------------------------------------------------------------
{
( void )r;
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreTakeRecursive( mallocSemaphore, -1 );
}
#endif
DRN_ENTER_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
}
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __malloc_unlock( struct _reent* r )
// ----------------------------------------------------------------------------
{
( void )r;
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_MALLOC)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreGiveRecursive( mallocSemaphore );
}
#endif
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
}
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __env_lock( void )
// ----------------------------------------------------------------------------
{
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreTakeRecursive( envSemaphore, -1 );
}
#endif
DRN_ENTER_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
}
// ----------------------------------------------------------------------------
__attribute__( ( weak ) ) void __env_unlock( void )
// ----------------------------------------------------------------------------
{
#if defined(INC_FREERTOS_H) && defined(MV_SYSCALL_USE_EXCLUSIVE_LOCK_FOR_ENV)
if ( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
{
xSemaphoreGiveRecursive( envSemaphore );
}
#endif
DRN_EXIT_CRITICAL_SECTION( malLock_uxSavedInterruptStatus );
}
// ----------------------------------------------------------------------------
void* pvPortMalloc( size_t xSize )
// ----------------------------------------------------------------------------
{
void* p = malloc( xSize );
return p;
}
// ----------------------------------------------------------------------------
void vPortFree( void* pv )
// ----------------------------------------------------------------------------
{
free( pv );
}
// ----------------------------------------------------------------------------
size_t xPortGetFreeHeapSize( void )
// ----------------------------------------------------------------------------
{
static int lockGuard = 0;
if ( lockGuard != 0 ) return stickyHeapBytesRemaining;
lockGuard = 1;
struct mallinfo mi = mallinfo();
size_t result = mi.fordblks + heapBytesRemaining;
lockGuard = 0;
return result;
}
// ----------------------------------------------------------------------------
size_t xPortGetMinimumEverFreeHeapSize ( void )
// ----------------------------------------------------------------------------
{
return stickyHeapBytesRemaining;
}
//! No implementation needed, but stub provided in case application already calls vPortInitialiseBlocks
// ----------------------------------------------------------------------------
void vPortInitialiseBlocks( void )
// ----------------------------------------------------------------------------
{
return;
}
#endif
@@ -0,0 +1,333 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32h7xx_hal_msp.c
* @brief This file provides code for the MSP Initialization
* and de-Initialization codes.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN TD */
/* USER CODE END TD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN Define */
/* USER CODE END Define */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN Macro */
/* USER CODE END Macro */
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* External functions --------------------------------------------------------*/
/* USER CODE BEGIN ExternalFunctions */
/* USER CODE END ExternalFunctions */
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void)
{
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_SYSCFG_CLK_ENABLE();
/* System interrupt init*/
/* Peripheral interrupt init */
/* CM4_SEV_IRQn interrupt configuration */
HAL_NVIC_SetPriority(CM4_SEV_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(CM4_SEV_IRQn);
/* HSEM1_IRQn interrupt configuration */
HAL_NVIC_SetPriority(HSEM1_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(HSEM1_IRQn);
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
/**
* @brief SPI MSP Initialization
* This function configures the hardware resources used in this example
* @param hspi: SPI handle pointer
* @retval None
*/
void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
if(hspi->Instance==SPI1)
{
/* USER CODE BEGIN SPI1_MspInit 0 */
/* USER CODE END SPI1_MspInit 0 */
/** Initializes the peripherals clock
*/
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SPI1;
PeriphClkInitStruct.Spi123ClockSelection = RCC_SPI123CLKSOURCE_PLL;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
{
Error_Handler();
}
/* Peripheral clock enable */
__HAL_RCC_SPI1_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/**SPI1 GPIO Configuration
PA5 ------> SPI1_SCK
PA6 ------> SPI1_MISO
PB5 ------> SPI1_MOSI
*/
GPIO_InitStruct.Pin = STEP_SPI_SCK_Pin|STEP_SPI_MISO_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
GPIO_InitStruct.Pin = STEP_SPI_MOSI_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
HAL_GPIO_Init(STEP_SPI_MOSI_GPIO_Port, &GPIO_InitStruct);
/* USER CODE BEGIN SPI1_MspInit 1 */
/* USER CODE END SPI1_MspInit 1 */
}
}
/**
* @brief SPI MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param hspi: SPI handle pointer
* @retval None
*/
void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
{
if(hspi->Instance==SPI1)
{
/* USER CODE BEGIN SPI1_MspDeInit 0 */
/* USER CODE END SPI1_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_SPI1_CLK_DISABLE();
/**SPI1 GPIO Configuration
PA5 ------> SPI1_SCK
PA6 ------> SPI1_MISO
PB5 ------> SPI1_MOSI
*/
HAL_GPIO_DeInit(GPIOA, STEP_SPI_SCK_Pin|STEP_SPI_MISO_Pin);
HAL_GPIO_DeInit(STEP_SPI_MOSI_GPIO_Port, STEP_SPI_MOSI_Pin);
/* USER CODE BEGIN SPI1_MspDeInit 1 */
/* USER CODE END SPI1_MspDeInit 1 */
}
}
/**
* @brief TIM_Base MSP Initialization
* This function configures the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
{
if(htim_base->Instance==TIM2)
{
/* USER CODE BEGIN TIM2_MspInit 0 */
/* USER CODE END TIM2_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM2_CLK_ENABLE();
/* USER CODE BEGIN TIM2_MspInit 1 */
/* USER CODE END TIM2_MspInit 1 */
}
}
void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
if(htim->Instance==TIM2)
{
/* USER CODE BEGIN TIM2_MspPostInit 0 */
/* USER CODE END TIM2_MspPostInit 0 */
__HAL_RCC_GPIOB_CLK_ENABLE();
/**TIM2 GPIO Configuration
PB10 ------> TIM2_CH3
PB11 ------> TIM2_CH4
*/
GPIO_InitStruct.Pin = SPINDLE_PWM_L_Pin|SPINDLE_PWM_R_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF1_TIM2;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/* USER CODE BEGIN TIM2_MspPostInit 1 */
/* USER CODE END TIM2_MspPostInit 1 */
}
}
/**
* @brief TIM_Base MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param htim_base: TIM_Base handle pointer
* @retval None
*/
void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
{
if(htim_base->Instance==TIM2)
{
/* USER CODE BEGIN TIM2_MspDeInit 0 */
/* USER CODE END TIM2_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_TIM2_CLK_DISABLE();
/* USER CODE BEGIN TIM2_MspDeInit 1 */
/* USER CODE END TIM2_MspDeInit 1 */
}
}
/**
* @brief UART MSP Initialization
* This function configures the hardware resources used in this example
* @param huart: UART handle pointer
* @retval None
*/
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
if(huart->Instance==USART3)
{
/* USER CODE BEGIN USART3_MspInit 0 */
/* USER CODE END USART3_MspInit 0 */
/** Initializes the peripherals clock
*/
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART3;
PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
{
Error_Handler();
}
/* Peripheral clock enable */
__HAL_RCC_USART3_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();
/**USART3 GPIO Configuration
PD8 ------> USART3_TX
PD9 ------> USART3_RX
*/
GPIO_InitStruct.Pin = DEBUG_UART_TX_Pin|DEBUG_UART_RX_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF7_USART3;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
/* USART3 interrupt Init */
HAL_NVIC_SetPriority(USART3_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(USART3_IRQn);
/* USER CODE BEGIN USART3_MspInit 1 */
/* USER CODE END USART3_MspInit 1 */
}
}
/**
* @brief UART MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param huart: UART handle pointer
* @retval None
*/
void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
{
if(huart->Instance==USART3)
{
/* USER CODE BEGIN USART3_MspDeInit 0 */
/* USER CODE END USART3_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_USART3_CLK_DISABLE();
/**USART3 GPIO Configuration
PD8 ------> USART3_TX
PD9 ------> USART3_RX
*/
HAL_GPIO_DeInit(GPIOD, DEBUG_UART_TX_Pin|DEBUG_UART_RX_Pin);
/* USART3 interrupt DeInit */
HAL_NVIC_DisableIRQ(USART3_IRQn);
/* USER CODE BEGIN USART3_MspDeInit 1 */
/* USER CODE END USART3_MspDeInit 1 */
}
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
@@ -0,0 +1,256 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32h7xx_it.c
* @brief Interrupt Service Routines.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "stm32h7xx_it.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN TD */
/* USER CODE END TD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/* External variables --------------------------------------------------------*/
extern UART_HandleTypeDef huart3;
/* USER CODE BEGIN EV */
/* USER CODE END EV */
/******************************************************************************/
/* Cortex Processor Interruption and Exception Handlers */
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
/* USER CODE BEGIN NonMaskableInt_IRQn 0 */
/* USER CODE END NonMaskableInt_IRQn 0 */
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */
while (1)
{
}
/* USER CODE END NonMaskableInt_IRQn 1 */
}
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_HardFault_IRQn 0 */
/* USER CODE END W1_HardFault_IRQn 0 */
}
}
/**
* @brief This function handles Memory management fault.
*/
void MemManage_Handler(void)
{
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
/* USER CODE END MemoryManagement_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
/* USER CODE END W1_MemoryManagement_IRQn 0 */
}
}
/**
* @brief This function handles Pre-fetch fault, memory access fault.
*/
void BusFault_Handler(void)
{
/* USER CODE BEGIN BusFault_IRQn 0 */
/* USER CODE END BusFault_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_BusFault_IRQn 0 */
/* USER CODE END W1_BusFault_IRQn 0 */
}
}
/**
* @brief This function handles Undefined instruction or illegal state.
*/
void UsageFault_Handler(void)
{
/* USER CODE BEGIN UsageFault_IRQn 0 */
/* USER CODE END UsageFault_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_UsageFault_IRQn 0 */
}
}
#if 0
/* USER CODE END W1_UsageFault_IRQn 0 */
}
}
/**
* @brief This function handles System service call via SWI instruction.
*/
void SVC_Handler(void)
{
/* USER CODE BEGIN SVCall_IRQn 0 */
/* USER CODE END SVCall_IRQn 0 */
/* USER CODE BEGIN SVCall_IRQn 1 */
/* USER CODE END SVCall_IRQn 1 */
}
/**
* @brief This function handles Debug monitor.
*/
void DebugMon_Handler(void)
{
/* USER CODE BEGIN DebugMonitor_IRQn 0 */
#endif
void DebugMon_Handler(void)
{
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
}
#if 0
/* USER CODE END DebugMonitor_IRQn 0 */
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
/* USER CODE END DebugMonitor_IRQn 1 */
}
/**
* @brief This function handles Pendable request for system service.
*/
void PendSV_Handler(void)
{
/* USER CODE BEGIN PendSV_IRQn 0 */
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */
/* USER CODE END PendSV_IRQn 1 */
}
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
/* USER CODE BEGIN SysTick_IRQn 0 */
#endif
void SysTick_Handler(void)
{
extern void xPortSysTickHandler( void );
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
/* USER CODE BEGIN SysTick_IRQn 1 */
xPortSysTickHandler();
/* USER CODE END SysTick_IRQn 1 */
}
/******************************************************************************/
/* STM32H7xx Peripheral Interrupt Handlers */
/* Add here the Interrupt Handlers for the used peripherals. */
/* For the available peripheral interrupt handler names, */
/* please refer to the startup file (startup_stm32h7xx.s). */
/******************************************************************************/
/**
* @brief This function handles USART3 global interrupt.
*/
void USART3_IRQHandler(void)
{
/* USER CODE BEGIN USART3_IRQn 0 */
/* USER CODE END USART3_IRQn 0 */
HAL_UART_IRQHandler(&huart3);
/* USER CODE BEGIN USART3_IRQn 1 */
/* USER CODE END USART3_IRQn 1 */
}
/**
* @brief This function handles CM4 send event interrupt for CM7.
*/
void CM4_SEV_IRQHandler(void)
{
/* USER CODE BEGIN CM4_SEV_IRQn 0 */
/* USER CODE END CM4_SEV_IRQn 0 */
/* USER CODE BEGIN CM4_SEV_IRQn 1 */
/* USER CODE END CM4_SEV_IRQn 1 */
}
/**
* @brief This function handles HSEM1 global interrupt.
*/
void HSEM1_IRQHandler(void)
{
/* USER CODE BEGIN HSEM1_IRQn 0 */
/* USER CODE END HSEM1_IRQn 0 */
HAL_HSEM_IRQHandler();
/* USER CODE BEGIN HSEM1_IRQn 1 */
/* USER CODE END HSEM1_IRQn 1 */
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
@@ -0,0 +1,176 @@
/**
******************************************************************************
* @file syscalls.c
* @author Auto-generated by STM32CubeIDE
* @brief STM32CubeIDE Minimal System calls file
*
* For more information about which c-functions
* need which of these lowlevel functions
* please consult the Newlib libc-manual
******************************************************************************
* @attention
*
* Copyright (c) 2020-2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* 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 */
extern int __io_putchar(int ch) __attribute__((weak));
extern int __io_getchar(void) __attribute__((weak));
char *__env[1] = { 0 };
char **environ = __env;
/* Functions */
void initialise_monitor_handles()
{
}
int _getpid(void)
{
return 1;
}
int _kill(int pid, int sig)
{
(void)pid;
(void)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)
{
(void)file;
int DataIdx;
for (DataIdx = 0; DataIdx < len; DataIdx++)
{
*ptr++ = __io_getchar();
}
return len;
}
__attribute__((weak)) int _write(int file, char *ptr, int len)
{
(void)file;
int DataIdx;
for (DataIdx = 0; DataIdx < len; DataIdx++)
{
__io_putchar(*ptr++);
}
return len;
}
int _close(int file)
{
(void)file;
return -1;
}
int _fstat(int file, struct stat *st)
{
(void)file;
st->st_mode = S_IFCHR;
return 0;
}
int _isatty(int file)
{
(void)file;
return 1;
}
int _lseek(int file, int ptr, int dir)
{
(void)file;
(void)ptr;
(void)dir;
return 0;
}
int _open(char *path, int flags, ...)
{
(void)path;
(void)flags;
/* Pretend like we always fail */
return -1;
}
int _wait(int *status)
{
(void)status;
errno = ECHILD;
return -1;
}
int _unlink(char *name)
{
(void)name;
errno = ENOENT;
return -1;
}
int _times(struct tms *buf)
{
(void)buf;
return -1;
}
int _stat(char *file, struct stat *st)
{
(void)file;
st->st_mode = S_IFCHR;
return 0;
}
int _link(char *old, char *new)
{
(void)old;
(void)new;
errno = EMLINK;
return -1;
}
int _fork(void)
{
errno = EAGAIN;
return -1;
}
int _execve(char *name, char **argv, char **env)
{
(void)name;
(void)argv;
(void)env;
errno = ENOMEM;
return -1;
}
@@ -0,0 +1,79 @@
/**
******************************************************************************
* @file sysmem.c
* @author Generated by STM32CubeIDE
* @brief STM32CubeIDE System Memory calls file
*
* For more information about which C functions
* need which of these lowlevel functions
* please consult the newlib libc manual
******************************************************************************
* @attention
*
* Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Includes */
#include <errno.h>
#include <stdint.h>
/**
* Pointer to the current high watermark of the heap usage
*/
static uint8_t *__sbrk_heap_end = NULL;
/**
* @brief _sbrk() allocates memory to the newlib heap and is used by malloc
* and others from the C library
*
* @verbatim
* ############################################################################
* # .data # .bss # newlib heap # MSP stack #
* # # # # Reserved by _Min_Stack_Size #
* ############################################################################
* ^-- RAM start ^-- _end _estack, RAM end --^
* @endverbatim
*
* This implementation starts allocating at the '_end' linker symbol
* The '_Min_Stack_Size' linker symbol reserves a memory for the MSP stack
* The implementation considers '_estack' linker symbol to be RAM end
* NOTE: If the MSP stack, at any point during execution, grows larger than the
* reserved size, please increase the '_Min_Stack_Size'.
*
* @param incr Memory size
* @return Pointer to allocated memory
*/
void *_sbrk(ptrdiff_t incr)
{
extern uint8_t _end; /* Symbol defined in the linker script */
extern uint8_t _estack; /* Symbol defined in the linker script */
extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
const uint8_t *max_heap = (uint8_t *)stack_limit;
uint8_t *prev_heap_end;
/* Initialize heap end at first call */
if (NULL == __sbrk_heap_end)
{
__sbrk_heap_end = &_end;
}
/* Protect heap from growing into the reserved MSP stack */
if (__sbrk_heap_end + incr > max_heap)
{
errno = ENOMEM;
return (void *)-1;
}
prev_heap_end = __sbrk_heap_end;
__sbrk_heap_end += incr;
return (void *)prev_heap_end;
}
@@ -0,0 +1,768 @@
/**
******************************************************************************
* @file startup_stm32h755xx.s
* @author MCD Application Team
* @brief STM32H755xx Devices vector table for GCC based toolchain.
* This module performs:
* - Set the initial SP
* - Set the initial PC == Reset_Handler,
* - Set the vector table entries with the exceptions ISR address
* - Branches to main in the C library (which eventually
* calls main()).
* After Reset the Cortex-M processor is in Thread mode,
* priority is Privileged, and the Stack is set to Main.
******************************************************************************
* @attention
*
* Copyright (c) 2019 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
.syntax unified
.cpu cortex-m7
.fpu softvfp
.thumb
.global g_pfnVectors
.global Default_Handler
/* start address for the initialization values of the .data section.
defined in linker script */
.word _sidata
/* start address for the .data section. defined in linker script */
.word _sdata
/* end address for the .data section. defined in linker script */
.word _edata
/* start address for the .bss section. defined in linker script */
.word _sbss
/* end address for the .bss section. defined in linker script */
.word _ebss
/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
/**
* @brief This is the code that gets called when the processor first
* starts execution following a reset event. Only the absolutely
* necessary set is performed, after which the application
* supplied main() routine is called.
* @param None
* @retval : None
*/
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
ldr sp, =_estack /* set stack pointer */
/* Call the clock system initialization function.*/
bl SystemInit
/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
ldr r1, =_edata
ldr r2, =_sidata
movs r3, #0
b LoopCopyDataInit
CopyDataInit:
ldr r4, [r2, r3]
str r4, [r0, r3]
adds r3, r3, #4
LoopCopyDataInit:
adds r4, r0, r3
cmp r4, r1
bcc CopyDataInit
/* Zero fill the bss segment. */
ldr r2, =_sbss
ldr r4, =_ebss
movs r3, #0
b LoopFillZerobss
FillZerobss:
str r3, [r2]
adds r2, r2, #4
LoopFillZerobss:
cmp r2, r4
bcc FillZerobss
/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
bl main
bx lr
.size Reset_Handler, .-Reset_Handler
/**
* @brief This is the code that gets called when the processor receives an
* unexpected interrupt. This simply enters an infinite loop, preserving
* the system state for examination by a debugger.
* @param None
* @retval None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
.size Default_Handler, .-Default_Handler
/******************************************************************************
*
* The minimal vector table for a Cortex M. Note that the proper constructs
* must be placed on this to ensure that it ends up at physical address
* 0x0000.0000.
*
*******************************************************************************/
.section .isr_vector,"a",%progbits
.type g_pfnVectors, %object
g_pfnVectors:
.word _estack
.word Reset_Handler
.word NMI_Handler
.word HardFault_Handler
.word MemManage_Handler
.word BusFault_Handler
.word UsageFault_Handler
.word 0
.word 0
.word 0
.word 0
.word SVC_Handler
.word DebugMon_Handler
.word 0
.word PendSV_Handler
.word SysTick_Handler
/* External Interrupts */
.word WWDG_IRQHandler /* Window WatchDog Interrupt ( wwdg1_it, wwdg2_it) */
.word PVD_AVD_IRQHandler /* PVD/AVD through EXTI Line detection */
.word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
.word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
.word FLASH_IRQHandler /* FLASH */
.word RCC_IRQHandler /* RCC */
.word EXTI0_IRQHandler /* EXTI Line0 */
.word EXTI1_IRQHandler /* EXTI Line1 */
.word EXTI2_IRQHandler /* EXTI Line2 */
.word EXTI3_IRQHandler /* EXTI Line3 */
.word EXTI4_IRQHandler /* EXTI Line4 */
.word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
.word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
.word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
.word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
.word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
.word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
.word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
.word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
.word FDCAN1_IT0_IRQHandler /* FDCAN1 interrupt line 0 */
.word FDCAN2_IT0_IRQHandler /* FDCAN2 interrupt line 0 */
.word FDCAN1_IT1_IRQHandler /* FDCAN1 interrupt line 1 */
.word FDCAN2_IT1_IRQHandler /* FDCAN2 interrupt line 1 */
.word EXTI9_5_IRQHandler /* External Line[9:5]s */
.word TIM1_BRK_IRQHandler /* TIM1 Break interrupt */
.word TIM1_UP_IRQHandler /* TIM1 Update interrupt */
.word TIM1_TRG_COM_IRQHandler /* TIM1 Trigger and Commutation interrupt */
.word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
.word TIM2_IRQHandler /* TIM2 */
.word TIM3_IRQHandler /* TIM3 */
.word TIM4_IRQHandler /* TIM4 */
.word I2C1_EV_IRQHandler /* I2C1 Event */
.word I2C1_ER_IRQHandler /* I2C1 Error */
.word I2C2_EV_IRQHandler /* I2C2 Event */
.word I2C2_ER_IRQHandler /* I2C2 Error */
.word SPI1_IRQHandler /* SPI1 */
.word SPI2_IRQHandler /* SPI2 */
.word USART1_IRQHandler /* USART1 */
.word USART2_IRQHandler /* USART2 */
.word USART3_IRQHandler /* USART3 */
.word EXTI15_10_IRQHandler /* External Line[15:10]s */
.word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
.word 0 /* Reserved */
.word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
.word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
.word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
.word TIM8_CC_IRQHandler /* TIM8 Capture Compare */
.word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
.word FMC_IRQHandler /* FMC */
.word SDMMC1_IRQHandler /* SDMMC1 */
.word TIM5_IRQHandler /* TIM5 */
.word SPI3_IRQHandler /* SPI3 */
.word UART4_IRQHandler /* UART4 */
.word UART5_IRQHandler /* UART5 */
.word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
.word TIM7_IRQHandler /* TIM7 */
.word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
.word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
.word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
.word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
.word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
.word ETH_IRQHandler /* Ethernet */
.word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
.word FDCAN_CAL_IRQHandler /* FDCAN calibration unit interrupt */
.word CM7_SEV_IRQHandler /* CM7 Send event interrupt for CM4 */
.word CM4_SEV_IRQHandler /* CM4 Send event interrupt for CM7 */
.word 0 /* Reserved */
.word 0 /* Reserved */
.word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
.word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
.word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
.word USART6_IRQHandler /* USART6 */
.word I2C3_EV_IRQHandler /* I2C3 event */
.word I2C3_ER_IRQHandler /* I2C3 error */
.word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
.word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
.word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
.word OTG_HS_IRQHandler /* USB OTG HS */
.word DCMI_IRQHandler /* DCMI */
.word CRYP_IRQHandler /* Crypto */
.word HASH_RNG_IRQHandler /* Hash and Rng */
.word FPU_IRQHandler /* FPU */
.word UART7_IRQHandler /* UART7 */
.word UART8_IRQHandler /* UART8 */
.word SPI4_IRQHandler /* SPI4 */
.word SPI5_IRQHandler /* SPI5 */
.word SPI6_IRQHandler /* SPI6 */
.word SAI1_IRQHandler /* SAI1 */
.word LTDC_IRQHandler /* LTDC */
.word LTDC_ER_IRQHandler /* LTDC error */
.word DMA2D_IRQHandler /* DMA2D */
.word SAI2_IRQHandler /* SAI2 */
.word QUADSPI_IRQHandler /* QUADSPI */
.word LPTIM1_IRQHandler /* LPTIM1 */
.word CEC_IRQHandler /* HDMI_CEC */
.word I2C4_EV_IRQHandler /* I2C4 Event */
.word I2C4_ER_IRQHandler /* I2C4 Error */
.word SPDIF_RX_IRQHandler /* SPDIF_RX */
.word OTG_FS_EP1_OUT_IRQHandler /* USB OTG FS End Point 1 Out */
.word OTG_FS_EP1_IN_IRQHandler /* USB OTG FS End Point 1 In */
.word OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI */
.word OTG_FS_IRQHandler /* USB OTG FS */
.word DMAMUX1_OVR_IRQHandler /* DMAMUX1 Overrun interrupt */
.word HRTIM1_Master_IRQHandler /* HRTIM Master Timer global Interrupt */
.word HRTIM1_TIMA_IRQHandler /* HRTIM Timer A global Interrupt */
.word HRTIM1_TIMB_IRQHandler /* HRTIM Timer B global Interrupt */
.word HRTIM1_TIMC_IRQHandler /* HRTIM Timer C global Interrupt */
.word HRTIM1_TIMD_IRQHandler /* HRTIM Timer D global Interrupt */
.word HRTIM1_TIME_IRQHandler /* HRTIM Timer E global Interrupt */
.word HRTIM1_FLT_IRQHandler /* HRTIM Fault global Interrupt */
.word DFSDM1_FLT0_IRQHandler /* DFSDM Filter0 Interrupt */
.word DFSDM1_FLT1_IRQHandler /* DFSDM Filter1 Interrupt */
.word DFSDM1_FLT2_IRQHandler /* DFSDM Filter2 Interrupt */
.word DFSDM1_FLT3_IRQHandler /* DFSDM Filter3 Interrupt */
.word SAI3_IRQHandler /* SAI3 global Interrupt */
.word SWPMI1_IRQHandler /* Serial Wire Interface 1 global interrupt */
.word TIM15_IRQHandler /* TIM15 global Interrupt */
.word TIM16_IRQHandler /* TIM16 global Interrupt */
.word TIM17_IRQHandler /* TIM17 global Interrupt */
.word MDIOS_WKUP_IRQHandler /* MDIOS Wakeup Interrupt */
.word MDIOS_IRQHandler /* MDIOS global Interrupt */
.word JPEG_IRQHandler /* JPEG global Interrupt */
.word MDMA_IRQHandler /* MDMA global Interrupt */
.word 0 /* Reserved */
.word SDMMC2_IRQHandler /* SDMMC2 global Interrupt */
.word HSEM1_IRQHandler /* HSEM1 global Interrupt */
.word HSEM2_IRQHandler /* HSEM1 global Interrupt */
.word ADC3_IRQHandler /* ADC3 global Interrupt */
.word DMAMUX2_OVR_IRQHandler /* DMAMUX Overrun interrupt */
.word BDMA_Channel0_IRQHandler /* BDMA Channel 0 global Interrupt */
.word BDMA_Channel1_IRQHandler /* BDMA Channel 1 global Interrupt */
.word BDMA_Channel2_IRQHandler /* BDMA Channel 2 global Interrupt */
.word BDMA_Channel3_IRQHandler /* BDMA Channel 3 global Interrupt */
.word BDMA_Channel4_IRQHandler /* BDMA Channel 4 global Interrupt */
.word BDMA_Channel5_IRQHandler /* BDMA Channel 5 global Interrupt */
.word BDMA_Channel6_IRQHandler /* BDMA Channel 6 global Interrupt */
.word BDMA_Channel7_IRQHandler /* BDMA Channel 7 global Interrupt */
.word COMP1_IRQHandler /* COMP1 global Interrupt */
.word LPTIM2_IRQHandler /* LP TIM2 global interrupt */
.word LPTIM3_IRQHandler /* LP TIM3 global interrupt */
.word LPTIM4_IRQHandler /* LP TIM4 global interrupt */
.word LPTIM5_IRQHandler /* LP TIM5 global interrupt */
.word LPUART1_IRQHandler /* LP UART1 interrupt */
.word WWDG_RST_IRQHandler /* Window Watchdog reset interrupt (exti_d2_wwdg_it, exti_d1_wwdg_it) */
.word CRS_IRQHandler /* Clock Recovery Global Interrupt */
.word ECC_IRQHandler /* ECC diagnostic Global Interrupt */
.word SAI4_IRQHandler /* SAI4 global interrupt */
.word 0 /* Reserved */
.word HOLD_CORE_IRQHandler /* Hold core interrupt */
.word WAKEUP_PIN_IRQHandler /* Interrupt for all 6 wake-up pins */
.size g_pfnVectors, .-g_pfnVectors
/*******************************************************************************
*
* Provide weak aliases for each Exception handler to the Default_Handler.
* As they are weak aliases, any function with the same name will override
* this definition.
*
*******************************************************************************/
.weak NMI_Handler
.thumb_set NMI_Handler,Default_Handler
.weak HardFault_Handler
.thumb_set HardFault_Handler,Default_Handler
.weak MemManage_Handler
.thumb_set MemManage_Handler,Default_Handler
.weak BusFault_Handler
.thumb_set BusFault_Handler,Default_Handler
.weak UsageFault_Handler
.thumb_set UsageFault_Handler,Default_Handler
.weak SVC_Handler
.thumb_set SVC_Handler,Default_Handler
.weak DebugMon_Handler
.thumb_set DebugMon_Handler,Default_Handler
.weak PendSV_Handler
.thumb_set PendSV_Handler,Default_Handler
.weak SysTick_Handler
.thumb_set SysTick_Handler,Default_Handler
.weak WWDG_IRQHandler
.thumb_set WWDG_IRQHandler,Default_Handler
.weak PVD_AVD_IRQHandler
.thumb_set PVD_AVD_IRQHandler,Default_Handler
.weak TAMP_STAMP_IRQHandler
.thumb_set TAMP_STAMP_IRQHandler,Default_Handler
.weak RTC_WKUP_IRQHandler
.thumb_set RTC_WKUP_IRQHandler,Default_Handler
.weak FLASH_IRQHandler
.thumb_set FLASH_IRQHandler,Default_Handler
.weak RCC_IRQHandler
.thumb_set RCC_IRQHandler,Default_Handler
.weak EXTI0_IRQHandler
.thumb_set EXTI0_IRQHandler,Default_Handler
.weak EXTI1_IRQHandler
.thumb_set EXTI1_IRQHandler,Default_Handler
.weak EXTI2_IRQHandler
.thumb_set EXTI2_IRQHandler,Default_Handler
.weak EXTI3_IRQHandler
.thumb_set EXTI3_IRQHandler,Default_Handler
.weak EXTI4_IRQHandler
.thumb_set EXTI4_IRQHandler,Default_Handler
.weak DMA1_Stream0_IRQHandler
.thumb_set DMA1_Stream0_IRQHandler,Default_Handler
.weak DMA1_Stream1_IRQHandler
.thumb_set DMA1_Stream1_IRQHandler,Default_Handler
.weak DMA1_Stream2_IRQHandler
.thumb_set DMA1_Stream2_IRQHandler,Default_Handler
.weak DMA1_Stream3_IRQHandler
.thumb_set DMA1_Stream3_IRQHandler,Default_Handler
.weak DMA1_Stream4_IRQHandler
.thumb_set DMA1_Stream4_IRQHandler,Default_Handler
.weak DMA1_Stream5_IRQHandler
.thumb_set DMA1_Stream5_IRQHandler,Default_Handler
.weak DMA1_Stream6_IRQHandler
.thumb_set DMA1_Stream6_IRQHandler,Default_Handler
.weak ADC_IRQHandler
.thumb_set ADC_IRQHandler,Default_Handler
.weak FDCAN1_IT0_IRQHandler
.thumb_set FDCAN1_IT0_IRQHandler,Default_Handler
.weak FDCAN2_IT0_IRQHandler
.thumb_set FDCAN2_IT0_IRQHandler,Default_Handler
.weak FDCAN1_IT1_IRQHandler
.thumb_set FDCAN1_IT1_IRQHandler,Default_Handler
.weak FDCAN2_IT1_IRQHandler
.thumb_set FDCAN2_IT1_IRQHandler,Default_Handler
.weak EXTI9_5_IRQHandler
.thumb_set EXTI9_5_IRQHandler,Default_Handler
.weak TIM1_BRK_IRQHandler
.thumb_set TIM1_BRK_IRQHandler,Default_Handler
.weak TIM1_UP_IRQHandler
.thumb_set TIM1_UP_IRQHandler,Default_Handler
.weak TIM1_TRG_COM_IRQHandler
.thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
.weak TIM1_CC_IRQHandler
.thumb_set TIM1_CC_IRQHandler,Default_Handler
.weak TIM2_IRQHandler
.thumb_set TIM2_IRQHandler,Default_Handler
.weak TIM3_IRQHandler
.thumb_set TIM3_IRQHandler,Default_Handler
.weak TIM4_IRQHandler
.thumb_set TIM4_IRQHandler,Default_Handler
.weak I2C1_EV_IRQHandler
.thumb_set I2C1_EV_IRQHandler,Default_Handler
.weak I2C1_ER_IRQHandler
.thumb_set I2C1_ER_IRQHandler,Default_Handler
.weak I2C2_EV_IRQHandler
.thumb_set I2C2_EV_IRQHandler,Default_Handler
.weak I2C2_ER_IRQHandler
.thumb_set I2C2_ER_IRQHandler,Default_Handler
.weak SPI1_IRQHandler
.thumb_set SPI1_IRQHandler,Default_Handler
.weak SPI2_IRQHandler
.thumb_set SPI2_IRQHandler,Default_Handler
.weak USART1_IRQHandler
.thumb_set USART1_IRQHandler,Default_Handler
.weak USART2_IRQHandler
.thumb_set USART2_IRQHandler,Default_Handler
.weak USART3_IRQHandler
.thumb_set USART3_IRQHandler,Default_Handler
.weak EXTI15_10_IRQHandler
.thumb_set EXTI15_10_IRQHandler,Default_Handler
.weak RTC_Alarm_IRQHandler
.thumb_set RTC_Alarm_IRQHandler,Default_Handler
.weak TIM8_BRK_TIM12_IRQHandler
.thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
.weak TIM8_UP_TIM13_IRQHandler
.thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
.weak TIM8_TRG_COM_TIM14_IRQHandler
.thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
.weak TIM8_CC_IRQHandler
.thumb_set TIM8_CC_IRQHandler,Default_Handler
.weak DMA1_Stream7_IRQHandler
.thumb_set DMA1_Stream7_IRQHandler,Default_Handler
.weak FMC_IRQHandler
.thumb_set FMC_IRQHandler,Default_Handler
.weak SDMMC1_IRQHandler
.thumb_set SDMMC1_IRQHandler,Default_Handler
.weak TIM5_IRQHandler
.thumb_set TIM5_IRQHandler,Default_Handler
.weak SPI3_IRQHandler
.thumb_set SPI3_IRQHandler,Default_Handler
.weak UART4_IRQHandler
.thumb_set UART4_IRQHandler,Default_Handler
.weak UART5_IRQHandler
.thumb_set UART5_IRQHandler,Default_Handler
.weak TIM6_DAC_IRQHandler
.thumb_set TIM6_DAC_IRQHandler,Default_Handler
.weak TIM7_IRQHandler
.thumb_set TIM7_IRQHandler,Default_Handler
.weak DMA2_Stream0_IRQHandler
.thumb_set DMA2_Stream0_IRQHandler,Default_Handler
.weak DMA2_Stream1_IRQHandler
.thumb_set DMA2_Stream1_IRQHandler,Default_Handler
.weak DMA2_Stream2_IRQHandler
.thumb_set DMA2_Stream2_IRQHandler,Default_Handler
.weak DMA2_Stream3_IRQHandler
.thumb_set DMA2_Stream3_IRQHandler,Default_Handler
.weak DMA2_Stream4_IRQHandler
.thumb_set DMA2_Stream4_IRQHandler,Default_Handler
.weak ETH_IRQHandler
.thumb_set ETH_IRQHandler,Default_Handler
.weak ETH_WKUP_IRQHandler
.thumb_set ETH_WKUP_IRQHandler,Default_Handler
.weak FDCAN_CAL_IRQHandler
.thumb_set FDCAN_CAL_IRQHandler,Default_Handler
.weak CM7_SEV_IRQHandler
.thumb_set CM7_SEV_IRQHandler,Default_Handler
.weak CM4_SEV_IRQHandler
.thumb_set CM4_SEV_IRQHandler,Default_Handler
.weak DMA2_Stream5_IRQHandler
.thumb_set DMA2_Stream5_IRQHandler,Default_Handler
.weak DMA2_Stream6_IRQHandler
.thumb_set DMA2_Stream6_IRQHandler,Default_Handler
.weak DMA2_Stream7_IRQHandler
.thumb_set DMA2_Stream7_IRQHandler,Default_Handler
.weak USART6_IRQHandler
.thumb_set USART6_IRQHandler,Default_Handler
.weak I2C3_EV_IRQHandler
.thumb_set I2C3_EV_IRQHandler,Default_Handler
.weak I2C3_ER_IRQHandler
.thumb_set I2C3_ER_IRQHandler,Default_Handler
.weak OTG_HS_EP1_OUT_IRQHandler
.thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler
.weak OTG_HS_EP1_IN_IRQHandler
.thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler
.weak OTG_HS_WKUP_IRQHandler
.thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler
.weak OTG_HS_IRQHandler
.thumb_set OTG_HS_IRQHandler,Default_Handler
.weak DCMI_IRQHandler
.thumb_set DCMI_IRQHandler,Default_Handler
.weak CRYP_IRQHandler
.thumb_set CRYP_IRQHandler,Default_Handler
.weak HASH_RNG_IRQHandler
.thumb_set HASH_RNG_IRQHandler,Default_Handler
.weak FPU_IRQHandler
.thumb_set FPU_IRQHandler,Default_Handler
.weak UART7_IRQHandler
.thumb_set UART7_IRQHandler,Default_Handler
.weak UART8_IRQHandler
.thumb_set UART8_IRQHandler,Default_Handler
.weak SPI4_IRQHandler
.thumb_set SPI4_IRQHandler,Default_Handler
.weak SPI5_IRQHandler
.thumb_set SPI5_IRQHandler,Default_Handler
.weak SPI6_IRQHandler
.thumb_set SPI6_IRQHandler,Default_Handler
.weak SAI1_IRQHandler
.thumb_set SAI1_IRQHandler,Default_Handler
.weak LTDC_IRQHandler
.thumb_set LTDC_IRQHandler,Default_Handler
.weak LTDC_ER_IRQHandler
.thumb_set LTDC_ER_IRQHandler,Default_Handler
.weak DMA2D_IRQHandler
.thumb_set DMA2D_IRQHandler,Default_Handler
.weak SAI2_IRQHandler
.thumb_set SAI2_IRQHandler,Default_Handler
.weak QUADSPI_IRQHandler
.thumb_set QUADSPI_IRQHandler,Default_Handler
.weak LPTIM1_IRQHandler
.thumb_set LPTIM1_IRQHandler,Default_Handler
.weak CEC_IRQHandler
.thumb_set CEC_IRQHandler,Default_Handler
.weak I2C4_EV_IRQHandler
.thumb_set I2C4_EV_IRQHandler,Default_Handler
.weak I2C4_ER_IRQHandler
.thumb_set I2C4_ER_IRQHandler,Default_Handler
.weak SPDIF_RX_IRQHandler
.thumb_set SPDIF_RX_IRQHandler,Default_Handler
.weak OTG_FS_EP1_OUT_IRQHandler
.thumb_set OTG_FS_EP1_OUT_IRQHandler,Default_Handler
.weak OTG_FS_EP1_IN_IRQHandler
.thumb_set OTG_FS_EP1_IN_IRQHandler,Default_Handler
.weak OTG_FS_WKUP_IRQHandler
.thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
.weak OTG_FS_IRQHandler
.thumb_set OTG_FS_IRQHandler,Default_Handler
.weak DMAMUX1_OVR_IRQHandler
.thumb_set DMAMUX1_OVR_IRQHandler,Default_Handler
.weak HRTIM1_Master_IRQHandler
.thumb_set HRTIM1_Master_IRQHandler,Default_Handler
.weak HRTIM1_TIMA_IRQHandler
.thumb_set HRTIM1_TIMA_IRQHandler,Default_Handler
.weak HRTIM1_TIMB_IRQHandler
.thumb_set HRTIM1_TIMB_IRQHandler,Default_Handler
.weak HRTIM1_TIMC_IRQHandler
.thumb_set HRTIM1_TIMC_IRQHandler,Default_Handler
.weak HRTIM1_TIMD_IRQHandler
.thumb_set HRTIM1_TIMD_IRQHandler,Default_Handler
.weak HRTIM1_TIME_IRQHandler
.thumb_set HRTIM1_TIME_IRQHandler,Default_Handler
.weak HRTIM1_FLT_IRQHandler
.thumb_set HRTIM1_FLT_IRQHandler,Default_Handler
.weak DFSDM1_FLT0_IRQHandler
.thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler
.weak DFSDM1_FLT1_IRQHandler
.thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler
.weak DFSDM1_FLT2_IRQHandler
.thumb_set DFSDM1_FLT2_IRQHandler,Default_Handler
.weak DFSDM1_FLT3_IRQHandler
.thumb_set DFSDM1_FLT3_IRQHandler,Default_Handler
.weak SAI3_IRQHandler
.thumb_set SAI3_IRQHandler,Default_Handler
.weak SWPMI1_IRQHandler
.thumb_set SWPMI1_IRQHandler,Default_Handler
.weak TIM15_IRQHandler
.thumb_set TIM15_IRQHandler,Default_Handler
.weak TIM16_IRQHandler
.thumb_set TIM16_IRQHandler,Default_Handler
.weak TIM17_IRQHandler
.thumb_set TIM17_IRQHandler,Default_Handler
.weak MDIOS_WKUP_IRQHandler
.thumb_set MDIOS_WKUP_IRQHandler,Default_Handler
.weak MDIOS_IRQHandler
.thumb_set MDIOS_IRQHandler,Default_Handler
.weak JPEG_IRQHandler
.thumb_set JPEG_IRQHandler,Default_Handler
.weak MDMA_IRQHandler
.thumb_set MDMA_IRQHandler,Default_Handler
.weak SDMMC2_IRQHandler
.thumb_set SDMMC2_IRQHandler,Default_Handler
.weak HSEM1_IRQHandler
.thumb_set HSEM1_IRQHandler,Default_Handler
.weak HSEM2_IRQHandler
.thumb_set HSEM2_IRQHandler,Default_Handler
.weak ADC3_IRQHandler
.thumb_set ADC3_IRQHandler,Default_Handler
.weak DMAMUX2_OVR_IRQHandler
.thumb_set DMAMUX2_OVR_IRQHandler,Default_Handler
.weak BDMA_Channel0_IRQHandler
.thumb_set BDMA_Channel0_IRQHandler,Default_Handler
.weak BDMA_Channel1_IRQHandler
.thumb_set BDMA_Channel1_IRQHandler,Default_Handler
.weak BDMA_Channel2_IRQHandler
.thumb_set BDMA_Channel2_IRQHandler,Default_Handler
.weak BDMA_Channel3_IRQHandler
.thumb_set BDMA_Channel3_IRQHandler,Default_Handler
.weak BDMA_Channel4_IRQHandler
.thumb_set BDMA_Channel4_IRQHandler,Default_Handler
.weak BDMA_Channel5_IRQHandler
.thumb_set BDMA_Channel5_IRQHandler,Default_Handler
.weak BDMA_Channel6_IRQHandler
.thumb_set BDMA_Channel6_IRQHandler,Default_Handler
.weak BDMA_Channel7_IRQHandler
.thumb_set BDMA_Channel7_IRQHandler,Default_Handler
.weak COMP1_IRQHandler
.thumb_set COMP1_IRQHandler,Default_Handler
.weak LPTIM2_IRQHandler
.thumb_set LPTIM2_IRQHandler,Default_Handler
.weak LPTIM3_IRQHandler
.thumb_set LPTIM3_IRQHandler,Default_Handler
.weak LPTIM4_IRQHandler
.thumb_set LPTIM4_IRQHandler,Default_Handler
.weak LPTIM5_IRQHandler
.thumb_set LPTIM5_IRQHandler,Default_Handler
.weak LPUART1_IRQHandler
.thumb_set LPUART1_IRQHandler,Default_Handler
.weak WWDG_RST_IRQHandler
.thumb_set WWDG_RST_IRQHandler,Default_Handler
.weak CRS_IRQHandler
.thumb_set CRS_IRQHandler,Default_Handler
.weak ECC_IRQHandler
.thumb_set ECC_IRQHandler,Default_Handler
.weak SAI4_IRQHandler
.thumb_set SAI4_IRQHandler,Default_Handler
.weak HOLD_CORE_IRQHandler
.thumb_set HOLD_CORE_IRQHandler,Default_Handler
.weak WAKEUP_PIN_IRQHandler
.thumb_set WAKEUP_PIN_IRQHandler,Default_Handler
Whitespace-only changes.
+205
View File
@@ -0,0 +1,205 @@
##########################################################################################################################
# Author: Thorsten Kimmel
# Project: DHBW-Embedded-Systems-TES
##########################################################################################################################
# ------------------------------------------------
# Generic Makefile (based on gcc)
#
# ChangeLog :
# 2026-09-25 - first version
# ------------------------------------------------
######################################
# target
######################################
TARGET = Stepper-H7-CM7
MK_CORE := M7
LDFLAGS :=
CFLAGS :=
C_SOURCES :=
C_INCLUDES :=
ASM_SOURCES :=
C_DEFS :=
AS_DEFS :=
# cpu
CPU = -mcpu=cortex-m7
#######################################
# additional common includes
#######################################
include ../common.mk
######################################
# building variables
######################################
# debug build? 1 = -g, 2 = -g3
DEBUG = 2
# optimization
OPT = -O0
# stack size limit of single function (warning)
SLIMIT = 2048
#######################################
# paths
#######################################
# Build path
BUILD_DIR = build
######################################
# source
######################################
# C sources
C_SOURCES += Core/Src/main.c \
Core/Src/newlib_abs.c \
Core/Src/stm32h7xx_hal_msp.c \
Core/Src/stm32h7xx_it.c \
$(wildcard Core/Src/Console/*.c) \
$(wildcard Core/Src/IPC/*.c) \
$(wildcard Core/Src/Spindle/*.c) \
$(wildcard Core/Src/Stepper/*.c) \
$(wildcard OPENAMP/*.c) \
# ASM sources
ASM_SOURCES += Core/Startup/startup_stm32h755zitx.s
#######################################
# CFLAGS
#######################################
# fpu
# NONE for Cortex-M0/M0+/M3
# float-abi
FPU = -mfpu=fpv5-d16
FLOAT-ABI = -mfloat-abi=hard
# mcu
MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI)
# macros for gcc
# AS defines
AS_DEFS +=
# C defines
C_DEFS += -DCORE_CM7 \
-DDEBUG \
-DVIRTIO_MASTER_ONLY
# AS includes
AS_INCLUDES +=
# C includes
C_INCLUDES += -ICore/Inc \
-ICore/Inc/Console \
-ICore/Inc/IPC \
-ICore/Inc/Spindle \
-ICore/Inc/Stepper \
-IOPENAMP
# compile gcc flags
ASFLAGS += $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -fstack-usage -Wstack-usage=$(SLIMIT) -Wno-unused-parameter -Wall -Wextra -Wundef -Wshadow -fno-common -fdata-sections -ffunction-sections
CFLAGS += $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -fstack-usage -Wstack-usage=$(SLIMIT) -Wno-unused-parameter -Wall -Wextra -Wundef -Wshadow -fno-common -fdata-sections -ffunction-sections
ifeq ($(DEBUG), 1)
CFLAGS += -g -gdwarf-2
endif
ifeq ($(DEBUG), 2)
CFLAGS += -g3 -gdwarf-2
endif
ifeq ($(OS),Windows_NT)
EXEPOSTFIX = .exe
else
EXEPOSTFIX =
endif
#######################################
# LDFLAGS
#######################################
# link script
LDSCRIPT = STM32H755ZITX_FLASH.ld
# libraries
LIBS = -lc -lm -lnosys
LIBDIR =
# -specs=nano.specs
LDFLAGS += -lc -lrdimon -u _printf_float -Wa,-adhln -g $(MCU) -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref,--gc-sections
# default action: build all
.PHONY: all
all: $(BUILD_DIR)/$(TARGET).elf #$(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin $(BUILD_DIR)/$(TARGET).S
#######################################
# build the application
#######################################
# list of objects
OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
vpath %.c $(sort $(dir $(C_SOURCES)))
# list of ASM program objects
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
vpath %.s $(sort $(dir $(ASM_SOURCES)))
$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
@echo " $(MK_CORE)-CC $<"
@$(CC)$(EXEPOSTFIX) -c $(CFLAGS) -MMD -MP -MF"$(@:%.o=%.d)" $< -o $@
$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
@echo " $(MK_CORE)-AS $<"
@$(AS)$(EXEPOSTFIX) -c $(CFLAGS) $< -o $@
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
@echo " $(MK_CORE)-ELF $(BUILD_DIR)/$(TARGET).elf"
@$(CC)$(EXEPOSTFIX) $(OBJECTS) $(LDFLAGS) -o $@
@$(SZ)$(EXEPOSTFIX) $@
$(BUILD_DIR)/%.hex: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
@echo " $(MK_CORE)-OBJ $<"
@$(HEX)$(EXEPOSTFIX) $< $@
$(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
@echo " $(MK_CORE)-OBJ $<"
@$(BIN)$(EXEPOSTFIX) $< $@
$(BUILD_DIR)/%.S: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
@echo " $(MK_CORE)-OBJ $<"
$(OD)$(EXEPOSTFIX) -l -m armv7e-m --disassemble-all $< > $@
$(BUILD_DIR):
mkdir $@
#######################################
# clean up
#######################################
clean:
-rm -fR $(BUILD_DIR)
#######################################
# clean up
#######################################
setup:
@echo 'installation only works on linux and on linux subsystem for windows 10'
@sudo apt-get update
@sudo apt-get install clang clang-tools gcc-multilib g++-multilib build-essential gcc-arm-none-eabi binutils-arm-none-eabi -y
#######################################
# dependencies
#######################################
-include $(wildcard $(BUILD_DIR)/*.d)
include ../sca.mk
# *** EOF ***
Whitespace-only changes.
@@ -0,0 +1,213 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* File Name : mbox_hsem.c
* Description : This file provides code for the configuration
* of the mailbox based on hardware semaphore.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "openamp/open_amp.h"
#include "stm32h7xx_hal.h"
#include "openamp_conf.h"
#include "mbox_hsem.h"
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN Define */
/* USER CODE END Define */
#define RX_NO_MSG 0
#define RX_NEW_MSG 1
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
static uint32_t msg_received = RX_NO_MSG;
/* Private functions ---------------------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
void HAL_HSEM_FreeCallback(uint32_t SemMask)
{
/* USER CODE BEGIN HSEM_FREE_CALLBACK */
/* USER CODE END HSEM_FREE_CALLBACK */
/* Prevent unused argument(s) compilation warning */
UNUSED(SemMask);
msg_received = RX_NEW_MSG;
#ifdef CORE_CM7
/* USER CODE BEGIN PRE_HSEM_FREE_CALLBACK_CM7 */
/* USER CODE END PRE_HSEM_FREE_CALLBACK_CM7 */
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_1));
/* USER CODE BEGIN POST_HSEM_FREE_CALLBACK_CM7 */
/* USER CODE END POST_HSEM_FREE_CALLBACK_CM7 */
#endif
#ifdef CORE_CM4
/* USER CODE BEGIN PRE_HSEM_FREE_CALLBACK_CM4 */
/* USER CODE END PRE_HSEM_FREE_CALLBACK_CM4 */
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0));
/* USER CODE BEGIN POST_HSEM_FREE_CALLBACK_CM4 */
/* USER CODE END POST_HSEM_FREE_CALLBACK_CM4 */
#endif
}
/**
* @brief Initialize MAILBOX with HSEM peripheral
* @param None
* @retval : Operation result
*/
int MAILBOX_Init(void)
{
/* USER CODE BEGIN MAILBOX_INIT */
/* USER CODE END MAILBOX_INIT */
__HAL_RCC_HSEM_CLK_ENABLE();
#ifdef CORE_CM7
/* USER CODE BEGIN PRE_MAILBOX_INIT_CM7 */
/* USER CODE END PRE_MAILBOX_INIT_CM7 */
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_1));
/* USER CODE BEGIN POST_MAILBOX_INIT_CM7 */
/* USER CODE END POST_MAILBOX_INIT_CM7 */
#endif
#ifdef CORE_CM4
/* USER CODE BEGIN MAILBOX_INIT_CM4 */
/* USER CODE END MAILBOX_INIT_CM4 */
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0));
/* USER CODE BEGIN POST_MAILBOX_INIT_CM4 */
/* USER CODE END POST_MAILBOX_INIT_CM4 */
#endif
return 0;
}
/**
* @brief Initialize MAILBOX with HSEM peripheral
* @param virtio device
* @retval : Operation result
*/
int MAILBOX_Poll(struct virtio_device *vdev)
{
/* If we got an interrupt, ask for the corresponding virtqueue processing */
if (msg_received == RX_NEW_MSG)
{
/* USER CODE BEGIN NEW_MSG */
/* USER CODE END NEW_MSG */
#ifdef CORE_CM7
/* USER CODE BEGIN PRE_NEW_MSG_CM7 */
/* USER CODE END PRE_NEW_MSG_CM7 */
rproc_virtio_notified(vdev, VRING0_ID);
/* USER CODE BEGIN POST_NEW_MSG_CM7 */
/* USER CODE END POST_NEW_MSG_CM7 */
#endif
#ifdef CORE_CM4
/* USER CODE BEGIN PRE_NEW_MSG_CM4 */
/* USER CODE END PRE_NEW_MSG_CM4 */
rproc_virtio_notified(vdev, VRING1_ID);
/* USER CODE BEGIN POST_NEW_MSG_CM4 */
/* USER CODE END POST_NEW_MSG_CM4 */
#endif
msg_received = RX_NO_MSG;
return 0;
}
/* USER CODE BEGIN NO_MSG */
/* USER CODE END NO_MSG */
return -EAGAIN;
}
/**
* @brief Callback function called by OpenAMP MW to notify message processing
* @param VRING id
* @retval Operation result
*/
int MAILBOX_Notify(void *priv, uint32_t id)
{
(void)priv;
(void)id;
/* USER CODE BEGIN MAILBOX_NOTIFY*/
/* USER CODE END MAILBOX_NOTIFY */
#ifdef CORE_CM7
/* USER CODE BEGIN PRE_MAILBOX_NOTIFY_CM7 */
/* USER CODE END PRE_MAILBOX_NOTIFY_CM7 */
HAL_HSEM_FastTake(HSEM_ID_0);
HAL_HSEM_Release(HSEM_ID_0,0);
/* USER CODE BEGIN POST_MAILBOX_NOTIFY_CM7 */
/* USER CODE END POST_MAILBOX_NOTIFY_CM7 */
#endif
#ifdef CORE_CM4
/* USER CODE BEGIN PRE_MAILBOX_NOTIFY_CM4 */
/* USER CODE END PRE_MAILBOX_NOTIFY_CM4 */
HAL_HSEM_FastTake(HSEM_ID_1);
HAL_HSEM_Release(HSEM_ID_1,0);
/* USER CODE BEGIN POST_MAILBOX_NOTIFY_CM4 */
/* USER CODE END POST_MAILBOX_NOTIFY_CM4 */
#endif
return 0;
}
@@ -0,0 +1,62 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file mabox_hsem.h
* @author MCD Application Team
* @brief header for mbox_hsem.c module
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef MBOX_HSEM_H_
#define MBOX_HSEM_H_
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#define HSEM_ID_0 0 /* CM7 to CM4 Notification */
#define HSEM_ID_1 1 /* CM4 to CM7 Notification */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
int MAILBOX_Notify(void *priv, uint32_t id);
int MAILBOX_Init(void);
int MAILBOX_Poll(struct virtio_device *vdev);
#endif /* MBOX_HSEM_H_ */
@@ -0,0 +1,285 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file openamp.c
* @author MCD Application Team
* @brief Code for openamp applications
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
#include "openamp.h"
#include "rsc_table.h"
#include "metal/sys.h"
#include "metal/device.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "FreeRTOS.h"
#include "task.h"
/* USER CODE END Includes */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN Define */
/* USER CODE END Define */
#define SHM_DEVICE_NAME "STM32_SHM"
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
static struct metal_io_region *shm_io;
static struct metal_io_region *rsc_io;
static struct shared_resource_table *rsc_table;
static struct rpmsg_virtio_shm_pool shpool;
static struct rpmsg_virtio_device rvdev;
static metal_phys_addr_t shm_physmap;
struct metal_device shm_device = {
.name = SHM_DEVICE_NAME,
.num_regions = 2,
.regions = {
{.virt = NULL}, /* shared memory */
{.virt = NULL}, /* rsc_table memory */
},
.node = { NULL },
.irq_num = 0,
.irq_info = NULL
};
/* Private functions ---------------------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
static int OPENAMP_shmem_init(int RPMsgRole)
{
int status = 0;
struct metal_device *device = NULL;
struct metal_init_params metal_params = METAL_INIT_DEFAULTS;
void* rsc_tab_addr = NULL;
int rsc_size = 0;
/* USER CODE BEGIN PRE_LIB_METAL_INIT */
/* USER CODE END PRE_LIB_METAL_INIT */
metal_init(&metal_params);
status = metal_register_generic_device(&shm_device);
if (status != 0) {
return status;
}
status = metal_device_open("generic", SHM_DEVICE_NAME, &device);
if (status != 0) {
return status;
}
shm_physmap = SHM_START_ADDRESS;
metal_io_init(&device->regions[0], (void *)SHM_START_ADDRESS, &shm_physmap,
SHM_SIZE, -1, 0, NULL);
/* USER CODE BEGIN PRE_SHM_IO_INIT */
/* USER CODE END PRE_SHM_IO_INIT */
shm_io = metal_device_io_region(device, 0);
if (shm_io == NULL) {
return -1;
}
/* USER CODE BEGIN POST_SHM_IO_INIT */
/* USER CODE END POST_SHM_IO_INIT */
/* Initialize resources table variables */
resource_table_init(RPMsgRole, &rsc_tab_addr, &rsc_size);
rsc_table = (struct shared_resource_table *)rsc_tab_addr;
if (!rsc_table)
{
return -1;
}
/* USER CODE BEGIN POST_RSC_TABLE_INIT */
/* USER CODE END POST_RSC_TABLE_INIT */
metal_io_init(&device->regions[1], rsc_table,
(metal_phys_addr_t *)rsc_table, rsc_size, -1U, 0, NULL);
/* USER CODE BEGIN POST_METAL_IO_INIT */
/* USER CODE END POST_METAL_IO_INIT */
rsc_io = metal_device_io_region(device, 1);
if (rsc_io == NULL) {
return -1;
}
/* USER CODE BEGIN POST_RSC_IO_INIT */
/* USER CODE END POST_RSC_IO_INIT */
return 0;
}
int MX_OPENAMP_Init(int RPMsgRole, rpmsg_ns_bind_cb ns_bind_cb)
{
struct fw_rsc_vdev_vring *vring_rsc = NULL;
struct virtio_device *vdev = NULL;
int status = 0;
/* USER CODE BEGIN MAILBOX_Init */
/* USER CODE END MAIL_BOX_Init */
MAILBOX_Init();
/* Libmetal Initilalization */
status = OPENAMP_shmem_init(RPMsgRole);
if(status)
{
return status;
}
/* USER CODE BEGIN PRE_VIRTIO_INIT */
/* USER CODE END PRE_VIRTIO_INIT */
vdev = rproc_virtio_create_vdev(RPMsgRole, VDEV_ID, &rsc_table->vdev,
rsc_io, NULL, MAILBOX_Notify, NULL);
if (vdev == NULL)
{
return -1;
}
rproc_virtio_wait_remote_ready(vdev);
/* USER CODE BEGIN POST_VIRTIO_INIT */
/* USER CODE END POST_VIRTIO_INIT */
vring_rsc = &rsc_table->vring0;
status = rproc_virtio_init_vring(vdev, 0, vring_rsc->notifyid,
(void *)vring_rsc->da, shm_io,
vring_rsc->num, vring_rsc->align);
if (status != 0)
{
return status;
}
/* USER CODE BEGIN POST_VRING0_INIT */
/* USER CODE END POST_VRING0_INIT */
vring_rsc = &rsc_table->vring1;
status = rproc_virtio_init_vring(vdev, 1, vring_rsc->notifyid,
(void *)vring_rsc->da, shm_io,
vring_rsc->num, vring_rsc->align);
if (status != 0)
{
return status;
}
/* USER CODE BEGIN POST_VRING1_INIT */
/* USER CODE END POST_VRING1_INIT */
rpmsg_virtio_init_shm_pool(&shpool, (void *)VRING_BUFF_ADDRESS,
(size_t)SHM_SIZE);
rpmsg_init_vdev(&rvdev, vdev, ns_bind_cb, shm_io, &shpool);
/* USER CODE BEGIN POST_RPMSG_INIT */
/* USER CODE END POST_RPMSG_INIT */
return 0;
}
void OPENAMP_DeInit()
{
/* USER CODE BEGIN PRE_OPENAMP_DEINIT */
/* USER CODE END PRE_OPENAMP_DEINIT */
rpmsg_deinit_vdev(&rvdev);
metal_finish();
/* USER CODE BEGIN POST_OPENAMP_DEINIT */
/* USER CODE END POST_OPENAMP_DEINIT */
}
void OPENAMP_init_ept(struct rpmsg_endpoint *ept)
{
/* USER CODE BEGIN PRE_EP_INIT */
/* USER CODE END PRE_EP_INIT */
rpmsg_init_ept(ept, "", RPMSG_ADDR_ANY, RPMSG_ADDR_ANY, NULL, NULL);
/* USER CODE BEGIN POST_EP_INIT */
/* USER CODE END POST_EP_INIT */
}
int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name,
uint32_t dest, rpmsg_ept_cb cb,
rpmsg_ns_unbind_cb unbind_cb)
{
int ret = 0;
/* USER CODE BEGIN PRE_EP_CREATE */
/* USER CODE END PRE_EP_CREATE */
ret = rpmsg_create_ept(ept, &rvdev.rdev, name, RPMSG_ADDR_ANY, dest, cb,
unbind_cb);
/* USER CODE BEGIN POST_EP_CREATE */
/* USER CODE END POST_EP_CREATE */
return ret;
}
void OPENAMP_check_for_message(void)
{
/* USER CODE BEGIN MSG_CHECK */
/* USER CODE END MSG_CHECK */
MAILBOX_Poll(rvdev.vdev);
}
void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept)
{
/* USER CODE BEGIN EP_READY */
/* USER CODE END EP_READY */
while(!is_rpmsg_ept_ready(rp_ept))
{
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
MAILBOX_Poll(rvdev.vdev);
/* USER CODE BEGIN 1 */
if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING) {
vTaskDelay(pdMS_TO_TICKS(1));
}
/* USER CODE END 1 */
}
}
@@ -0,0 +1,87 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file openamp.h
* @brief Header for openamp applications
* @author MCD Application Team
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __openamp_H
#define __openamp_H
#ifdef __cplusplus
extern "C" {
#endif
#include "openamp/open_amp.h"
#include "openamp_conf.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#define OPENAMP_send rpmsg_send
#define OPENAMP_destroy_ept rpmsg_destroy_ept
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Initialize the openamp framework*/
int MX_OPENAMP_Init(int RPMsgRole, rpmsg_ns_bind_cb ns_bind_cb);
/* Deinitialize the openamp framework*/
void OPENAMP_DeInit(void);
/* Initialize the endpoint struct*/
void OPENAMP_init_ept(struct rpmsg_endpoint *ept);
/* Create and register the endpoint */
int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name,
uint32_t dest, rpmsg_ept_cb cb,
rpmsg_ns_unbind_cb unbind_cb);
/* Check for new rpmsg reception */
void OPENAMP_check_for_message(void);
/* Wait loop on endpoint ready ( message dest address is know)*/
void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept);
#ifdef __cplusplus
}
#endif
#endif /*__openamp_H */
@@ -0,0 +1,251 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file openamp_conf.h
* @author MCD Application Team
* @brief Configuration file for OpenAMP MW
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
*
******************************************************************************
*/
#if defined(METAL_MAX_DEVICE_REGIONS)
# undef METAL_MAX_DEVICE_REGIONS
# define METAL_MAX_DEVICE_REGIONS 32
#endif
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __OPENAMP_CONF__H__
#define __OPENAMP_CONF__H__
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#if defined (__LOG_TRACE_IO_) || defined(__LOG_UART_IO_)
#include "openamp_log.h"
#endif
/* ########################## Mailbox Interface Selection ############################## */
/**
* @brief This is the list of Mailbox interface to be used in the OpenAMP MW
* Please note that not all interfaces are supported by a STM32 device
*/
//#define MAILBOX_IPCC_IF_ENABLED
#define MAILBOX_HSEM_IF_ENABLED
/* Includes ------------------------------------------------------------------*/
/**
* @brief Include Mailbox interface header file
*/
#ifdef MAILBOX_IPCC_IF_ENABLED
#include "mbox_ipcc.h"
#endif /* MAILBOX_IPCC_IF_ENABLED */
#ifdef MAILBOX_HSEM_IF_ENABLED
#include "mbox_hsem.h"
#endif /* MAILBOX_HSEM_IF_ENABLED */
/* ########################## Virtual Diver Module Selection ############################## */
/**
* @brief This is the list of modules to be used in the OpenAMP Virtual driver module
* Please note that virtual driver are not supported on all stm32 families
*/
//#define VIRTUAL_UART_MODULE_ENABLED
//#define VIRTUAL_I2C_MODULE_ENABLED
/* Includes ------------------------------------------------------------------*/
/**
* @brief Include Virtual Driver module's header file
*/
#ifdef VIRTUAL_UART_MODULE_ENABLED
#include "virt_uart.h"
#endif /* VIRTUAL_UART_MODULE_ENABLED */
#ifdef VIRTUAL_I2C_MODULE_ENABLED
#include "virt_i2c.h"
#endif /* VIRTUAL_I2C_MODULE_ENABLED */
/* ########################## Linux Master Selection ############################## */
/**
* @brief Due to Linux compatibility, it's important to distinguish if the MASTER is Linux or not.
* In that case, the LINUX_RPROC_MASTER define is required
*/
//#define LINUX_RPROC_MASTER
/* USER CODE BEGIN INCLUDE */
/* USER CODE END INCLUDE */
/** @addtogroup OPENAMP_MW
* @{
*/
/** @defgroup OPENAMP_CONF OPENAMP_CONF
* @brief Configuration file for Openamp mw
* @{
*/
/** @defgroup OPENAMP_CONF_Exported_Variables OPENAMP_CONF_Exported_Variables
* @brief Public variables.
* @{
*/
/**
* @}
*/
/** @defgroup OPENAMP_CONF_Exported_Defines OPENAMP_CONF_Exported_Defines
* @brief Defines for configuration of the Openamp mw
* @{
*/
#if defined (__ICCARM__)
/*
* For IAR, the .icf file should contain the following lines:
* define symbol __OPENAMP_region_start__ = BASE_ADDRESS; (0x38000400 for example)
* define symbol __OPENAMP_region_size__ = MEM_SIZE; (0xB000 as example)
*
* export symbol __OPENAMP_region_start__;
* export symbol __OPENAMP_region_size__;
*/
extern const uint32_t __OPENAMP_region_start__;
extern const uint8_t __OPENAMP_region_size__;
#define SHM_START_ADDRESS ((metal_phys_addr_t)&__OPENAMP_region_start__)
#define SHM_SIZE ((size_t)&__OPENAMP_region_size__)
#elif defined(__CC_ARM) || defined (__clang__)
/*
* For MDK-ARM, the scatter file .sct should contain the following line:
* LR_IROM1 .... {
* ...
* __OpenAMP_SHMEM__ 0x38000400 EMPTY 0x0000B000 {} ; Shared Memory area used by OpenAMP
* }
*
*/
extern unsigned int Image$$__OpenAMP_SHMEM__$$Base;
extern unsigned int Image$$__OpenAMP_SHMEM__$$ZI$$Length;
#define SHM_START_ADDRESS (unsigned int)&Image$$__OpenAMP_SHMEM__$$Base
#define SHM_SIZE ((size_t)&Image$$__OpenAMP_SHMEM__$$ZI$$Length)
#else
/*
* for GCC add the following content to the .ld file:
* MEMORY
* {
* ...
* OPEN_AMP_SHMEM (xrw) : ORIGIN = 0x38000400, LENGTH = 63K
* }
* __OPENAMP_region_start__ = ORIGIN(OPEN_AMP_SHMEM);
* __OPENAMP_region_end__ = ORIGIN(OPEN_AMP_SHMEM) + LENGTH(OPEN_AMP_SHMEM);
*
* using the LENGTH(OPEN_AMP_SHMEM) to set the SHM_SIZE lead to a crash thus we
* use the start and end address.
*/
extern int __OPENAMP_region_start__[]; /* defined by linker script */
extern int __OPENAMP_region_end__[]; /* defined by linker script */
#define SHM_START_ADDRESS ((metal_phys_addr_t)__OPENAMP_region_start__)
#define SHM_SIZE (size_t)((void *)__OPENAMP_region_end__ - (void *) __OPENAMP_region_start__)
#endif
#if defined LINUX_RPROC_MASTER
#define VRING_RX_ADDRESS -1 /* allocated by Master processor: CA7 */
#define VRING_TX_ADDRESS -1 /* allocated by Master processor: CA7 */
#define VRING_BUFF_ADDRESS -1 /* allocated by Master processor: CA7 */
#define VRING_ALIGNMENT 16 /* fixed to match with linux constraint */
#define VRING_NUM_BUFFS 16 /* number of rpmsg buffer */
#else
#define VRING_RX_ADDRESS SHM_START_ADDRESS
#define VRING_TX_ADDRESS (SHM_START_ADDRESS + 0x400)
#define VRING_BUFF_ADDRESS (SHM_START_ADDRESS + 0x800)
#define VRING_ALIGNMENT 4
#define VRING_NUM_BUFFS 4 /* number of rpmsg buffers */
#endif
/* Fixed parameter */
#define NUM_RESOURCE_ENTRIES 2
#define VRING_COUNT 2
#define VDEV_ID 0xFF
#define VRING0_ID 0 /* VRING0 ID (master to remote) fixed to 0 for linux compatibility*/
#define VRING1_ID 1 /* VRING1 ID (remote to master) fixed to 1 for linux compatibility */
/**
* @}
*/
/** @defgroup OPENAMP_CONF_Exported_Macros OPENAMP_CONF_Exported_Macros
* @brief Aliases.
* @{
*/
/* DEBUG macros */
#if defined (__LOG_TRACE_IO_) || defined(__LOG_UART_IO_)
#define OPENAMP_log_dbg log_dbg
#define OPENAMP_log_info log_info
#define OPENAMP_log_warn log_warn
#define OPENAMP_log_err log_err
#else
#define OPENAMP_log_dbg(...)
#define OPENAMP_log_info(...)
#define OPENAMP_log_warn(...)
#define OPENAMP_log_err(...)
#endif
/**
* @}
*/
/** @defgroup OPENAMP_CONF_Exported_Types OPENAMP_CONF_Exported_Types
* @brief Types.
* @{
*/
/**
* @}
*/
/** @defgroup OPENAMP_CONF_Exported_FunctionsPrototype OPENAMP_CONF_Exported_FunctionsPrototype
* @brief Declaration of public functions for OpenAMP mw.
* @{
*/
/* Exported functions -------------------------------------------------------*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __OPENAMP_CONF__H__ */
@@ -0,0 +1,175 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file rsc_table.c
* @author MCD Application Team
* @brief Resource table
*
* This file provides a default resource table requested by remote proc to
* load the elf file. It also allows to add debug trace using a shared buffer.
*
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/** @addtogroup RSC_TABLE
* @{
*/
/** @addtogroup resource_table
* @{
*/
/** @addtogroup resource_table_Private_Includes
* @{
*/
#if defined(__ICCARM__) || defined (__CC_ARM)
#include <stddef.h> /* needed for offsetof definition*/
#endif
#include "rsc_table.h"
#include "openamp/open_amp.h"
/**
* @}
*/
/** @addtogroup resource_table_Private_TypesDefinitions
* @{
*/
/**
* @}
*/
/** @addtogroup resource_table_Private_Defines
* @{
*/
/* Place resource table in special ELF section */
#if defined(__GNUC__)
#define __section_t(S) __attribute__((__section__(#S)))
#define __resource __section_t(.resource_table)
#endif
#if defined (LINUX_RPROC_MASTER)
#ifdef VIRTIO_MASTER_ONLY
#define CONST
#else
#define CONST const
#endif
#else
#define CONST
#endif
#define RPMSG_IPU_C0_FEATURES 1
#define VRING_COUNT 2
/* VirtIO rpmsg device id */
#define VIRTIO_ID_RPMSG_ 7
#if defined (__LOG_TRACE_IO_)
extern char system_log_buf[];
#endif
#if defined(__GNUC__)
#if !defined (__CC_ARM) && !defined (LINUX_RPROC_MASTER)
/* Since GCC is not initializing the resource_table at startup, it is declared as volatile to avoid compiler optimization
* for the CM4 (see resource_table_init() below)
*/
volatile struct shared_resource_table __resource __attribute__((used)) resource_table;
#else
CONST struct shared_resource_table __resource __attribute__((used)) resource_table = {
#endif
#elif defined(__ICCARM__)
__root CONST struct shared_resource_table resource_table @ ".resource_table" = {
#endif
#if defined(__ICCARM__) || defined (__CC_ARM) || defined (LINUX_RPROC_MASTER)
.version = 1,
#if defined (__LOG_TRACE_IO_)
.num = 2,
#else
.num = 1,
#endif
.reserved = {0, 0},
.offset = {
offsetof(struct shared_resource_table, vdev),
offsetof(struct shared_resource_table, cm_trace),
},
/* Virtio device entry */
.vdev= {
RSC_VDEV, VIRTIO_ID_RPMSG_, 0, RPMSG_IPU_C0_FEATURES, 0, 0, 0,
VRING_COUNT, {0, 0},
},
/* Vring rsc entry - part of vdev rsc entry */
.vring0 = {VRING_TX_ADDRESS, VRING_ALIGNMENT, VRING_NUM_BUFFS, VRING0_ID, 0},
.vring1 = {VRING_RX_ADDRESS, VRING_ALIGNMENT, VRING_NUM_BUFFS, VRING1_ID, 0},
#if defined (__LOG_TRACE_IO_)
.cm_trace = {
RSC_TRACE,
(uint32_t)system_log_buf, SYSTEM_TRACE_BUF_SZ, 0, "cm4_log",
},
#endif
} ;
#endif
void resource_table_init(int RPMsgRole, void **table_ptr, int *length)
{
#if !defined (LINUX_RPROC_MASTER)
#if defined (__GNUC__) && ! defined (__CC_ARM)
#ifdef VIRTIO_MASTER_ONLY
/*
* Currently the GCC linker doesn't initialize the resource_table global variable at startup
* it is done here by the master application.
*/
memset(&resource_table, '\0', sizeof(struct shared_resource_table));
resource_table.num = 1;
resource_table.version = 1;
resource_table.offset[0] = offsetof(struct shared_resource_table, vdev);
resource_table.vring0.da = VRING_TX_ADDRESS;
resource_table.vring0.align = VRING_ALIGNMENT;
resource_table.vring0.num = VRING_NUM_BUFFS;
resource_table.vring0.notifyid = VRING0_ID;
resource_table.vring1.da = VRING_RX_ADDRESS;
resource_table.vring1.align = VRING_ALIGNMENT;
resource_table.vring1.num = VRING_NUM_BUFFS;
resource_table.vring1.notifyid = VRING1_ID;
resource_table.vdev.type = RSC_VDEV;
resource_table.vdev.id = VIRTIO_ID_RPMSG_;
resource_table.vdev.num_of_vrings=VRING_COUNT;
resource_table.vdev.dfeatures = RPMSG_IPU_C0_FEATURES;
#else
/* For the slave application let's wait until the resource_table is correctly initialized */
while(resource_table.vring1.da != VRING_RX_ADDRESS)
{
}
#endif
#endif
#endif
(void)RPMsgRole;
*length = sizeof(resource_table);
*table_ptr = (void *)&resource_table;
}
@@ -0,0 +1,74 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* This file populates resource table for BM remote
* for use by the Linux Master */
/* USER CODE END Header */
#ifndef RSC_TABLE_H_
#define RSC_TABLE_H_
#include "openamp/open_amp.h"
#include "openamp_conf.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* Resource table for the given remote */
struct shared_resource_table {
unsigned int version;
unsigned int num;
unsigned int reserved[2];
unsigned int offset[NUM_RESOURCE_ENTRIES];
/* text carveout entry */
/* rpmsg vdev entry */
struct fw_rsc_vdev vdev;
struct fw_rsc_vdev_vring vring0;
struct fw_rsc_vdev_vring vring1;
struct fw_rsc_trace cm_trace;
};
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
void resource_table_init(int RPMsgRole, void **table_ptr, int *length);
#endif /* RSC_TABLE_H_ */
@@ -0,0 +1,200 @@
/*
******************************************************************************
**
** File : LinkerScript.ld
**
** Author : STM32CubeIDE
**
** Abstract : Linker script for STM32H7 series
** 1024Kbytes FLASH
** 800Kbytes RAM
**
** Set heap size, stack size and stack location according
** to application requirements.
**
** Set memory bank area and size if external memory is used.
**
** Target : STMicroelectronics STM32
**
** Distribution: The file is distributed as is without any warranty
** of any kind.
**
*****************************************************************************
** @attention
**
** Copyright (c) 2024 STMicroelectronics.
** All rights reserved.
**
** This software is licensed under terms that can be found in the LICENSE file
** in the root directory of this software component.
** If no LICENSE file comes with this software, it is provided AS-IS.
**
*****************************************************************************
*/
/* Entry Point */
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM_D1) + LENGTH(RAM_D1); /* end of "RAM_D1" Ram type memory */
_Min_Heap_Size = 0x2000; /* required amount of heap */
_Min_Stack_Size = 0x800; /* required amount of stack */
/* Memories definition */
MEMORY
{
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* Memory is divided. Actual start is 0x08000000 and actual length is 2048K */
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
OPEN_AMP_RSCT (xrw) : ORIGIN = 0x38000000, LENGTH = 1K
OPEN_AMP_SHMEM (xrw) : ORIGIN = 0x38000400, LENGTH = 63K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
}
__OPENAMP_region_start__ = ORIGIN(OPEN_AMP_SHMEM);
__OPENAMP_region_size__ = LENGTH(OPEN_AMP_SHMEM);
__OPENAMP_region_end__ = ORIGIN(OPEN_AMP_SHMEM) + LENGTH(OPEN_AMP_SHMEM);
/* Sections */
SECTIONS
{
/* The startup code into "FLASH" Rom type memory */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >FLASH
/* The program code and other data into "FLASH" Rom type memory */
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} >FLASH
/* Constant data into "FLASH" Rom type memory */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >FLASH
.ARM.extab (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
*(.ARM.extab* .gnu.linkonce.armextab.*)
. = ALIGN(4);
} >FLASH
.ARM (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
. = ALIGN(4);
} >FLASH
.preinit_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
} >FLASH
.init_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
} >FLASH
.fini_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
} >FLASH
/* Used by the startup to initialize data */
_sidata = LOADADDR(.data);
/* Initialized data sections into "RAM" Ram type memory */
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
*(.RamFunc) /* .RamFunc sections */
*(.RamFunc*) /* .RamFunc* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM_D1 AT> FLASH
/* Uninitialized data section into "RAM" Ram type memory */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss section */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} >RAM_D1
/* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
._user_heap_stack :
{
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM_D1
.openamp_section (NOLOAD) :
{
. = ABSOLUTE(0x38000000);
*(.resource_table)
} > OPEN_AMP_RSCT AT >FLASH
/* Remove information from the compiler libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
.ARM.attributes 0 : { *(.ARM.attributes) }
}
@@ -0,0 +1,190 @@
/*
******************************************************************************
**
** File : LinkerScript.ld (debug in RAM dedicated)
**
** Author : STM32CubeIDE
**
** Abstract : Linker script for STM32H7 series
** 1024Kbytes FLASH
** 800Kbytes RAM
**
** Set heap size, stack size and stack location according
** to application requirements.
**
** Set memory bank area and size if external memory is used.
**
** Target : STMicroelectronics STM32
**
** Distribution: The file is distributed as is without any warranty
** of any kind.
**
*****************************************************************************
** @attention
**
** Copyright (c) 2024 STMicroelectronics.
** All rights reserved.
**
** This software is licensed under terms that can be found in the LICENSE file
** in the root directory of this software component.
** If no LICENSE file comes with this software, it is provided AS-IS.
**
*****************************************************************************
*/
/* Entry Point */
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM_D1) + LENGTH(RAM_D1); /* end of "RAM_D1" Ram type memory */
_Min_Heap_Size = 0x2000; /* required amount of heap */
_Min_Stack_Size = 0x800; /* required amount of stack */
/* Memories definition */
MEMORY
{
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* Memory is divided. Actual start is 0x8000000 and actual length is 2048K */
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
}
/* Sections */
SECTIONS
{
/* The startup code into "RAM" Ram type memory */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >RAM_D1
/* The program code and other data into "RAM" Ram type memory */
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
*(.RamFunc) /* .RamFunc sections */
*(.RamFunc*) /* .RamFunc* sections */
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} >RAM_D1
/* Constant data into "RAM" Ram type memory */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >RAM_D1
.ARM.extab (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
*(.ARM.extab* .gnu.linkonce.armextab.*)
. = ALIGN(4);
} >RAM_D1
.ARM (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
. = ALIGN(4);
} >RAM_D1
.preinit_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
} >RAM_D1
.init_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
} >RAM_D1
.fini_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
{
. = ALIGN(4);
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
} >RAM_D1
/* Used by the startup to initialize data */
_sidata = LOADADDR(.data);
/* Initialized data sections into "RAM" Ram type memory */
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM_D1
/* Uninitialized data section into "RAM" Ram type memory */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss section */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} >RAM_D1
/* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
._user_heap_stack :
{
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM_D1
/* Remove information from the compiler libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
.ARM.attributes 0 : { *(.ARM.attributes) }
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.st.stm32cube.ide.mcu.debug.launch.launchConfigurationType">
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.access_port_id" value="0"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.cubeprog_external_loaders" value="[]"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth__pwd_enable" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_certif_path" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_check_enable" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_key_path" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_permission" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_pwd_file" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_live_expr" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_swv" value="true"/>
<intAttribute key="com.st.stm32cube.ide.mcu.debug.launch.formatVersion" value="2"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.incremental_flashing" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.ip_address_local" value="localhost"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.limit_swo_clock.enabled" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.limit_swo_clock.value" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.loadList" value="{&quot;fItems&quot;:[{&quot;fIsFromMainTab&quot;:false,&quot;fPath&quot;:&quot;Debug/stepper_h7_CM4.elf&quot;,&quot;fProjectName&quot;:&quot;stepper_h7_CM4&quot;,&quot;fUseActiveBuildConfig&quot;:true,&quot;fPerformBuild&quot;:true,&quot;fDownload&quot;:true,&quot;fLoadSymbols&quot;:true},{&quot;fIsFromMainTab&quot;:true,&quot;fPath&quot;:&quot;Debug/stepper_h7_CM7.elf&quot;,&quot;fProjectName&quot;:&quot;stepper_h7_CM7&quot;,&quot;fPerformBuild&quot;:true,&quot;fDownload&quot;:true,&quot;fLoadSymbols&quot;:true}]}"/>
<intAttribute key="com.st.stm32cube.ide.mcu.debug.launch.mode" value="2"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.multi_drop_enabled" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.override_start_address_mode" value="default"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.port" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.remoteCommand" value="target remote"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.semihosting" value="Enable terminal and File I/O mode"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startServer" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.exception.divby0" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.exception.unaligned" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.haltonexception" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swd_mode" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_port" value="61235"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_trace_hclk" value="400000000"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.useRemoteTarget" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.vector_table" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.verify_flash_download" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_allow_halt" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_signal_halt" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_logging" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_max_halt_delay" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_shared_stlink" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.frequency" value="0"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.halt_all_on_reset" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.log_file" value="D:\HomeGit\dhbw\EmbSys\RealtimeProg\MCU_STM32_60h\stepper_h7\CM7\Debug\st-link_gdbserver_log.txt"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.low_power_debug" value="disable"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.max_halt_delay" value="2"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.reset_strategy" value="connect_under_reset"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_check_serial_number" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.watchdog_config" value="disable"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkenable_rtos" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkrestart_configurations" value="{&quot;fVersion&quot;:1,&quot;fItems&quot;:[{&quot;fDisplayName&quot;:&quot;Reset&quot;,&quot;fIsSuppressible&quot;:false,&quot;fResetAttribute&quot;:&quot;Software system reset&quot;,&quot;fResetStrategies&quot;:[{&quot;fDisplayName&quot;:&quot;Software system reset&quot;,&quot;fLaunchAttribute&quot;:&quot;system_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Hardware reset&quot;,&quot;fLaunchAttribute&quot;:&quot;hardware_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset hardware\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Core reset&quot;,&quot;fLaunchAttribute&quot;:&quot;core_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset core\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;None&quot;,&quot;fLaunchAttribute&quot;:&quot;no_reset&quot;,&quot;fGdbCommands&quot;:[],&quot;fCmdOptions&quot;:[&quot;-g&quot;]}],&quot;fGdbCommandGroup&quot;:{&quot;name&quot;:&quot;Additional commands&quot;,&quot;commands&quot;:[]},&quot;fStartApplication&quot;:true}]}"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.enableRtosProxy" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyCustomProperties" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriver" value="freertos"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriverAuto" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriverPort" value="ARM_CM7"/>
<intAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyPort" value="60001"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDeviceId" value="com.st.stm32cube.ide.mcu.debug.stlink"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="61234"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="arm-none-eabi-gdb"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="remote"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/stepper_h7_CM7.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="stepper_h7_CM7"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1194244083"/>
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/stepper_h7_CM7"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;&gt;&lt;gdbmemoryBlockExpression address=&quot;939528720&quot; label=&quot;0x38001210&quot;/&gt;&lt;gdbmemoryBlockExpression address=&quot;939527184&quot; label=&quot;0x38000c10&quot;/&gt;&lt;/memoryBlockExpressionList&gt;"/>
<stringAttribute key="process_factory_id" value="com.st.stm32cube.ide.mcu.debug.launch.HardwareDebugProcessFactory"/>
</launchConfiguration>