├── 1
├── .cproject
├── .gitignore
├── .mxproject
├── .project
├── CMakeLists.txt
├── CMakeLists_template.txt
├── Core
├── Inc
│ ├── adc.h
│ ├── can.h
│ ├── dma.h
│ ├── gpio.h
│ ├── i2c.h
│ ├── main.h
│ ├── spi.h
│ ├── stm32f4xx_hal_conf.h
│ ├── stm32f4xx_it.h
│ ├── tim.h
│ └── usart.h
├── Src
│ ├── adc.c
│ ├── can.c
│ ├── dma.c
│ ├── gpio.c
│ ├── i2c.c
│ ├── main.c
│ ├── spi.c
│ ├── stm32f4xx_hal_msp.c
│ ├── stm32f4xx_it.c
│ ├── syscalls.c
│ ├── sysmem.c
│ ├── system_stm32f4xx.c
│ ├── tim.c
│ └── usart.c
└── Startup
│ └── startup_stm32f446rctx.s
├── Drivers
├── CMSIS
│ ├── Device
│ │ └── ST
│ │ │ └── STM32F4xx
│ │ │ ├── Include
│ │ │ ├── stm32f446xx.h
│ │ │ ├── stm32f4xx.h
│ │ │ └── system_stm32f4xx.h
│ │ │ └── LICENSE.txt
│ ├── Include
│ │ ├── cmsis_armcc.h
│ │ ├── cmsis_armclang.h
│ │ ├── cmsis_compiler.h
│ │ ├── cmsis_gcc.h
│ │ ├── cmsis_iccarm.h
│ │ ├── cmsis_version.h
│ │ ├── core_armv8mbl.h
│ │ ├── core_armv8mml.h
│ │ ├── core_cm0.h
│ │ ├── core_cm0plus.h
│ │ ├── core_cm1.h
│ │ ├── core_cm23.h
│ │ ├── core_cm3.h
│ │ ├── core_cm33.h
│ │ ├── core_cm4.h
│ │ ├── core_cm7.h
│ │ ├── core_sc000.h
│ │ ├── core_sc300.h
│ │ ├── mpu_armv7.h
│ │ ├── mpu_armv8.h
│ │ └── tz_context.h
│ └── LICENSE.txt
└── STM32F4xx_HAL_Driver
│ ├── Inc
│ ├── Legacy
│ │ └── stm32_hal_legacy.h
│ ├── stm32f4xx_hal.h
│ ├── stm32f4xx_hal_adc.h
│ ├── stm32f4xx_hal_adc_ex.h
│ ├── stm32f4xx_hal_can.h
│ ├── stm32f4xx_hal_cortex.h
│ ├── stm32f4xx_hal_def.h
│ ├── stm32f4xx_hal_dma.h
│ ├── stm32f4xx_hal_dma_ex.h
│ ├── stm32f4xx_hal_exti.h
│ ├── stm32f4xx_hal_flash.h
│ ├── stm32f4xx_hal_flash_ex.h
│ ├── stm32f4xx_hal_flash_ramfunc.h
│ ├── stm32f4xx_hal_gpio.h
│ ├── stm32f4xx_hal_gpio_ex.h
│ ├── stm32f4xx_hal_i2c.h
│ ├── stm32f4xx_hal_i2c_ex.h
│ ├── stm32f4xx_hal_pcd.h
│ ├── stm32f4xx_hal_pcd_ex.h
│ ├── stm32f4xx_hal_pwr.h
│ ├── stm32f4xx_hal_pwr_ex.h
│ ├── stm32f4xx_hal_rcc.h
│ ├── stm32f4xx_hal_rcc_ex.h
│ ├── stm32f4xx_hal_spi.h
│ ├── stm32f4xx_hal_tim.h
│ ├── stm32f4xx_hal_tim_ex.h
│ ├── stm32f4xx_hal_uart.h
│ ├── stm32f4xx_ll_adc.h
│ ├── stm32f4xx_ll_bus.h
│ ├── stm32f4xx_ll_cortex.h
│ ├── stm32f4xx_ll_dma.h
│ ├── stm32f4xx_ll_exti.h
│ ├── stm32f4xx_ll_gpio.h
│ ├── stm32f4xx_ll_i2c.h
│ ├── stm32f4xx_ll_pwr.h
│ ├── stm32f4xx_ll_rcc.h
│ ├── stm32f4xx_ll_spi.h
│ ├── stm32f4xx_ll_system.h
│ ├── stm32f4xx_ll_tim.h
│ ├── stm32f4xx_ll_usart.h
│ ├── stm32f4xx_ll_usb.h
│ └── stm32f4xx_ll_utils.h
│ ├── LICENSE.txt
│ └── Src
│ ├── stm32f4xx_hal.c
│ ├── stm32f4xx_hal_adc.c
│ ├── stm32f4xx_hal_adc_ex.c
│ ├── stm32f4xx_hal_can.c
│ ├── stm32f4xx_hal_cortex.c
│ ├── stm32f4xx_hal_dma.c
│ ├── stm32f4xx_hal_dma_ex.c
│ ├── stm32f4xx_hal_exti.c
│ ├── stm32f4xx_hal_flash.c
│ ├── stm32f4xx_hal_flash_ex.c
│ ├── stm32f4xx_hal_flash_ramfunc.c
│ ├── stm32f4xx_hal_gpio.c
│ ├── stm32f4xx_hal_i2c.c
│ ├── stm32f4xx_hal_i2c_ex.c
│ ├── stm32f4xx_hal_pcd.c
│ ├── stm32f4xx_hal_pcd_ex.c
│ ├── stm32f4xx_hal_pwr.c
│ ├── stm32f4xx_hal_pwr_ex.c
│ ├── stm32f4xx_hal_rcc.c
│ ├── stm32f4xx_hal_rcc_ex.c
│ ├── stm32f4xx_hal_spi.c
│ ├── stm32f4xx_hal_tim.c
│ ├── stm32f4xx_hal_tim_ex.c
│ ├── stm32f4xx_hal_uart.c
│ ├── stm32f4xx_ll_adc.c
│ └── stm32f4xx_ll_usb.c
├── LICENSE
├── Middlewares
└── ST
│ ├── ARM
│ └── DSP
│ │ ├── Inc
│ │ └── arm_math.h
│ │ └── Lib
│ │ └── libarm_cortexM4lf_math.a
│ └── STM32_USB_Device_Library
│ ├── Class
│ └── CDC
│ │ ├── Inc
│ │ └── usbd_cdc.h
│ │ └── Src
│ │ └── usbd_cdc.c
│ ├── Core
│ ├── Inc
│ │ ├── usbd_core.h
│ │ ├── usbd_ctlreq.h
│ │ ├── usbd_def.h
│ │ └── usbd_ioreq.h
│ └── Src
│ │ ├── usbd_core.c
│ │ ├── usbd_ctlreq.c
│ │ └── usbd_ioreq.c
│ └── LICENSE.txt
├── README.md
├── STM32F446RCTX_FLASH.ld
├── STM32F446RCTX_RAM.ld
├── USB_DEVICE
├── App
│ ├── usb_device.c
│ ├── usb_device.h
│ ├── usbd_cdc_if.c
│ ├── usbd_cdc_if.h
│ ├── usbd_desc.c
│ └── usbd_desc.h
└── Target
│ ├── usbd_conf.c
│ └── usbd_conf.h
├── User
├── 0-MWL(Middleware Layer)
│ ├── Inc
│ │ ├── CRC.h
│ │ ├── Pid.h
│ │ └── User_Math.h
│ ├── Src
│ │ ├── CRC.cpp
│ │ ├── Pid.cpp
│ │ └── User_Math.cpp
│ └── eigen-3.3.9
│ │ ├── .hgeol
│ │ ├── CMakeLists.txt
│ │ ├── COPYING.BSD
│ │ ├── COPYING.GPL
│ │ ├── COPYING.LGPL
│ │ ├── COPYING.MINPACK
│ │ ├── COPYING.MPL2
│ │ ├── COPYING.README
│ │ ├── CTestConfig.cmake
│ │ ├── CTestCustom.cmake.in
│ │ ├── Eigen
│ │ ├── CMakeLists.txt
│ │ ├── Cholesky
│ │ ├── CholmodSupport
│ │ ├── Core
│ │ ├── Dense
│ │ ├── Eigen
│ │ ├── Eigenvalues
│ │ ├── Geometry
│ │ ├── Householder
│ │ ├── IterativeLinearSolvers
│ │ ├── Jacobi
│ │ ├── LU
│ │ ├── MetisSupport
│ │ ├── OrderingMethods
│ │ ├── PaStiXSupport
│ │ ├── PardisoSupport
│ │ ├── QR
│ │ ├── QtAlignedMalloc
│ │ ├── SPQRSupport
│ │ ├── SVD
│ │ ├── Sparse
│ │ ├── SparseCholesky
│ │ ├── SparseCore
│ │ ├── SparseLU
│ │ ├── SparseQR
│ │ ├── StdDeque
│ │ ├── StdList
│ │ ├── StdVector
│ │ ├── SuperLUSupport
│ │ ├── UmfPackSupport
│ │ └── src
│ │ │ ├── Cholesky
│ │ │ ├── LDLT.h
│ │ │ ├── LLT.h
│ │ │ └── LLT_LAPACKE.h
│ │ │ ├── CholmodSupport
│ │ │ └── CholmodSupport.h
│ │ │ ├── Core
│ │ │ ├── Array.h
│ │ │ ├── ArrayBase.h
│ │ │ ├── ArrayWrapper.h
│ │ │ ├── Assign.h
│ │ │ ├── AssignEvaluator.h
│ │ │ ├── Assign_MKL.h
│ │ │ ├── BandMatrix.h
│ │ │ ├── Block.h
│ │ │ ├── BooleanRedux.h
│ │ │ ├── CommaInitializer.h
│ │ │ ├── ConditionEstimator.h
│ │ │ ├── CoreEvaluators.h
│ │ │ ├── CoreIterators.h
│ │ │ ├── CwiseBinaryOp.h
│ │ │ ├── CwiseNullaryOp.h
│ │ │ ├── CwiseTernaryOp.h
│ │ │ ├── CwiseUnaryOp.h
│ │ │ ├── CwiseUnaryView.h
│ │ │ ├── DenseBase.h
│ │ │ ├── DenseCoeffsBase.h
│ │ │ ├── DenseStorage.h
│ │ │ ├── Diagonal.h
│ │ │ ├── DiagonalMatrix.h
│ │ │ ├── DiagonalProduct.h
│ │ │ ├── Dot.h
│ │ │ ├── EigenBase.h
│ │ │ ├── ForceAlignedAccess.h
│ │ │ ├── Fuzzy.h
│ │ │ ├── GeneralProduct.h
│ │ │ ├── GenericPacketMath.h
│ │ │ ├── GlobalFunctions.h
│ │ │ ├── IO.h
│ │ │ ├── Inverse.h
│ │ │ ├── Map.h
│ │ │ ├── MapBase.h
│ │ │ ├── MathFunctions.h
│ │ │ ├── MathFunctionsImpl.h
│ │ │ ├── Matrix.h
│ │ │ ├── MatrixBase.h
│ │ │ ├── NestByValue.h
│ │ │ ├── NoAlias.h
│ │ │ ├── NumTraits.h
│ │ │ ├── PermutationMatrix.h
│ │ │ ├── PlainObjectBase.h
│ │ │ ├── Product.h
│ │ │ ├── ProductEvaluators.h
│ │ │ ├── Random.h
│ │ │ ├── Redux.h
│ │ │ ├── Ref.h
│ │ │ ├── Replicate.h
│ │ │ ├── ReturnByValue.h
│ │ │ ├── Reverse.h
│ │ │ ├── Select.h
│ │ │ ├── SelfAdjointView.h
│ │ │ ├── SelfCwiseBinaryOp.h
│ │ │ ├── Solve.h
│ │ │ ├── SolveTriangular.h
│ │ │ ├── SolverBase.h
│ │ │ ├── StableNorm.h
│ │ │ ├── Stride.h
│ │ │ ├── Swap.h
│ │ │ ├── Transpose.h
│ │ │ ├── Transpositions.h
│ │ │ ├── TriangularMatrix.h
│ │ │ ├── VectorBlock.h
│ │ │ ├── VectorwiseOp.h
│ │ │ ├── Visitor.h
│ │ │ ├── arch
│ │ │ │ ├── AVX
│ │ │ │ │ ├── Complex.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ ├── PacketMath.h
│ │ │ │ │ └── TypeCasting.h
│ │ │ │ ├── AVX512
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ └── PacketMath.h
│ │ │ │ ├── AltiVec
│ │ │ │ │ ├── Complex.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ └── PacketMath.h
│ │ │ │ ├── CUDA
│ │ │ │ │ ├── Complex.h
│ │ │ │ │ ├── Half.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ ├── PacketMath.h
│ │ │ │ │ ├── PacketMathHalf.h
│ │ │ │ │ └── TypeCasting.h
│ │ │ │ ├── Default
│ │ │ │ │ ├── ConjHelper.h
│ │ │ │ │ └── Settings.h
│ │ │ │ ├── NEON
│ │ │ │ │ ├── Complex.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ └── PacketMath.h
│ │ │ │ ├── SSE
│ │ │ │ │ ├── Complex.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ ├── PacketMath.h
│ │ │ │ │ └── TypeCasting.h
│ │ │ │ └── ZVector
│ │ │ │ │ ├── Complex.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ └── PacketMath.h
│ │ │ ├── functors
│ │ │ │ ├── AssignmentFunctors.h
│ │ │ │ ├── BinaryFunctors.h
│ │ │ │ ├── NullaryFunctors.h
│ │ │ │ ├── StlFunctors.h
│ │ │ │ ├── TernaryFunctors.h
│ │ │ │ └── UnaryFunctors.h
│ │ │ ├── products
│ │ │ │ ├── GeneralBlockPanelKernel.h
│ │ │ │ ├── GeneralMatrixMatrix.h
│ │ │ │ ├── GeneralMatrixMatrixTriangular.h
│ │ │ │ ├── GeneralMatrixMatrixTriangular_BLAS.h
│ │ │ │ ├── GeneralMatrixMatrix_BLAS.h
│ │ │ │ ├── GeneralMatrixVector.h
│ │ │ │ ├── GeneralMatrixVector_BLAS.h
│ │ │ │ ├── Parallelizer.h
│ │ │ │ ├── SelfadjointMatrixMatrix.h
│ │ │ │ ├── SelfadjointMatrixMatrix_BLAS.h
│ │ │ │ ├── SelfadjointMatrixVector.h
│ │ │ │ ├── SelfadjointMatrixVector_BLAS.h
│ │ │ │ ├── SelfadjointProduct.h
│ │ │ │ ├── SelfadjointRank2Update.h
│ │ │ │ ├── TriangularMatrixMatrix.h
│ │ │ │ ├── TriangularMatrixMatrix_BLAS.h
│ │ │ │ ├── TriangularMatrixVector.h
│ │ │ │ ├── TriangularMatrixVector_BLAS.h
│ │ │ │ ├── TriangularSolverMatrix.h
│ │ │ │ ├── TriangularSolverMatrix_BLAS.h
│ │ │ │ └── TriangularSolverVector.h
│ │ │ └── util
│ │ │ │ ├── BlasUtil.h
│ │ │ │ ├── Constants.h
│ │ │ │ ├── DisableStupidWarnings.h
│ │ │ │ ├── ForwardDeclarations.h
│ │ │ │ ├── MKL_support.h
│ │ │ │ ├── Macros.h
│ │ │ │ ├── Memory.h
│ │ │ │ ├── Meta.h
│ │ │ │ ├── NonMPL2.h
│ │ │ │ ├── ReenableStupidWarnings.h
│ │ │ │ ├── StaticAssert.h
│ │ │ │ └── XprHelper.h
│ │ │ ├── Eigenvalues
│ │ │ ├── ComplexEigenSolver.h
│ │ │ ├── ComplexSchur.h
│ │ │ ├── ComplexSchur_LAPACKE.h
│ │ │ ├── EigenSolver.h
│ │ │ ├── GeneralizedEigenSolver.h
│ │ │ ├── GeneralizedSelfAdjointEigenSolver.h
│ │ │ ├── HessenbergDecomposition.h
│ │ │ ├── MatrixBaseEigenvalues.h
│ │ │ ├── RealQZ.h
│ │ │ ├── RealSchur.h
│ │ │ ├── RealSchur_LAPACKE.h
│ │ │ ├── SelfAdjointEigenSolver.h
│ │ │ ├── SelfAdjointEigenSolver_LAPACKE.h
│ │ │ └── Tridiagonalization.h
│ │ │ ├── Geometry
│ │ │ ├── AlignedBox.h
│ │ │ ├── AngleAxis.h
│ │ │ ├── EulerAngles.h
│ │ │ ├── Homogeneous.h
│ │ │ ├── Hyperplane.h
│ │ │ ├── OrthoMethods.h
│ │ │ ├── ParametrizedLine.h
│ │ │ ├── Quaternion.h
│ │ │ ├── Rotation2D.h
│ │ │ ├── RotationBase.h
│ │ │ ├── Scaling.h
│ │ │ ├── Transform.h
│ │ │ ├── Translation.h
│ │ │ ├── Umeyama.h
│ │ │ └── arch
│ │ │ │ └── Geometry_SSE.h
│ │ │ ├── Householder
│ │ │ ├── BlockHouseholder.h
│ │ │ ├── Householder.h
│ │ │ └── HouseholderSequence.h
│ │ │ ├── IterativeLinearSolvers
│ │ │ ├── BasicPreconditioners.h
│ │ │ ├── BiCGSTAB.h
│ │ │ ├── ConjugateGradient.h
│ │ │ ├── IncompleteCholesky.h
│ │ │ ├── IncompleteLUT.h
│ │ │ ├── IterativeSolverBase.h
│ │ │ ├── LeastSquareConjugateGradient.h
│ │ │ └── SolveWithGuess.h
│ │ │ ├── Jacobi
│ │ │ └── Jacobi.h
│ │ │ ├── LU
│ │ │ ├── Determinant.h
│ │ │ ├── FullPivLU.h
│ │ │ ├── InverseImpl.h
│ │ │ ├── PartialPivLU.h
│ │ │ ├── PartialPivLU_LAPACKE.h
│ │ │ └── arch
│ │ │ │ └── Inverse_SSE.h
│ │ │ ├── MetisSupport
│ │ │ └── MetisSupport.h
│ │ │ ├── OrderingMethods
│ │ │ ├── Amd.h
│ │ │ ├── Eigen_Colamd.h
│ │ │ └── Ordering.h
│ │ │ ├── PaStiXSupport
│ │ │ └── PaStiXSupport.h
│ │ │ ├── PardisoSupport
│ │ │ └── PardisoSupport.h
│ │ │ ├── QR
│ │ │ ├── ColPivHouseholderQR.h
│ │ │ ├── ColPivHouseholderQR_LAPACKE.h
│ │ │ ├── CompleteOrthogonalDecomposition.h
│ │ │ ├── FullPivHouseholderQR.h
│ │ │ ├── HouseholderQR.h
│ │ │ └── HouseholderQR_LAPACKE.h
│ │ │ ├── SPQRSupport
│ │ │ └── SuiteSparseQRSupport.h
│ │ │ ├── SVD
│ │ │ ├── BDCSVD.h
│ │ │ ├── JacobiSVD.h
│ │ │ ├── JacobiSVD_LAPACKE.h
│ │ │ ├── SVDBase.h
│ │ │ └── UpperBidiagonalization.h
│ │ │ ├── SparseCholesky
│ │ │ ├── SimplicialCholesky.h
│ │ │ └── SimplicialCholesky_impl.h
│ │ │ ├── SparseCore
│ │ │ ├── AmbiVector.h
│ │ │ ├── CompressedStorage.h
│ │ │ ├── ConservativeSparseSparseProduct.h
│ │ │ ├── MappedSparseMatrix.h
│ │ │ ├── SparseAssign.h
│ │ │ ├── SparseBlock.h
│ │ │ ├── SparseColEtree.h
│ │ │ ├── SparseCompressedBase.h
│ │ │ ├── SparseCwiseBinaryOp.h
│ │ │ ├── SparseCwiseUnaryOp.h
│ │ │ ├── SparseDenseProduct.h
│ │ │ ├── SparseDiagonalProduct.h
│ │ │ ├── SparseDot.h
│ │ │ ├── SparseFuzzy.h
│ │ │ ├── SparseMap.h
│ │ │ ├── SparseMatrix.h
│ │ │ ├── SparseMatrixBase.h
│ │ │ ├── SparsePermutation.h
│ │ │ ├── SparseProduct.h
│ │ │ ├── SparseRedux.h
│ │ │ ├── SparseRef.h
│ │ │ ├── SparseSelfAdjointView.h
│ │ │ ├── SparseSolverBase.h
│ │ │ ├── SparseSparseProductWithPruning.h
│ │ │ ├── SparseTranspose.h
│ │ │ ├── SparseTriangularView.h
│ │ │ ├── SparseUtil.h
│ │ │ ├── SparseVector.h
│ │ │ ├── SparseView.h
│ │ │ └── TriangularSolver.h
│ │ │ ├── SparseLU
│ │ │ ├── SparseLU.h
│ │ │ ├── SparseLUImpl.h
│ │ │ ├── SparseLU_Memory.h
│ │ │ ├── SparseLU_Structs.h
│ │ │ ├── SparseLU_SupernodalMatrix.h
│ │ │ ├── SparseLU_Utils.h
│ │ │ ├── SparseLU_column_bmod.h
│ │ │ ├── SparseLU_column_dfs.h
│ │ │ ├── SparseLU_copy_to_ucol.h
│ │ │ ├── SparseLU_gemm_kernel.h
│ │ │ ├── SparseLU_heap_relax_snode.h
│ │ │ ├── SparseLU_kernel_bmod.h
│ │ │ ├── SparseLU_panel_bmod.h
│ │ │ ├── SparseLU_panel_dfs.h
│ │ │ ├── SparseLU_pivotL.h
│ │ │ ├── SparseLU_pruneL.h
│ │ │ └── SparseLU_relax_snode.h
│ │ │ ├── SparseQR
│ │ │ └── SparseQR.h
│ │ │ ├── StlSupport
│ │ │ ├── StdDeque.h
│ │ │ ├── StdList.h
│ │ │ ├── StdVector.h
│ │ │ └── details.h
│ │ │ ├── SuperLUSupport
│ │ │ └── SuperLUSupport.h
│ │ │ ├── UmfPackSupport
│ │ │ └── UmfPackSupport.h
│ │ │ ├── misc
│ │ │ ├── Image.h
│ │ │ ├── Kernel.h
│ │ │ ├── RealSvd2x2.h
│ │ │ ├── blas.h
│ │ │ ├── lapack.h
│ │ │ ├── lapacke.h
│ │ │ └── lapacke_mangling.h
│ │ │ └── plugins
│ │ │ ├── ArrayCwiseBinaryOps.h
│ │ │ ├── ArrayCwiseUnaryOps.h
│ │ │ ├── BlockMethods.h
│ │ │ ├── CommonCwiseBinaryOps.h
│ │ │ ├── CommonCwiseUnaryOps.h
│ │ │ ├── MatrixCwiseBinaryOps.h
│ │ │ └── MatrixCwiseUnaryOps.h
│ │ ├── INSTALL
│ │ ├── README.md
│ │ ├── eigen3.pc.in
│ │ └── signature_of_eigen3_matrix_library
├── 1-APL(Application Layer)
│ ├── Inc
│ │ ├── Callback_Button.h
│ │ ├── Callback_Can.h
│ │ ├── Callback_Tim.h
│ │ ├── Callback_Usart.h
│ │ └── User_Main.h
│ └── Src
│ │ ├── Callback_Button.cpp
│ │ ├── Callback_Can.cpp
│ │ ├── Callback_Tim.cpp
│ │ ├── Callback_Usart.cpp
│ │ └── User_Main.cpp
├── 2-FML(Function Module Layer)
│ ├── Inc
│ │ ├── Button.h
│ │ ├── Controller_rpy.h
│ │ └── Controller_xyz.h
│ └── Src
│ │ ├── Button.cpp
│ │ ├── Controller_rpy.cpp
│ │ └── Controller_xyz.cpp
├── 3-HDL(Hardware Driver Layer)
│ ├── Inc
│ │ ├── Board.h
│ │ ├── IMU.h
│ │ ├── Motor_DJI.h
│ │ ├── Motor_DM.h
│ │ └── referee_system.h
│ └── Src
│ │ ├── Board.cpp
│ │ ├── IMU.cpp
│ │ ├── Motor_DJI.cpp
│ │ ├── Motor_DM.cpp
│ │ └── referee_system.cpp
├── 4-HAL(Hardware Abstract Layer)
│ ├── Inc
│ │ ├── User_Can.h
│ │ └── User_Usart.h
│ └── Src
│ │ ├── User_Can.cpp
│ │ └── User_Usart.cpp
└── Readme.md
├── config
├── daplink.cfg
└── stlink.cfg
├── custom_controller.ioc
└── 中国科学技术大学RoboWalker_2024工程机器人技术文档.pdf
/1:
--------------------------------------------------------------------------------
1 | Debug: 1 3 : Parse param : 63
2 | Debug: 2 3 : Parse param : 63
3 | Debug: 3 3 : Parse param : 112
4 | Debug: 4 3 : ***port C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.0.202305091550\tools\bin
5 | Debug: 5 3 : Parse param : 63
6 | Debug: 6 4 : Parse param : 63
7 | Debug: 7 4 : create_listening_sockets
8 | Debug: 8 4 : Entering create_listening_sockets()
9 | Debug: 9 4 : Creating the list of sockets to listen for ...
10 | Debug: 10 4 : interface, tcp port : (null) , C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.0.202305091550\tools\bin
11 | Info : 11 4 : default port : C:\ST\STM32CubeIDE_1.13.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.0.202305091550\tools\bin
12 | Error: 12 12 : getaddrinfo failed. Error = 10109
13 | Debug: 13 12 : Exiting create_listening_sockets()
14 | Debug: 14 12 : WSACleanup. Error = -4
15 |
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | cmake-build-debug/
2 | cmake-build-debug-mingw-stm32/
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | custom_controller
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder
10 | clean,full,incremental,
11 |
12 |
13 |
14 |
15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
16 | full,incremental,
17 |
18 |
19 |
20 |
21 |
22 | com.st.stm32cube.ide.mcu.MCUProjectNature
23 | org.eclipse.cdt.core.cnature
24 | com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature
25 | com.st.stm32cube.ide.mcu.MCUCubeProjectNature
26 | com.st.stm32cube.ide.mcu.MCUAdvancedStructureProjectNature
27 | com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature
28 | com.st.stm32cube.ide.mcu.MCURootProjectNature
29 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
30 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
31 |
32 |
33 |
--------------------------------------------------------------------------------
/CMakeLists_template.txt:
--------------------------------------------------------------------------------
1 | #${templateWarning}
2 | set(CMAKE_SYSTEM_NAME Generic)
3 | set(CMAKE_SYSTEM_VERSION 1)
4 | ${cmakeRequiredVersion}
5 | # specify cross-compilers and tools
6 | set(CMAKE_C_COMPILER arm-none-eabi-gcc)
7 | set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
8 | set(CMAKE_ASM_COMPILER arm-none-eabi-gcc)
9 | set(CMAKE_AR arm-none-eabi-ar)
10 | set(CMAKE_OBJCOPY arm-none-eabi-objcopy)
11 | set(CMAKE_OBJDUMP arm-none-eabi-objdump)
12 | set(SIZE arm-none-eabi-size)
13 | set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
14 |
15 | # project settings
16 | project(${projectName} C CXX ASM)
17 | set(CMAKE_CXX_STANDARD 17)
18 | set(CMAKE_C_STANDARD 11)
19 |
20 | #Uncomment for hardware floating point
21 | #add_compile_definitions(ARM_MATH_CM4;ARM_MATH_MATRIX_CHECK;ARM_MATH_ROUNDING)
22 | #add_compile_options(-mfloat-abi=hard -mfpu=fpv4-sp-d16)
23 | #add_link_options(-mfloat-abi=hard -mfpu=fpv4-sp-d16)
24 |
25 | #Uncomment for software floating point
26 | #add_compile_options(-mfloat-abi=soft)
27 |
28 | add_compile_options(-mcpu=${mcpu} -mthumb -mthumb-interwork)
29 | add_compile_options(-ffunction-sections -fdata-sections -fno-common -fmessage-length=0)
30 |
31 | # uncomment to mitigate c++17 absolute addresses warnings
32 | #set(CMAKE_CXX_FLAGS "$${CMAKE_CXX_FLAGS} -Wno-register")
33 |
34 | # Enable assembler files preprocessing
35 | add_compile_options($<$:-x$assembler-with-cpp>)
36 |
37 | if ("$${CMAKE_BUILD_TYPE}" STREQUAL "Release")
38 | message(STATUS "Maximum optimization for speed")
39 | add_compile_options(-Ofast)
40 | elseif ("$${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
41 | message(STATUS "Maximum optimization for speed, debug info included")
42 | add_compile_options(-Ofast -g)
43 | elseif ("$${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel")
44 | message(STATUS "Maximum optimization for size")
45 | add_compile_options(-Os)
46 | else ()
47 | message(STATUS "Minimal optimization, debug info included")
48 | add_compile_options(-Og -g)
49 | endif ()
50 |
51 | include_directories(${includes})
52 |
53 | add_definitions(${defines})
54 |
55 | file(GLOB_RECURSE SOURCES ${sources})
56 |
57 | set(LINKER_SCRIPT $${CMAKE_SOURCE_DIR}/${linkerScript})
58 |
59 | add_link_options(-Wl,-gc-sections,--print-memory-usage,-Map=$${PROJECT_BINARY_DIR}/$${PROJECT_NAME}.map)
60 | add_link_options(-mcpu=${mcpu} -mthumb -mthumb-interwork)
61 | add_link_options(-T $${LINKER_SCRIPT})
62 |
63 | add_executable($${PROJECT_NAME}.elf $${SOURCES} $${LINKER_SCRIPT})
64 |
65 | set(HEX_FILE $${PROJECT_BINARY_DIR}/$${PROJECT_NAME}.hex)
66 | set(BIN_FILE $${PROJECT_BINARY_DIR}/$${PROJECT_NAME}.bin)
67 |
68 | add_custom_command(TARGET $${PROJECT_NAME}.elf POST_BUILD
69 | COMMAND $${CMAKE_OBJCOPY} -Oihex $ $${HEX_FILE}
70 | COMMAND $${CMAKE_OBJCOPY} -Obinary $ $${BIN_FILE}
71 | COMMENT "Building $${HEX_FILE}
72 | Building $${BIN_FILE}")
73 |
--------------------------------------------------------------------------------
/Core/Inc/adc.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file adc.h
5 | * @brief This file contains all the function prototypes for
6 | * the adc.c file
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __ADC_H__
22 | #define __ADC_H__
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "main.h"
30 |
31 | /* USER CODE BEGIN Includes */
32 |
33 | /* USER CODE END Includes */
34 |
35 | extern ADC_HandleTypeDef hadc1;
36 |
37 | /* USER CODE BEGIN Private defines */
38 |
39 | /* USER CODE END Private defines */
40 |
41 | void MX_ADC1_Init(void);
42 |
43 | /* USER CODE BEGIN Prototypes */
44 |
45 | /* USER CODE END Prototypes */
46 |
47 | #ifdef __cplusplus
48 | }
49 | #endif
50 |
51 | #endif /* __ADC_H__ */
52 |
53 |
--------------------------------------------------------------------------------
/Core/Inc/can.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file can.h
5 | * @brief This file contains all the function prototypes for
6 | * the can.c file
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __CAN_H__
22 | #define __CAN_H__
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "main.h"
30 |
31 | /* USER CODE BEGIN Includes */
32 |
33 | /* USER CODE END Includes */
34 |
35 | extern CAN_HandleTypeDef hcan1;
36 |
37 | extern CAN_HandleTypeDef hcan2;
38 |
39 | /* USER CODE BEGIN Private defines */
40 |
41 | /* USER CODE END Private defines */
42 |
43 | void MX_CAN1_Init(void);
44 | void MX_CAN2_Init(void);
45 |
46 | /* USER CODE BEGIN Prototypes */
47 |
48 | /* USER CODE END Prototypes */
49 |
50 | #ifdef __cplusplus
51 | }
52 | #endif
53 |
54 | #endif /* __CAN_H__ */
55 |
56 |
--------------------------------------------------------------------------------
/Core/Inc/dma.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file dma.h
5 | * @brief This file contains all the function prototypes for
6 | * the dma.c file
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __DMA_H__
22 | #define __DMA_H__
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "main.h"
30 |
31 | /* DMA memory to memory transfer handles -------------------------------------*/
32 |
33 | /* USER CODE BEGIN Includes */
34 |
35 | /* USER CODE END Includes */
36 |
37 | /* USER CODE BEGIN Private defines */
38 |
39 | /* USER CODE END Private defines */
40 |
41 | void MX_DMA_Init(void);
42 |
43 | /* USER CODE BEGIN Prototypes */
44 |
45 | /* USER CODE END Prototypes */
46 |
47 | #ifdef __cplusplus
48 | }
49 | #endif
50 |
51 | #endif /* __DMA_H__ */
52 |
53 |
--------------------------------------------------------------------------------
/Core/Inc/gpio.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file gpio.h
5 | * @brief This file contains all the function prototypes for
6 | * the gpio.c file
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __GPIO_H__
22 | #define __GPIO_H__
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "main.h"
30 |
31 | /* USER CODE BEGIN Includes */
32 |
33 | /* USER CODE END Includes */
34 |
35 | /* USER CODE BEGIN Private defines */
36 |
37 | /* USER CODE END Private defines */
38 |
39 | void MX_GPIO_Init(void);
40 |
41 | /* USER CODE BEGIN Prototypes */
42 |
43 | /* USER CODE END Prototypes */
44 |
45 | #ifdef __cplusplus
46 | }
47 | #endif
48 | #endif /*__ GPIO_H__ */
49 |
50 |
--------------------------------------------------------------------------------
/Core/Inc/i2c.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file i2c.h
5 | * @brief This file contains all the function prototypes for
6 | * the i2c.c file
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __I2C_H__
22 | #define __I2C_H__
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "main.h"
30 |
31 | /* USER CODE BEGIN Includes */
32 |
33 | /* USER CODE END Includes */
34 |
35 | extern I2C_HandleTypeDef hi2c1;
36 |
37 | extern I2C_HandleTypeDef hi2c3;
38 |
39 | /* USER CODE BEGIN Private defines */
40 |
41 | /* USER CODE END Private defines */
42 |
43 | void MX_I2C1_Init(void);
44 | void MX_I2C3_Init(void);
45 |
46 | /* USER CODE BEGIN Prototypes */
47 |
48 | /* USER CODE END Prototypes */
49 |
50 | #ifdef __cplusplus
51 | }
52 | #endif
53 |
54 | #endif /* __I2C_H__ */
55 |
56 |
--------------------------------------------------------------------------------
/Core/Inc/main.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file : main.h
5 | * @brief : Header for main.c file.
6 | * This file contains the common defines of the application.
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 |
21 | /* Define to prevent recursive inclusion -------------------------------------*/
22 | #ifndef __MAIN_H
23 | #define __MAIN_H
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif
28 |
29 | /* Includes ------------------------------------------------------------------*/
30 | #include "stm32f4xx_hal.h"
31 |
32 | /* Private includes ----------------------------------------------------------*/
33 | /* USER CODE BEGIN Includes */
34 |
35 | /* USER CODE END Includes */
36 |
37 | /* Exported types ------------------------------------------------------------*/
38 | /* USER CODE BEGIN ET */
39 |
40 | /* USER CODE END ET */
41 |
42 | /* Exported constants --------------------------------------------------------*/
43 | /* USER CODE BEGIN EC */
44 |
45 | /* USER CODE END EC */
46 |
47 | /* Exported macro ------------------------------------------------------------*/
48 | /* USER CODE BEGIN EM */
49 |
50 | /* USER CODE END EM */
51 |
52 | /* Exported functions prototypes ---------------------------------------------*/
53 | void Error_Handler(void);
54 |
55 | /* USER CODE BEGIN EFP */
56 |
57 | /* USER CODE END EFP */
58 |
59 | /* Private defines -----------------------------------------------------------*/
60 | #define Power_OUT1_EN_Pin GPIO_PIN_13
61 | #define Power_OUT1_EN_GPIO_Port GPIOC
62 | #define Power_5V_EN_Pin GPIO_PIN_14
63 | #define Power_5V_EN_GPIO_Port GPIOC
64 | #define RS485_DIR1_Pin GPIO_PIN_15
65 | #define RS485_DIR1_GPIO_Port GPIOC
66 | #define LED_Pin GPIO_PIN_0
67 | #define LED_GPIO_Port GPIOC
68 | #define Power_OUT2_EN_Pin GPIO_PIN_4
69 | #define Power_OUT2_EN_GPIO_Port GPIOC
70 | #define USER_KEY_Pin GPIO_PIN_15
71 | #define USER_KEY_GPIO_Port GPIOA
72 | #define RS485_DIR2_Pin GPIO_PIN_3
73 | #define RS485_DIR2_GPIO_Port GPIOB
74 |
75 | /* USER CODE BEGIN Private defines */
76 |
77 | /* USER CODE END Private defines */
78 |
79 | #ifdef __cplusplus
80 | }
81 | #endif
82 |
83 | #endif /* __MAIN_H */
84 |
--------------------------------------------------------------------------------
/Core/Inc/spi.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file spi.h
5 | * @brief This file contains all the function prototypes for
6 | * the spi.c file
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __SPI_H__
22 | #define __SPI_H__
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "main.h"
30 |
31 | /* USER CODE BEGIN Includes */
32 |
33 | /* USER CODE END Includes */
34 |
35 | extern SPI_HandleTypeDef hspi1;
36 |
37 | /* USER CODE BEGIN Private defines */
38 |
39 | /* USER CODE END Private defines */
40 |
41 | void MX_SPI1_Init(void);
42 |
43 | /* USER CODE BEGIN Prototypes */
44 |
45 | /* USER CODE END Prototypes */
46 |
47 | #ifdef __cplusplus
48 | }
49 | #endif
50 |
51 | #endif /* __SPI_H__ */
52 |
53 |
--------------------------------------------------------------------------------
/Core/Inc/stm32f4xx_it.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file stm32f4xx_it.h
5 | * @brief This file contains the headers of the interrupt handlers.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * Copyright (c) 2024 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software is licensed under terms that can be found in the LICENSE file
13 | * in the root directory of this software component.
14 | * If no LICENSE file comes with this software, it is provided AS-IS.
15 | *
16 | ******************************************************************************
17 | */
18 | /* USER CODE END Header */
19 |
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __STM32F4xx_IT_H
22 | #define __STM32F4xx_IT_H
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Private includes ----------------------------------------------------------*/
29 | /* USER CODE BEGIN Includes */
30 |
31 | /* USER CODE END Includes */
32 |
33 | /* Exported types ------------------------------------------------------------*/
34 | /* USER CODE BEGIN ET */
35 |
36 | /* USER CODE END ET */
37 |
38 | /* Exported constants --------------------------------------------------------*/
39 | /* USER CODE BEGIN EC */
40 |
41 | /* USER CODE END EC */
42 |
43 | /* Exported macro ------------------------------------------------------------*/
44 | /* USER CODE BEGIN EM */
45 |
46 | /* USER CODE END EM */
47 |
48 | /* Exported functions prototypes ---------------------------------------------*/
49 | void NMI_Handler(void);
50 | void HardFault_Handler(void);
51 | void MemManage_Handler(void);
52 | void BusFault_Handler(void);
53 | void UsageFault_Handler(void);
54 | void SVC_Handler(void);
55 | void DebugMon_Handler(void);
56 | void PendSV_Handler(void);
57 | void SysTick_Handler(void);
58 | void DMA1_Stream0_IRQHandler(void);
59 | void DMA1_Stream1_IRQHandler(void);
60 | void DMA1_Stream2_IRQHandler(void);
61 | void DMA1_Stream4_IRQHandler(void);
62 | void DMA1_Stream5_IRQHandler(void);
63 | void CAN1_RX0_IRQHandler(void);
64 | void CAN1_RX1_IRQHandler(void);
65 | void TIM3_IRQHandler(void);
66 | void TIM4_IRQHandler(void);
67 | void USART1_IRQHandler(void);
68 | void USART2_IRQHandler(void);
69 | void USART3_IRQHandler(void);
70 | void TIM5_IRQHandler(void);
71 | void UART4_IRQHandler(void);
72 | void UART5_IRQHandler(void);
73 | void TIM6_DAC_IRQHandler(void);
74 | void TIM7_IRQHandler(void);
75 | void DMA2_Stream2_IRQHandler(void);
76 | void CAN2_RX0_IRQHandler(void);
77 | void CAN2_RX1_IRQHandler(void);
78 | void OTG_FS_IRQHandler(void);
79 | /* USER CODE BEGIN EFP */
80 |
81 | /* USER CODE END EFP */
82 |
83 | #ifdef __cplusplus
84 | }
85 | #endif
86 |
87 | #endif /* __STM32F4xx_IT_H */
88 |
--------------------------------------------------------------------------------
/Core/Inc/tim.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file tim.h
5 | * @brief This file contains all the function prototypes for
6 | * the tim.c file
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __TIM_H__
22 | #define __TIM_H__
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "main.h"
30 |
31 | /* USER CODE BEGIN Includes */
32 |
33 | /* USER CODE END Includes */
34 |
35 | extern TIM_HandleTypeDef htim2;
36 |
37 | extern TIM_HandleTypeDef htim3;
38 |
39 | extern TIM_HandleTypeDef htim4;
40 |
41 | extern TIM_HandleTypeDef htim5;
42 |
43 | extern TIM_HandleTypeDef htim6;
44 |
45 | extern TIM_HandleTypeDef htim7;
46 |
47 | extern TIM_HandleTypeDef htim10;
48 |
49 | /* USER CODE BEGIN Private defines */
50 |
51 | /* USER CODE END Private defines */
52 |
53 | void MX_TIM2_Init(void);
54 | void MX_TIM3_Init(void);
55 | void MX_TIM4_Init(void);
56 | void MX_TIM5_Init(void);
57 | void MX_TIM6_Init(void);
58 | void MX_TIM7_Init(void);
59 | void MX_TIM10_Init(void);
60 |
61 | void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
62 |
63 | /* USER CODE BEGIN Prototypes */
64 |
65 | /* USER CODE END Prototypes */
66 |
67 | #ifdef __cplusplus
68 | }
69 | #endif
70 |
71 | #endif /* __TIM_H__ */
72 |
73 |
--------------------------------------------------------------------------------
/Core/Inc/usart.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file usart.h
5 | * @brief This file contains all the function prototypes for
6 | * the usart.c file
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __USART_H__
22 | #define __USART_H__
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "main.h"
30 |
31 | /* USER CODE BEGIN Includes */
32 |
33 | /* USER CODE END Includes */
34 |
35 | extern UART_HandleTypeDef huart4;
36 |
37 | extern UART_HandleTypeDef huart5;
38 |
39 | extern UART_HandleTypeDef huart1;
40 |
41 | extern UART_HandleTypeDef huart2;
42 |
43 | extern UART_HandleTypeDef huart3;
44 |
45 | /* USER CODE BEGIN Private defines */
46 |
47 | /* USER CODE END Private defines */
48 |
49 | void MX_UART4_Init(void);
50 | void MX_UART5_Init(void);
51 | void MX_USART1_UART_Init(void);
52 | void MX_USART2_UART_Init(void);
53 | void MX_USART3_UART_Init(void);
54 |
55 | /* USER CODE BEGIN Prototypes */
56 |
57 | /* USER CODE END Prototypes */
58 |
59 | #ifdef __cplusplus
60 | }
61 | #endif
62 |
63 | #endif /* __USART_H__ */
64 |
65 |
--------------------------------------------------------------------------------
/Core/Src/dma.c:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file dma.c
5 | * @brief This file provides code for the configuration
6 | * of all the requested memory to memory DMA transfers.
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 |
21 | /* Includes ------------------------------------------------------------------*/
22 | #include "dma.h"
23 |
24 | /* USER CODE BEGIN 0 */
25 |
26 | /* USER CODE END 0 */
27 |
28 | /*----------------------------------------------------------------------------*/
29 | /* Configure DMA */
30 | /*----------------------------------------------------------------------------*/
31 |
32 | /* USER CODE BEGIN 1 */
33 |
34 | /* USER CODE END 1 */
35 |
36 | /**
37 | * Enable DMA controller clock
38 | */
39 | void MX_DMA_Init(void)
40 | {
41 |
42 | /* DMA controller clock enable */
43 | __HAL_RCC_DMA2_CLK_ENABLE();
44 | __HAL_RCC_DMA1_CLK_ENABLE();
45 |
46 | /* DMA interrupt init */
47 | /* DMA1_Stream0_IRQn interrupt configuration */
48 | HAL_NVIC_SetPriority(DMA1_Stream0_IRQn, 0, 0);
49 | HAL_NVIC_EnableIRQ(DMA1_Stream0_IRQn);
50 | /* DMA1_Stream1_IRQn interrupt configuration */
51 | HAL_NVIC_SetPriority(DMA1_Stream1_IRQn, 0, 0);
52 | HAL_NVIC_EnableIRQ(DMA1_Stream1_IRQn);
53 | /* DMA1_Stream2_IRQn interrupt configuration */
54 | HAL_NVIC_SetPriority(DMA1_Stream2_IRQn, 0, 0);
55 | HAL_NVIC_EnableIRQ(DMA1_Stream2_IRQn);
56 | /* DMA1_Stream4_IRQn interrupt configuration */
57 | HAL_NVIC_SetPriority(DMA1_Stream4_IRQn, 0, 0);
58 | HAL_NVIC_EnableIRQ(DMA1_Stream4_IRQn);
59 | /* DMA1_Stream5_IRQn interrupt configuration */
60 | HAL_NVIC_SetPriority(DMA1_Stream5_IRQn, 0, 0);
61 | HAL_NVIC_EnableIRQ(DMA1_Stream5_IRQn);
62 | /* DMA2_Stream2_IRQn interrupt configuration */
63 | HAL_NVIC_SetPriority(DMA2_Stream2_IRQn, 0, 0);
64 | HAL_NVIC_EnableIRQ(DMA2_Stream2_IRQn);
65 |
66 | }
67 |
68 | /* USER CODE BEGIN 2 */
69 |
70 | /* USER CODE END 2 */
71 |
72 |
--------------------------------------------------------------------------------
/Core/Src/stm32f4xx_hal_msp.c:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file stm32f4xx_hal_msp.c
5 | * @brief This file provides code for the MSP Initialization
6 | * and de-Initialization codes.
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 |
21 | /* Includes ------------------------------------------------------------------*/
22 | #include "main.h"
23 | /* USER CODE BEGIN Includes */
24 |
25 | /* USER CODE END Includes */
26 |
27 | /* Private typedef -----------------------------------------------------------*/
28 | /* USER CODE BEGIN TD */
29 |
30 | /* USER CODE END TD */
31 |
32 | /* Private define ------------------------------------------------------------*/
33 | /* USER CODE BEGIN Define */
34 |
35 | /* USER CODE END Define */
36 |
37 | /* Private macro -------------------------------------------------------------*/
38 | /* USER CODE BEGIN Macro */
39 |
40 | /* USER CODE END Macro */
41 |
42 | /* Private variables ---------------------------------------------------------*/
43 | /* USER CODE BEGIN PV */
44 |
45 | /* USER CODE END PV */
46 |
47 | /* Private function prototypes -----------------------------------------------*/
48 | /* USER CODE BEGIN PFP */
49 |
50 | /* USER CODE END PFP */
51 |
52 | /* External functions --------------------------------------------------------*/
53 | /* USER CODE BEGIN ExternalFunctions */
54 |
55 | /* USER CODE END ExternalFunctions */
56 |
57 | /* USER CODE BEGIN 0 */
58 |
59 | /* USER CODE END 0 */
60 | /**
61 | * Initializes the Global MSP.
62 | */
63 | void HAL_MspInit(void)
64 | {
65 |
66 | /* USER CODE BEGIN MspInit 0 */
67 |
68 | /* USER CODE END MspInit 0 */
69 |
70 | __HAL_RCC_SYSCFG_CLK_ENABLE();
71 | __HAL_RCC_PWR_CLK_ENABLE();
72 |
73 | /* System interrupt init*/
74 |
75 | /* USER CODE BEGIN MspInit 1 */
76 |
77 | /* USER CODE END MspInit 1 */
78 | }
79 |
80 | /* USER CODE BEGIN 1 */
81 |
82 | /* USER CODE END 1 */
83 |
--------------------------------------------------------------------------------
/Core/Src/sysmem.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file sysmem.c
4 | * @author Generated by STM32CubeIDE
5 | * @brief STM32CubeIDE System Memory calls file
6 | *
7 | * For more information about which C functions
8 | * need which of these lowlevel functions
9 | * please consult the newlib libc manual
10 | ******************************************************************************
11 | * @attention
12 | *
13 | * Copyright (c) 2023 STMicroelectronics.
14 | * All rights reserved.
15 | *
16 | * This software is licensed under terms that can be found in the LICENSE file
17 | * in the root directory of this software component.
18 | * If no LICENSE file comes with this software, it is provided AS-IS.
19 | *
20 | ******************************************************************************
21 | */
22 |
23 | /* Includes */
24 | #include
25 | #include
26 |
27 | /**
28 | * Pointer to the current high watermark of the heap usage
29 | */
30 | static uint8_t *__sbrk_heap_end = NULL;
31 |
32 | /**
33 | * @brief _sbrk() allocates memory to the newlib heap and is used by malloc
34 | * and others from the C library
35 | *
36 | * @verbatim
37 | * ############################################################################
38 | * # .data # .bss # newlib heap # MSP stack #
39 | * # # # # Reserved by _Min_Stack_Size #
40 | * ############################################################################
41 | * ^-- RAM start ^-- _end _estack, RAM end --^
42 | * @endverbatim
43 | *
44 | * This implementation starts allocating at the '_end' linker symbol
45 | * The '_Min_Stack_Size' linker symbol reserves a memory for the MSP stack
46 | * The implementation considers '_estack' linker symbol to be RAM end
47 | * NOTE: If the MSP stack, at any point during execution, grows larger than the
48 | * reserved size, please increase the '_Min_Stack_Size'.
49 | *
50 | * @param incr Memory size
51 | * @return Pointer to allocated memory
52 | */
53 | void *_sbrk(ptrdiff_t incr)
54 | {
55 | extern uint8_t _end; /* Symbol defined in the linker script */
56 | extern uint8_t _estack; /* Symbol defined in the linker script */
57 | extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
58 | const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
59 | const uint8_t *max_heap = (uint8_t *)stack_limit;
60 | uint8_t *prev_heap_end;
61 |
62 | /* Initialize heap end at first call */
63 | if (NULL == __sbrk_heap_end)
64 | {
65 | __sbrk_heap_end = &_end;
66 | }
67 |
68 | /* Protect heap from growing into the reserved MSP stack */
69 | if (__sbrk_heap_end + incr > max_heap)
70 | {
71 | errno = ENOMEM;
72 | return (void *)-1;
73 | }
74 |
75 | prev_heap_end = __sbrk_heap_end;
76 | __sbrk_heap_end += incr;
77 |
78 | return (void *)prev_heap_end;
79 | }
80 |
--------------------------------------------------------------------------------
/Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f4xx.h
4 | * @author MCD Application Team
5 | * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * Copyright (c) 2017 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software is licensed under terms that can be found in the LICENSE file
13 | * in the root directory of this software component.
14 | * If no LICENSE file comes with this software, it is provided AS-IS.
15 | *
16 | ******************************************************************************
17 | */
18 |
19 | /** @addtogroup CMSIS
20 | * @{
21 | */
22 |
23 | /** @addtogroup stm32f4xx_system
24 | * @{
25 | */
26 |
27 | /**
28 | * @brief Define to prevent recursive inclusion
29 | */
30 | #ifndef __SYSTEM_STM32F4XX_H
31 | #define __SYSTEM_STM32F4XX_H
32 |
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 |
37 | /** @addtogroup STM32F4xx_System_Includes
38 | * @{
39 | */
40 |
41 | /**
42 | * @}
43 | */
44 |
45 |
46 | /** @addtogroup STM32F4xx_System_Exported_types
47 | * @{
48 | */
49 | /* This variable is updated in three ways:
50 | 1) by calling CMSIS function SystemCoreClockUpdate()
51 | 2) by calling HAL API function HAL_RCC_GetSysClockFreq()
52 | 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
53 | Note: If you use this function to configure the system clock; then there
54 | is no need to call the 2 first functions listed above, since SystemCoreClock
55 | variable is updated automatically.
56 | */
57 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
58 |
59 | extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */
60 | extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | /** @addtogroup STM32F4xx_System_Exported_Constants
67 | * @{
68 | */
69 |
70 | /**
71 | * @}
72 | */
73 |
74 | /** @addtogroup STM32F4xx_System_Exported_Macros
75 | * @{
76 | */
77 |
78 | /**
79 | * @}
80 | */
81 |
82 | /** @addtogroup STM32F4xx_System_Exported_Functions
83 | * @{
84 | */
85 |
86 | extern void SystemInit(void);
87 | extern void SystemCoreClockUpdate(void);
88 | /**
89 | * @}
90 | */
91 |
92 | #ifdef __cplusplus
93 | }
94 | #endif
95 |
96 | #endif /*__SYSTEM_STM32F4XX_H */
97 |
98 | /**
99 | * @}
100 | */
101 |
102 | /**
103 | * @}
104 | */
105 |
--------------------------------------------------------------------------------
/Drivers/CMSIS/Device/ST/STM32F4xx/LICENSE.txt:
--------------------------------------------------------------------------------
1 | This software component is provided to you as part of a software package and
2 | applicable license terms are in the Package_license file. If you received this
3 | software component outside of a package or without applicable license terms,
4 | the terms of the Apache-2.0 license shall apply.
5 | You may obtain a copy of the Apache-2.0 at:
6 | https://opensource.org/licenses/Apache-2.0
7 |
--------------------------------------------------------------------------------
/Drivers/CMSIS/Include/cmsis_version.h:
--------------------------------------------------------------------------------
1 | /**************************************************************************//**
2 | * @file cmsis_version.h
3 | * @brief CMSIS Core(M) Version definitions
4 | * @version V5.0.2
5 | * @date 19. April 2017
6 | ******************************************************************************/
7 | /*
8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
9 | *
10 | * SPDX-License-Identifier: Apache-2.0
11 | *
12 | * Licensed under the Apache License, Version 2.0 (the License); you may
13 | * not use this file except in compliance with the License.
14 | * You may obtain a copy of the License at
15 | *
16 | * www.apache.org/licenses/LICENSE-2.0
17 | *
18 | * Unless required by applicable law or agreed to in writing, software
19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 | * See the License for the specific language governing permissions and
22 | * limitations under the License.
23 | */
24 |
25 | #if defined ( __ICCARM__ )
26 | #pragma system_include /* treat file as system include file for MISRA check */
27 | #elif defined (__clang__)
28 | #pragma clang system_header /* treat file as system include file */
29 | #endif
30 |
31 | #ifndef __CMSIS_VERSION_H
32 | #define __CMSIS_VERSION_H
33 |
34 | /* CMSIS Version definitions */
35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */
36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */
37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \
38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */
39 | #endif
40 |
--------------------------------------------------------------------------------
/Drivers/CMSIS/Include/tz_context.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * @file tz_context.h
3 | * @brief Context Management for Armv8-M TrustZone
4 | * @version V1.0.1
5 | * @date 10. January 2018
6 | ******************************************************************************/
7 | /*
8 | * Copyright (c) 2017-2018 Arm Limited. All rights reserved.
9 | *
10 | * SPDX-License-Identifier: Apache-2.0
11 | *
12 | * Licensed under the Apache License, Version 2.0 (the License); you may
13 | * not use this file except in compliance with the License.
14 | * You may obtain a copy of the License at
15 | *
16 | * www.apache.org/licenses/LICENSE-2.0
17 | *
18 | * Unless required by applicable law or agreed to in writing, software
19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 | * See the License for the specific language governing permissions and
22 | * limitations under the License.
23 | */
24 |
25 | #if defined ( __ICCARM__ )
26 | #pragma system_include /* treat file as system include file for MISRA check */
27 | #elif defined (__clang__)
28 | #pragma clang system_header /* treat file as system include file */
29 | #endif
30 |
31 | #ifndef TZ_CONTEXT_H
32 | #define TZ_CONTEXT_H
33 |
34 | #include
35 |
36 | #ifndef TZ_MODULEID_T
37 | #define TZ_MODULEID_T
38 | /// \details Data type that identifies secure software modules called by a process.
39 | typedef uint32_t TZ_ModuleId_t;
40 | #endif
41 |
42 | /// \details TZ Memory ID identifies an allocated memory slot.
43 | typedef uint32_t TZ_MemoryId_t;
44 |
45 | /// Initialize secure context memory system
46 | /// \return execution status (1: success, 0: error)
47 | uint32_t TZ_InitContextSystem_S (void);
48 |
49 | /// Allocate context memory for calling secure software modules in TrustZone
50 | /// \param[in] module identifies software modules called from non-secure mode
51 | /// \return value != 0 id TrustZone memory slot identifier
52 | /// \return value 0 no memory available or internal error
53 | TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module);
54 |
55 | /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S
56 | /// \param[in] id TrustZone memory slot identifier
57 | /// \return execution status (1: success, 0: error)
58 | uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id);
59 |
60 | /// Load secure context (called on RTOS thread context switch)
61 | /// \param[in] id TrustZone memory slot identifier
62 | /// \return execution status (1: success, 0: error)
63 | uint32_t TZ_LoadContext_S (TZ_MemoryId_t id);
64 |
65 | /// Store secure context (called on RTOS thread context switch)
66 | /// \param[in] id TrustZone memory slot identifier
67 | /// \return execution status (1: success, 0: error)
68 | uint32_t TZ_StoreContext_S (TZ_MemoryId_t id);
69 |
70 | #endif // TZ_CONTEXT_H
71 |
--------------------------------------------------------------------------------
/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_hal_dma_ex.h
4 | * @author MCD Application Team
5 | * @brief Header file of DMA HAL extension module.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * Copyright (c) 2017 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software is licensed under terms that can be found in the LICENSE file in
13 | * the root directory of this software component.
14 | * If no LICENSE file comes with this software, it is provided AS-IS.
15 | *
16 | ******************************************************************************
17 | */
18 |
19 | /* Define to prevent recursive inclusion -------------------------------------*/
20 | #ifndef __STM32F4xx_HAL_DMA_EX_H
21 | #define __STM32F4xx_HAL_DMA_EX_H
22 |
23 | #ifdef __cplusplus
24 | extern "C" {
25 | #endif
26 |
27 | /* Includes ------------------------------------------------------------------*/
28 | #include "stm32f4xx_hal_def.h"
29 |
30 | /** @addtogroup STM32F4xx_HAL_Driver
31 | * @{
32 | */
33 |
34 | /** @addtogroup DMAEx
35 | * @{
36 | */
37 |
38 | /* Exported types ------------------------------------------------------------*/
39 | /** @defgroup DMAEx_Exported_Types DMAEx Exported Types
40 | * @brief DMAEx Exported types
41 | * @{
42 | */
43 |
44 | /**
45 | * @brief HAL DMA Memory definition
46 | */
47 | typedef enum
48 | {
49 | MEMORY0 = 0x00U, /*!< Memory 0 */
50 | MEMORY1 = 0x01U /*!< Memory 1 */
51 | }HAL_DMA_MemoryTypeDef;
52 |
53 | /**
54 | * @}
55 | */
56 |
57 | /* Exported functions --------------------------------------------------------*/
58 | /** @defgroup DMAEx_Exported_Functions DMAEx Exported Functions
59 | * @brief DMAEx Exported functions
60 | * @{
61 | */
62 |
63 | /** @defgroup DMAEx_Exported_Functions_Group1 Extended features functions
64 | * @brief Extended features functions
65 | * @{
66 | */
67 |
68 | /* IO operation functions *******************************************************/
69 | HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength);
70 | HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength);
71 | HAL_StatusTypeDef HAL_DMAEx_ChangeMemory(DMA_HandleTypeDef *hdma, uint32_t Address, HAL_DMA_MemoryTypeDef memory);
72 |
73 | /**
74 | * @}
75 | */
76 | /**
77 | * @}
78 | */
79 |
80 | /* Private functions ---------------------------------------------------------*/
81 | /** @defgroup DMAEx_Private_Functions DMAEx Private Functions
82 | * @brief DMAEx Private functions
83 | * @{
84 | */
85 | /**
86 | * @}
87 | */
88 |
89 | /**
90 | * @}
91 | */
92 |
93 | /**
94 | * @}
95 | */
96 |
97 | #ifdef __cplusplus
98 | }
99 | #endif
100 |
101 | #endif /*__STM32F4xx_HAL_DMA_EX_H*/
102 |
103 |
--------------------------------------------------------------------------------
/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_hal_flash_ramfunc.h
4 | * @author MCD Application Team
5 | * @brief Header file of FLASH RAMFUNC driver.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * Copyright (c) 2017 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software is licensed under terms that can be found in the LICENSE file in
13 | * the root directory of this software component.
14 | * If no LICENSE file comes with this software, it is provided AS-IS.
15 | ******************************************************************************
16 | */
17 |
18 | /* Define to prevent recursive inclusion -------------------------------------*/
19 | #ifndef __STM32F4xx_FLASH_RAMFUNC_H
20 | #define __STM32F4xx_FLASH_RAMFUNC_H
21 |
22 | #ifdef __cplusplus
23 | extern "C" {
24 | #endif
25 | #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) ||\
26 | defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx)
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "stm32f4xx_hal_def.h"
30 |
31 | /** @addtogroup STM32F4xx_HAL_Driver
32 | * @{
33 | */
34 |
35 | /** @addtogroup FLASH_RAMFUNC
36 | * @{
37 | */
38 |
39 | /* Exported types ------------------------------------------------------------*/
40 | /* Exported macro ------------------------------------------------------------*/
41 | /* Exported functions --------------------------------------------------------*/
42 | /** @addtogroup FLASH_RAMFUNC_Exported_Functions
43 | * @{
44 | */
45 |
46 | /** @addtogroup FLASH_RAMFUNC_Exported_Functions_Group1
47 | * @{
48 | */
49 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StopFlashInterfaceClk(void);
50 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StartFlashInterfaceClk(void);
51 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableFlashSleepMode(void);
52 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void);
53 | /**
54 | * @}
55 | */
56 |
57 | /**
58 | * @}
59 | */
60 |
61 | /**
62 | * @}
63 | */
64 |
65 | /**
66 | * @}
67 | */
68 |
69 | #endif /* STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
70 | #ifdef __cplusplus
71 | }
72 | #endif
73 |
74 |
75 | #endif /* __STM32F4xx_FLASH_RAMFUNC_H */
76 |
77 |
--------------------------------------------------------------------------------
/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_i2c_ex.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_hal_i2c_ex.h
4 | * @author MCD Application Team
5 | * @brief Header file of I2C HAL Extension module.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * Copyright (c) 2016 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software is licensed under terms that can be found in the LICENSE file
13 | * in the root directory of this software component.
14 | * If no LICENSE file comes with this software, it is provided AS-IS.
15 | *
16 | ******************************************************************************
17 | */
18 |
19 | /* Define to prevent recursive inclusion -------------------------------------*/
20 | #ifndef __STM32F4xx_HAL_I2C_EX_H
21 | #define __STM32F4xx_HAL_I2C_EX_H
22 |
23 | #ifdef __cplusplus
24 | extern "C" {
25 | #endif
26 |
27 | #if defined(I2C_FLTR_ANOFF)&&defined(I2C_FLTR_DNF)
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "stm32f4xx_hal_def.h"
30 |
31 | /** @addtogroup STM32F4xx_HAL_Driver
32 | * @{
33 | */
34 |
35 | /** @addtogroup I2CEx
36 | * @{
37 | */
38 |
39 | /* Exported types ------------------------------------------------------------*/
40 | /* Exported constants --------------------------------------------------------*/
41 | /** @defgroup I2CEx_Exported_Constants I2C Exported Constants
42 | * @{
43 | */
44 |
45 | /** @defgroup I2CEx_Analog_Filter I2C Analog Filter
46 | * @{
47 | */
48 | #define I2C_ANALOGFILTER_ENABLE 0x00000000U
49 | #define I2C_ANALOGFILTER_DISABLE I2C_FLTR_ANOFF
50 | /**
51 | * @}
52 | */
53 |
54 | /**
55 | * @}
56 | */
57 |
58 | /* Exported macro ------------------------------------------------------------*/
59 | /* Exported functions --------------------------------------------------------*/
60 | /** @addtogroup I2CEx_Exported_Functions
61 | * @{
62 | */
63 |
64 | /** @addtogroup I2CEx_Exported_Functions_Group1
65 | * @{
66 | */
67 | /* Peripheral Control functions ************************************************/
68 | HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter);
69 | HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter);
70 | /**
71 | * @}
72 | */
73 |
74 | /**
75 | * @}
76 | */
77 | /* Private types -------------------------------------------------------------*/
78 | /* Private variables ---------------------------------------------------------*/
79 | /* Private constants ---------------------------------------------------------*/
80 | /** @defgroup I2CEx_Private_Constants I2C Private Constants
81 | * @{
82 | */
83 |
84 | /**
85 | * @}
86 | */
87 |
88 | /* Private macros ------------------------------------------------------------*/
89 | /** @defgroup I2CEx_Private_Macros I2C Private Macros
90 | * @{
91 | */
92 | #define IS_I2C_ANALOG_FILTER(FILTER) (((FILTER) == I2C_ANALOGFILTER_ENABLE) || \
93 | ((FILTER) == I2C_ANALOGFILTER_DISABLE))
94 | #define IS_I2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU)
95 | /**
96 | * @}
97 | */
98 |
99 | /**
100 | * @}
101 | */
102 |
103 | /**
104 | * @}
105 | */
106 |
107 | #endif
108 |
109 | #ifdef __cplusplus
110 | }
111 | #endif
112 |
113 | #endif /* __STM32F4xx_HAL_I2C_EX_H */
114 |
115 |
116 |
--------------------------------------------------------------------------------
/Drivers/STM32F4xx_HAL_Driver/LICENSE.txt:
--------------------------------------------------------------------------------
1 | This software component is provided to you as part of a software package and
2 | applicable license terms are in the Package_license file. If you received this
3 | software component outside of a package or without applicable license terms,
4 | the terms of the BSD-3-Clause license shall apply.
5 | You may obtain a copy of the BSD-3-Clause at:
6 | https://opensource.org/licenses/BSD-3-Clause
7 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 RoboWalker-USTC
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Middlewares/ST/ARM/DSP/Lib/libarm_cortexM4lf_math.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RoboWalker/Engineer2024_Custom_Contoller/194dce49c245a233a7d3669a6651a357c8971cd7/Middlewares/ST/ARM/DSP/Lib/libarm_cortexM4lf_math.a
--------------------------------------------------------------------------------
/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_req.h
4 | * @author MCD Application Team
5 | * @brief Header file for the usbd_req.c file
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * Copyright (c) 2015 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software is licensed under terms that can be found in the LICENSE file
13 | * in the root directory of this software component.
14 | * If no LICENSE file comes with this software, it is provided AS-IS.
15 | *
16 | ******************************************************************************
17 | */
18 |
19 | /* Define to prevent recursive inclusion -------------------------------------*/
20 | #ifndef __USB_REQUEST_H
21 | #define __USB_REQUEST_H
22 |
23 | #ifdef __cplusplus
24 | extern "C" {
25 | #endif
26 |
27 | /* Includes ------------------------------------------------------------------*/
28 | #include "usbd_def.h"
29 |
30 |
31 | /** @addtogroup STM32_USB_DEVICE_LIBRARY
32 | * @{
33 | */
34 |
35 | /** @defgroup USBD_REQ
36 | * @brief header file for the usbd_req.c file
37 | * @{
38 | */
39 |
40 | /** @defgroup USBD_REQ_Exported_Defines
41 | * @{
42 | */
43 | /**
44 | * @}
45 | */
46 |
47 |
48 | /** @defgroup USBD_REQ_Exported_Types
49 | * @{
50 | */
51 | /**
52 | * @}
53 | */
54 |
55 |
56 |
57 | /** @defgroup USBD_REQ_Exported_Macros
58 | * @{
59 | */
60 | /**
61 | * @}
62 | */
63 |
64 | /** @defgroup USBD_REQ_Exported_Variables
65 | * @{
66 | */
67 | /**
68 | * @}
69 | */
70 |
71 | /** @defgroup USBD_REQ_Exported_FunctionsPrototype
72 | * @{
73 | */
74 |
75 | USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
76 | USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
77 | USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
78 |
79 | void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
80 | void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata);
81 | void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len);
82 |
83 | /**
84 | * @}
85 | */
86 |
87 | #ifdef __cplusplus
88 | }
89 | #endif
90 |
91 | #endif /* __USB_REQUEST_H */
92 |
93 | /**
94 | * @}
95 | */
96 |
97 | /**
98 | * @}
99 | */
100 |
101 |
102 |
--------------------------------------------------------------------------------
/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_ioreq.h
4 | * @author MCD Application Team
5 | * @brief Header file for the usbd_ioreq.c file
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * Copyright (c) 2015 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software is licensed under terms that can be found in the LICENSE file
13 | * in the root directory of this software component.
14 | * If no LICENSE file comes with this software, it is provided AS-IS.
15 | *
16 | ******************************************************************************
17 | */
18 |
19 | /* Define to prevent recursive inclusion -------------------------------------*/
20 | #ifndef __USBD_IOREQ_H
21 | #define __USBD_IOREQ_H
22 |
23 | #ifdef __cplusplus
24 | extern "C" {
25 | #endif
26 |
27 | /* Includes ------------------------------------------------------------------*/
28 | #include "usbd_def.h"
29 | #include "usbd_core.h"
30 |
31 | /** @addtogroup STM32_USB_DEVICE_LIBRARY
32 | * @{
33 | */
34 |
35 | /** @defgroup USBD_IOREQ
36 | * @brief header file for the usbd_ioreq.c file
37 | * @{
38 | */
39 |
40 | /** @defgroup USBD_IOREQ_Exported_Defines
41 | * @{
42 | */
43 | /**
44 | * @}
45 | */
46 |
47 |
48 | /** @defgroup USBD_IOREQ_Exported_Types
49 | * @{
50 | */
51 |
52 |
53 | /**
54 | * @}
55 | */
56 |
57 |
58 |
59 | /** @defgroup USBD_IOREQ_Exported_Macros
60 | * @{
61 | */
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | /** @defgroup USBD_IOREQ_Exported_Variables
68 | * @{
69 | */
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | /** @defgroup USBD_IOREQ_Exported_FunctionsPrototype
76 | * @{
77 | */
78 |
79 | USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev,
80 | uint8_t *pbuf, uint32_t len);
81 |
82 | USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev,
83 | uint8_t *pbuf, uint32_t len);
84 |
85 | USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev,
86 | uint8_t *pbuf, uint32_t len);
87 |
88 | USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev,
89 | uint8_t *pbuf, uint32_t len);
90 |
91 | USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev);
92 | USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev);
93 |
94 | uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
95 |
96 | /**
97 | * @}
98 | */
99 |
100 | #ifdef __cplusplus
101 | }
102 | #endif
103 |
104 | #endif /* __USBD_IOREQ_H */
105 |
106 | /**
107 | * @}
108 | */
109 |
110 | /**
111 | * @}
112 | */
113 |
114 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Engineer2024_Custom_Contoller
2 | 2024赛季工程机器人自定义控制器嵌入式代码开源
3 |
4 | ## 写在前面
5 |
6 | RoboWalker战队的工程机器人在区域赛的时候取得了不错的战绩,从区域赛开始基本上稳定单场黄金矿工,并且获得了区域赛东部赛区场均经济最高、单场经济最高。在复活赛,各个强队的工程机器人水平迎头赶上,而我们的工程机器人也出现了一些机械、电路上的战损情况,导致机器人在赛场上的表现有所下滑,不过每场的表现也还算可以接受。现开源工程机器人自定义控制器代码,希望和各队伍多多交流。
7 |
8 | 上位机代码仓库:https://github.com/RoboWalker/Engineer2024_ROS2_Controller
9 |
10 | 嵌入式代码仓库:https://github.com/RoboWalker/Engineer_2024_Embedding
11 |
12 | 自定义控制器代码架构和下位机类似。不过,代码中主要比较有开创性的一点(也可以认为是比较抽象的一点),是作者塞了一个完整的`Eigen`库在里面做矩阵运算用。这虽然极大的方便了代码开发,但也导致编译的时候需要开编译优化,否则会爆Flash。
13 |
14 | 关于自定义控制器的数学推导,见[技术文档](./中国科学技术大学RoboWalker_2024工程机器人技术文档.pdf)
15 |
16 | ## 工具链
17 |
18 | 开发板为达妙F4板,使用`CubeMX`+`cmake`+`armgcc`+`openocd`工具链,使用`Clion`作为IDE开发。
19 |
20 | Clion作为一个成熟的IDE,相比于Keil开发环境,具有代码补全功能丰富、编译超级快等显著优点,同时也可以在Linux系统上配置环境。
21 |
22 | ## 代码架构
23 |
24 | 代码主要构建在User目录下。代码层次为如下。
25 |
26 | ### 0-MWL(Middleware Layer)
27 |
28 | 主要是算法中间件,包括CRC校验、PID、自定义的一些数学库、Eigen。
29 |
30 | ### 1-APL(Application Layer)
31 |
32 | 代码最顶层,包含轮询执行的函数,和中断回调函数。
33 |
34 | ### 2-FML(Function Module Layer)
35 |
36 | 包括底盘、云台、机械臂三个功能模块的类。相关控制函数在类中封装。
37 |
38 | ### 3-HDL(Hardware Driver Layer)
39 |
40 | 底层传感器、执行器等驱动代码,包括控制电机的代码、解析电机数据的代码、读取陀螺仪的代码等。每一个硬件驱动用类来封装。
41 |
42 | ### 4-HAL(Hardware Abstract Layer)
43 |
44 | 自己对stm32 HAL库中的CAN、UART等接口进行再封装。
45 |
--------------------------------------------------------------------------------
/USB_DEVICE/App/usb_device.c:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file : usb_device.c
5 | * @version : v1.0_Cube
6 | * @brief : This file implements the USB Device
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 |
21 | /* Includes ------------------------------------------------------------------*/
22 |
23 | #include "usb_device.h"
24 | #include "usbd_core.h"
25 | #include "usbd_desc.h"
26 | #include "usbd_cdc.h"
27 | #include "usbd_cdc_if.h"
28 |
29 | /* USER CODE BEGIN Includes */
30 |
31 | /* USER CODE END Includes */
32 |
33 | /* USER CODE BEGIN PV */
34 | /* Private variables ---------------------------------------------------------*/
35 |
36 | /* USER CODE END PV */
37 |
38 | /* USER CODE BEGIN PFP */
39 | /* Private function prototypes -----------------------------------------------*/
40 |
41 | /* USER CODE END PFP */
42 |
43 | /* USB Device Core handle declaration. */
44 | USBD_HandleTypeDef hUsbDeviceFS;
45 |
46 | /*
47 | * -- Insert your variables declaration here --
48 | */
49 | /* USER CODE BEGIN 0 */
50 |
51 | /* USER CODE END 0 */
52 |
53 | /*
54 | * -- Insert your external function declaration here --
55 | */
56 | /* USER CODE BEGIN 1 */
57 |
58 | /* USER CODE END 1 */
59 |
60 | /**
61 | * Init USB device Library, add supported class and start the library
62 | * @retval None
63 | */
64 | void MX_USB_DEVICE_Init(void)
65 | {
66 | /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */
67 |
68 | /* USER CODE END USB_DEVICE_Init_PreTreatment */
69 |
70 | /* Init Device Library, add supported class and start the library. */
71 | if (USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS) != USBD_OK)
72 | {
73 | Error_Handler();
74 | }
75 | if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_CDC) != USBD_OK)
76 | {
77 | Error_Handler();
78 | }
79 | if (USBD_CDC_RegisterInterface(&hUsbDeviceFS, &USBD_Interface_fops_FS) != USBD_OK)
80 | {
81 | Error_Handler();
82 | }
83 | if (USBD_Start(&hUsbDeviceFS) != USBD_OK)
84 | {
85 | Error_Handler();
86 | }
87 |
88 | /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */
89 |
90 | /* USER CODE END USB_DEVICE_Init_PostTreatment */
91 | }
92 |
93 | /**
94 | * @}
95 | */
96 |
97 | /**
98 | * @}
99 | */
100 |
101 |
--------------------------------------------------------------------------------
/USB_DEVICE/App/usb_device.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file : usb_device.h
5 | * @version : v1.0_Cube
6 | * @brief : Header for usb_device.c file.
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 |
21 | /* Define to prevent recursive inclusion -------------------------------------*/
22 | #ifndef __USB_DEVICE__H__
23 | #define __USB_DEVICE__H__
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif
28 |
29 | /* Includes ------------------------------------------------------------------*/
30 | #include "stm32f4xx.h"
31 | #include "stm32f4xx_hal.h"
32 | #include "usbd_def.h"
33 |
34 | /* USER CODE BEGIN INCLUDE */
35 |
36 | /* USER CODE END INCLUDE */
37 |
38 | /** @addtogroup USBD_OTG_DRIVER
39 | * @{
40 | */
41 |
42 | /** @defgroup USBD_DEVICE USBD_DEVICE
43 | * @brief Device file for Usb otg low level driver.
44 | * @{
45 | */
46 |
47 | /** @defgroup USBD_DEVICE_Exported_Variables USBD_DEVICE_Exported_Variables
48 | * @brief Public variables.
49 | * @{
50 | */
51 |
52 | /* Private variables ---------------------------------------------------------*/
53 | /* USER CODE BEGIN PV */
54 |
55 | /* USER CODE END PV */
56 |
57 | /* Private function prototypes -----------------------------------------------*/
58 | /* USER CODE BEGIN PFP */
59 |
60 | /* USER CODE END PFP */
61 |
62 | /*
63 | * -- Insert your variables declaration here --
64 | */
65 | /* USER CODE BEGIN VARIABLES */
66 |
67 | /* USER CODE END VARIABLES */
68 | /**
69 | * @}
70 | */
71 |
72 | /** @defgroup USBD_DEVICE_Exported_FunctionsPrototype USBD_DEVICE_Exported_FunctionsPrototype
73 | * @brief Declaration of public functions for Usb device.
74 | * @{
75 | */
76 |
77 | /** USB Device initialization function. */
78 | void MX_USB_DEVICE_Init(void);
79 |
80 | /*
81 | * -- Insert functions declaration here --
82 | */
83 | /* USER CODE BEGIN FD */
84 |
85 | /* USER CODE END FD */
86 | /**
87 | * @}
88 | */
89 |
90 | /**
91 | * @}
92 | */
93 |
94 | /**
95 | * @}
96 | */
97 |
98 | #ifdef __cplusplus
99 | }
100 | #endif
101 |
102 | #endif /* __USB_DEVICE__H__ */
103 |
--------------------------------------------------------------------------------
/USB_DEVICE/App/usbd_cdc_if.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file : usbd_cdc_if.h
5 | * @version : v1.0_Cube
6 | * @brief : Header for usbd_cdc_if.c file.
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * Copyright (c) 2024 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software is licensed under terms that can be found in the LICENSE file
14 | * in the root directory of this software component.
15 | * If no LICENSE file comes with this software, it is provided AS-IS.
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 |
21 | /* Define to prevent recursive inclusion -------------------------------------*/
22 | #ifndef __USBD_CDC_IF_H__
23 | #define __USBD_CDC_IF_H__
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif
28 |
29 | /* Includes ------------------------------------------------------------------*/
30 | #include "usbd_cdc.h"
31 |
32 | /* USER CODE BEGIN INCLUDE */
33 |
34 | /* USER CODE END INCLUDE */
35 |
36 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
37 | * @brief For Usb device.
38 | * @{
39 | */
40 |
41 | /** @defgroup USBD_CDC_IF USBD_CDC_IF
42 | * @brief Usb VCP device module
43 | * @{
44 | */
45 |
46 | /** @defgroup USBD_CDC_IF_Exported_Defines USBD_CDC_IF_Exported_Defines
47 | * @brief Defines.
48 | * @{
49 | */
50 | /* Define size for the receive and transmit buffer over CDC */
51 | #define APP_RX_DATA_SIZE 2048
52 | #define APP_TX_DATA_SIZE 2048
53 | /* USER CODE BEGIN EXPORTED_DEFINES */
54 |
55 | /* USER CODE END EXPORTED_DEFINES */
56 |
57 | /**
58 | * @}
59 | */
60 |
61 | /** @defgroup USBD_CDC_IF_Exported_Types USBD_CDC_IF_Exported_Types
62 | * @brief Types.
63 | * @{
64 | */
65 |
66 | /* USER CODE BEGIN EXPORTED_TYPES */
67 |
68 | /* USER CODE END EXPORTED_TYPES */
69 |
70 | /**
71 | * @}
72 | */
73 |
74 | /** @defgroup USBD_CDC_IF_Exported_Macros USBD_CDC_IF_Exported_Macros
75 | * @brief Aliases.
76 | * @{
77 | */
78 |
79 | /* USER CODE BEGIN EXPORTED_MACRO */
80 |
81 | /* USER CODE END EXPORTED_MACRO */
82 |
83 | /**
84 | * @}
85 | */
86 |
87 | /** @defgroup USBD_CDC_IF_Exported_Variables USBD_CDC_IF_Exported_Variables
88 | * @brief Public variables.
89 | * @{
90 | */
91 |
92 | /** CDC Interface callback. */
93 | extern USBD_CDC_ItfTypeDef USBD_Interface_fops_FS;
94 |
95 | /* USER CODE BEGIN EXPORTED_VARIABLES */
96 |
97 | /* USER CODE END EXPORTED_VARIABLES */
98 |
99 | /**
100 | * @}
101 | */
102 |
103 | /** @defgroup USBD_CDC_IF_Exported_FunctionsPrototype USBD_CDC_IF_Exported_FunctionsPrototype
104 | * @brief Public functions declaration.
105 | * @{
106 | */
107 |
108 | uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len);
109 |
110 | /* USER CODE BEGIN EXPORTED_FUNCTIONS */
111 |
112 | /* USER CODE END EXPORTED_FUNCTIONS */
113 |
114 | /**
115 | * @}
116 | */
117 |
118 | /**
119 | * @}
120 | */
121 |
122 | /**
123 | * @}
124 | */
125 |
126 | #ifdef __cplusplus
127 | }
128 | #endif
129 |
130 | #endif /* __USBD_CDC_IF_H__ */
131 |
132 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/Inc/CRC.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file CRC.h
3 | * @author gjc
4 | * @brief
5 | * @version 0.1
6 | * @date 2024-01-11
7 | *
8 | * @copyright USTC-RoboWalker (c) 2024
9 | *
10 | */
11 |
12 | #ifndef CRC_H
13 | #define CRC_H
14 |
15 | /* Includes ------------------------------------------------------------------*/
16 | #include "main.h"
17 | /* Exported macros -----------------------------------------------------------*/
18 |
19 | /* Exported types ------------------------------------------------------------*/
20 |
21 | /* Exported variables --------------------------------------------------------*/
22 |
23 | /* Exported function declarations --------------------------------------------*/
24 | unsigned char Get_CRC8_Check_Sum(unsigned char *pchMessage,unsigned int dwLength,unsigned char ucCRC8);
25 | unsigned int Verify_CRC8_Check_Sum(unsigned char *pchMessage, unsigned int dwLength);
26 | void Append_CRC8_Check_Sum(unsigned char *pchMessage, unsigned int dwLength);
27 | uint16_t Get_CRC16_Check_Sum(uint8_t *pchMessage,uint32_t dwLength,uint16_t wCRC);
28 | uint32_t Verify_CRC16_Check_Sum(uint8_t *pchMessage, uint32_t dwLength);
29 | void Append_CRC16_Check_Sum(uint8_t * pchMessage,uint32_t dwLength);
30 |
31 | #endif
32 |
33 | /************************ COPYRIGHT(C) USTC-ROBOWALKER **************************/
34 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/Inc/User_Math.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file Math.h
3 | * @brief 数学库
4 | *
5 | * @author Tang-yucheng
6 | * @date 2023-11-17 (创建)
7 | *
8 | */
9 |
10 | #ifndef __MWL_MATH_H
11 | #define __MWL_MATH_H
12 |
13 | /* 头文件引用 ----------------------------------------------------------------------------------------------------------*/
14 | #include "arm_math.h"
15 | #include "float.h"
16 | #include "limits.h"
17 | #include "stdint.h"
18 |
19 | /* 宏定义 -------------------------------------------------------------------------------------------------------------*/
20 | //RPM换算到rad/s
21 | #define RPM_TO_RADPS (2.0f * PI / 60.0f)
22 | //deg换算到rad
23 | #define DEG_TO_RAD (PI / 180.0f)
24 | //摄氏度换算到开氏度
25 | #define CELSIUS_TO_KELVIN (273.15f)
26 | //重力加速度
27 | //合肥9.7933
28 | #define GRAVITY_ACCELERATE (9.7933f)
29 |
30 | /* 函数声明 ------------------------------------------------------------------------------------------------------------*/
31 | void Math_Endian_Reverse_16(void *Address);
32 | void Math_Endian_Reverse_16(void *Source, void *Destination);
33 | void Math_Endian_Reverse_32(void *Address);
34 | void Math_Endian_Reverse_32(void *Source, void *Destination);
35 | uint8_t Math_Sum_8(uint8_t *Address, uint32_t Length);
36 | uint16_t Math_Sum_16(uint16_t *Address, uint32_t Length);
37 | uint32_t Math_Sum_32(uint32_t *Address, uint32_t Length);
38 | float Math_Sinc(float x);
39 | int32_t Math_Float_To_Int(float x, float Float_Min, float Float_Max, int32_t Int_Min, int32_t Int_Max);
40 | float Math_Int_To_Float(int32_t x, int32_t Int_Min, int32_t Int_Max, float Float_Min, float Float_Max);
41 | void Math_Matrix_Multiply_3_3(float (*_RotationMatrix_1)[3],float (*_RotationMatrix_2)[3],float (*_RotationMatrix_Out)[3]);
42 | void Math_Matrix_Multiply_3_1(float (*_RotationMatrix_1)[3],float (*_RotationMatrix_2),float (*_RotationMatrix_Out));
43 |
44 | /**
45 | * @brief 限幅函数
46 | *
47 | * @tparam Type
48 | * @param x 传入数据
49 | * @param Min 最小值
50 | * @param Max 最大值
51 | */
52 | template
53 | void Math_Constrain(Type *x, Type Min, Type Max)
54 | {
55 | if(*x < Min)
56 | {
57 | *x = Min;
58 | }
59 | else if(*x > Max)
60 | {
61 | *x = Max;
62 | }
63 | }
64 |
65 | /**
66 | * @brief 求绝对值
67 | *
68 | * @tparam Type
69 | * @param x 传入数据
70 | * @return Type x的绝对值
71 | */
72 | template
73 | Type Math_Abs(Type x)
74 | {
75 | return ((x > 0) ? x : -x);
76 | }
77 |
78 | #endif /* MWL_Math.h */
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/.hgeol:
--------------------------------------------------------------------------------
1 | [patterns]
2 | *.sh = LF
3 | *.MINPACK = CRLF
4 | scripts/*.in = LF
5 | debug/msvc/*.dat = CRLF
6 | debug/msvc/*.natvis = CRLF
7 | unsupported/test/mpreal/*.* = CRLF
8 | ** = native
9 |
10 | [repository]
11 | native = LF
12 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/COPYING.BSD:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2011, Intel Corporation. All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification,
5 | are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above copyright notice,
10 | this list of conditions and the following disclaimer in the documentation
11 | and/or other materials provided with the distribution.
12 | * Neither the name of Intel Corporation nor the names of its contributors may
13 | be used to endorse or promote products derived from this software without
14 | specific prior written permission.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | */
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/COPYING.MINPACK:
--------------------------------------------------------------------------------
1 | Minpack Copyright Notice (1999) University of Chicago. All rights reserved
2 |
3 | Redistribution and use in source and binary forms, with or
4 | without modification, are permitted provided that the
5 | following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above
8 | copyright notice, this list of conditions and the following
9 | disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above
12 | copyright notice, this list of conditions and the following
13 | disclaimer in the documentation and/or other materials
14 | provided with the distribution.
15 |
16 | 3. The end-user documentation included with the
17 | redistribution, if any, must include the following
18 | acknowledgment:
19 |
20 | "This product includes software developed by the
21 | University of Chicago, as Operator of Argonne National
22 | Laboratory.
23 |
24 | Alternately, this acknowledgment may appear in the software
25 | itself, if and wherever such third-party acknowledgments
26 | normally appear.
27 |
28 | 4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS"
29 | WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE
30 | UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
31 | THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR
32 | IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES
33 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE
34 | OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY
35 | OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
36 | USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF
37 | THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)
38 | DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
39 | UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL
40 | BE CORRECTED.
41 |
42 | 5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT
43 | HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
44 | ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,
45 | INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF
46 | ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF
47 | PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER
48 | SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT
49 | (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,
50 | EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE
51 | POSSIBILITY OF SUCH LOSS OR DAMAGES.
52 |
53 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/COPYING.README:
--------------------------------------------------------------------------------
1 | Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links:
2 | http://www.mozilla.org/MPL/2.0/
3 | http://www.mozilla.org/MPL/2.0/FAQ.html
4 |
5 | Some files contain third-party code under BSD or LGPL licenses, whence the other
6 | COPYING.* files here.
7 |
8 | All the LGPL code is either LGPL 2.1-only, or LGPL 2.1-or-later.
9 | For this reason, the COPYING.LGPL file contains the LGPL 2.1 text.
10 |
11 | If you want to guarantee that the Eigen code that you are #including is licensed
12 | under the MPL2 and possibly more permissive licenses (like BSD), #define this
13 | preprocessor symbol:
14 | EIGEN_MPL2_ONLY
15 | For example, with most compilers, you could add this to your project CXXFLAGS:
16 | -DEIGEN_MPL2_ONLY
17 | This will cause a compilation error to be generated if you #include any code that is
18 | LGPL licensed.
19 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/CTestConfig.cmake:
--------------------------------------------------------------------------------
1 | ## This file should be placed in the root directory of your project.
2 | ## Then modify the CMakeLists.txt file in the root directory of your
3 | ## project to incorporate the testing dashboard.
4 | ## # The following are required to uses Dart and the Cdash dashboard
5 | ## ENABLE_TESTING()
6 | ## INCLUDE(CTest)
7 | set(CTEST_PROJECT_NAME "Eigen")
8 | set(CTEST_NIGHTLY_START_TIME "00:00:00 UTC")
9 |
10 | set(CTEST_DROP_METHOD "http")
11 | set(CTEST_DROP_SITE "my.cdash.org")
12 | set(CTEST_DROP_LOCATION "/submit.php?project=Eigen")
13 | set(CTEST_DROP_SITE_CDASH TRUE)
14 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/CTestCustom.cmake.in:
--------------------------------------------------------------------------------
1 |
2 | set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "2000")
3 | set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "2000")
4 | list(APPEND CTEST_CUSTOM_ERROR_EXCEPTION @EIGEN_CTEST_ERROR_EXCEPTION@)
5 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include(RegexUtils)
2 | test_escape_string_as_regex()
3 |
4 | file(GLOB Eigen_directory_files "*")
5 |
6 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
7 |
8 | foreach(f ${Eigen_directory_files})
9 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src")
10 | list(APPEND Eigen_directory_files_to_install ${f})
11 | endif()
12 | endforeach(f ${Eigen_directory_files})
13 |
14 | install(FILES
15 | ${Eigen_directory_files_to_install}
16 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel
17 | )
18 |
19 | install(DIRECTORY src DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel FILES_MATCHING PATTERN "*.h")
20 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/Cholesky:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_CHOLESKY_MODULE_H
9 | #define EIGEN_CHOLESKY_MODULE_H
10 |
11 | #include "Core"
12 | #include "Jacobi"
13 |
14 | #include "src/Core/util/DisableStupidWarnings.h"
15 |
16 | /** \defgroup Cholesky_Module Cholesky module
17 | *
18 | *
19 | *
20 | * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.
21 | * Those decompositions are also accessible via the following methods:
22 | * - MatrixBase::llt()
23 | * - MatrixBase::ldlt()
24 | * - SelfAdjointView::llt()
25 | * - SelfAdjointView::ldlt()
26 | *
27 | * \code
28 | * #include
29 | * \endcode
30 | */
31 |
32 | #include "src/Cholesky/LLT.h"
33 | #include "src/Cholesky/LDLT.h"
34 | #ifdef EIGEN_USE_LAPACKE
35 | #ifdef EIGEN_USE_MKL
36 | #include "mkl_lapacke.h"
37 | #else
38 | #include "src/misc/lapacke.h"
39 | #endif
40 | #include "src/Cholesky/LLT_LAPACKE.h"
41 | #endif
42 |
43 | #include "src/Core/util/ReenableStupidWarnings.h"
44 |
45 | #endif // EIGEN_CHOLESKY_MODULE_H
46 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
47 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/CholmodSupport:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_CHOLMODSUPPORT_MODULE_H
9 | #define EIGEN_CHOLMODSUPPORT_MODULE_H
10 |
11 | #include "SparseCore"
12 |
13 | #include "src/Core/util/DisableStupidWarnings.h"
14 |
15 | extern "C" {
16 | #include
17 | }
18 |
19 | /** \ingroup Support_modules
20 | * \defgroup CholmodSupport_Module CholmodSupport module
21 | *
22 | * This module provides an interface to the Cholmod library which is part of the suitesparse package.
23 | * It provides the two following main factorization classes:
24 | * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization.
25 | * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial).
26 | *
27 | * For the sake of completeness, this module also propose the two following classes:
28 | * - class CholmodSimplicialLLT
29 | * - class CholmodSimplicialLDLT
30 | * Note that these classes does not bring any particular advantage compared to the built-in
31 | * SimplicialLLT and SimplicialLDLT factorization classes.
32 | *
33 | * \code
34 | * #include
35 | * \endcode
36 | *
37 | * In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies.
38 | * The dependencies depend on how cholmod has been compiled.
39 | * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task.
40 | *
41 | */
42 |
43 | #include "src/CholmodSupport/CholmodSupport.h"
44 |
45 | #include "src/Core/util/ReenableStupidWarnings.h"
46 |
47 | #endif // EIGEN_CHOLMODSUPPORT_MODULE_H
48 |
49 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/Dense:
--------------------------------------------------------------------------------
1 | #include "Core"
2 | #include "LU"
3 | #include "Cholesky"
4 | #include "QR"
5 | #include "SVD"
6 | #include "Geometry"
7 | #include "Eigenvalues"
8 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/Eigen:
--------------------------------------------------------------------------------
1 | #include "Dense"
2 | #include "Sparse"
3 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/Eigenvalues:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_EIGENVALUES_MODULE_H
9 | #define EIGEN_EIGENVALUES_MODULE_H
10 |
11 | #include "Core"
12 |
13 | #include "Cholesky"
14 | #include "Jacobi"
15 | #include "Householder"
16 | #include "LU"
17 | #include "Geometry"
18 |
19 | #include "src/Core/util/DisableStupidWarnings.h"
20 |
21 | /** \defgroup Eigenvalues_Module Eigenvalues module
22 | *
23 | *
24 | *
25 | * This module mainly provides various eigenvalue solvers.
26 | * This module also provides some MatrixBase methods, including:
27 | * - MatrixBase::eigenvalues(),
28 | * - MatrixBase::operatorNorm()
29 | *
30 | * \code
31 | * #include
32 | * \endcode
33 | */
34 |
35 | #include "src/misc/RealSvd2x2.h"
36 | #include "src/Eigenvalues/Tridiagonalization.h"
37 | #include "src/Eigenvalues/RealSchur.h"
38 | #include "src/Eigenvalues/EigenSolver.h"
39 | #include "src/Eigenvalues/SelfAdjointEigenSolver.h"
40 | #include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h"
41 | #include "src/Eigenvalues/HessenbergDecomposition.h"
42 | #include "src/Eigenvalues/ComplexSchur.h"
43 | #include "src/Eigenvalues/ComplexEigenSolver.h"
44 | #include "src/Eigenvalues/RealQZ.h"
45 | #include "src/Eigenvalues/GeneralizedEigenSolver.h"
46 | #include "src/Eigenvalues/MatrixBaseEigenvalues.h"
47 | #ifdef EIGEN_USE_LAPACKE
48 | #ifdef EIGEN_USE_MKL
49 | #include "mkl_lapacke.h"
50 | #else
51 | #include "src/misc/lapacke.h"
52 | #endif
53 | #include "src/Eigenvalues/RealSchur_LAPACKE.h"
54 | #include "src/Eigenvalues/ComplexSchur_LAPACKE.h"
55 | #include "src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h"
56 | #endif
57 |
58 | #include "src/Core/util/ReenableStupidWarnings.h"
59 |
60 | #endif // EIGEN_EIGENVALUES_MODULE_H
61 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
62 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/Geometry:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_GEOMETRY_MODULE_H
9 | #define EIGEN_GEOMETRY_MODULE_H
10 |
11 | #include "Core"
12 |
13 | #include "SVD"
14 | #include "LU"
15 | #include
16 |
17 | #include "src/Core/util/DisableStupidWarnings.h"
18 |
19 | /** \defgroup Geometry_Module Geometry module
20 | *
21 | * This module provides support for:
22 | * - fixed-size homogeneous transformations
23 | * - translation, scaling, 2D and 3D rotations
24 | * - \link Quaternion quaternions \endlink
25 | * - cross products (\ref MatrixBase::cross, \ref MatrixBase::cross3)
26 | * - orthognal vector generation (\ref MatrixBase::unitOrthogonal)
27 | * - some linear components: \link ParametrizedLine parametrized-lines \endlink and \link Hyperplane hyperplanes \endlink
28 | * - \link AlignedBox axis aligned bounding boxes \endlink
29 | * - \link umeyama least-square transformation fitting \endlink
30 | *
31 | * \code
32 | * #include
33 | * \endcode
34 | */
35 |
36 | #include "src/Geometry/OrthoMethods.h"
37 | #include "src/Geometry/EulerAngles.h"
38 |
39 | #include "src/Geometry/Homogeneous.h"
40 | #include "src/Geometry/RotationBase.h"
41 | #include "src/Geometry/Rotation2D.h"
42 | #include "src/Geometry/Quaternion.h"
43 | #include "src/Geometry/AngleAxis.h"
44 | #include "src/Geometry/Transform.h"
45 | #include "src/Geometry/Translation.h"
46 | #include "src/Geometry/Scaling.h"
47 | #include "src/Geometry/Hyperplane.h"
48 | #include "src/Geometry/ParametrizedLine.h"
49 | #include "src/Geometry/AlignedBox.h"
50 | #include "src/Geometry/Umeyama.h"
51 |
52 | // Use the SSE optimized version whenever possible. At the moment the
53 | // SSE version doesn't compile when AVX is enabled
54 | #if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX
55 | #include "src/Geometry/arch/Geometry_SSE.h"
56 | #endif
57 |
58 | #include "src/Core/util/ReenableStupidWarnings.h"
59 |
60 | #endif // EIGEN_GEOMETRY_MODULE_H
61 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
62 |
63 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/Householder:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_HOUSEHOLDER_MODULE_H
9 | #define EIGEN_HOUSEHOLDER_MODULE_H
10 |
11 | #include "Core"
12 |
13 | #include "src/Core/util/DisableStupidWarnings.h"
14 |
15 | /** \defgroup Householder_Module Householder module
16 | * This module provides Householder transformations.
17 | *
18 | * \code
19 | * #include
20 | * \endcode
21 | */
22 |
23 | #include "src/Householder/Householder.h"
24 | #include "src/Householder/HouseholderSequence.h"
25 | #include "src/Householder/BlockHouseholder.h"
26 |
27 | #include "src/Core/util/ReenableStupidWarnings.h"
28 |
29 | #endif // EIGEN_HOUSEHOLDER_MODULE_H
30 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
31 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/IterativeLinearSolvers:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_ITERATIVELINEARSOLVERS_MODULE_H
9 | #define EIGEN_ITERATIVELINEARSOLVERS_MODULE_H
10 |
11 | #include "SparseCore"
12 | #include "OrderingMethods"
13 |
14 | #include "src/Core/util/DisableStupidWarnings.h"
15 |
16 | /**
17 | * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module
18 | *
19 | * This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse.
20 | * Those solvers are accessible via the following classes:
21 | * - ConjugateGradient for selfadjoint (hermitian) matrices,
22 | * - LeastSquaresConjugateGradient for rectangular least-square problems,
23 | * - BiCGSTAB for general square matrices.
24 | *
25 | * These iterative solvers are associated with some preconditioners:
26 | * - IdentityPreconditioner - not really useful
27 | * - DiagonalPreconditioner - also called Jacobi preconditioner, work very well on diagonal dominant matrices.
28 | * - IncompleteLUT - incomplete LU factorization with dual thresholding
29 | *
30 | * Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport.
31 | *
32 | \code
33 | #include
34 | \endcode
35 | */
36 |
37 | #include "src/IterativeLinearSolvers/SolveWithGuess.h"
38 | #include "src/IterativeLinearSolvers/IterativeSolverBase.h"
39 | #include "src/IterativeLinearSolvers/BasicPreconditioners.h"
40 | #include "src/IterativeLinearSolvers/ConjugateGradient.h"
41 | #include "src/IterativeLinearSolvers/LeastSquareConjugateGradient.h"
42 | #include "src/IterativeLinearSolvers/BiCGSTAB.h"
43 | #include "src/IterativeLinearSolvers/IncompleteLUT.h"
44 | #include "src/IterativeLinearSolvers/IncompleteCholesky.h"
45 |
46 | #include "src/Core/util/ReenableStupidWarnings.h"
47 |
48 | #endif // EIGEN_ITERATIVELINEARSOLVERS_MODULE_H
49 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/Jacobi:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_JACOBI_MODULE_H
9 | #define EIGEN_JACOBI_MODULE_H
10 |
11 | #include "Core"
12 |
13 | #include "src/Core/util/DisableStupidWarnings.h"
14 |
15 | /** \defgroup Jacobi_Module Jacobi module
16 | * This module provides Jacobi and Givens rotations.
17 | *
18 | * \code
19 | * #include
20 | * \endcode
21 | *
22 | * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation:
23 | * - MatrixBase::applyOnTheLeft()
24 | * - MatrixBase::applyOnTheRight().
25 | */
26 |
27 | #include "src/Jacobi/Jacobi.h"
28 |
29 | #include "src/Core/util/ReenableStupidWarnings.h"
30 |
31 | #endif // EIGEN_JACOBI_MODULE_H
32 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
33 |
34 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/LU:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_LU_MODULE_H
9 | #define EIGEN_LU_MODULE_H
10 |
11 | #include "Core"
12 |
13 | #include "src/Core/util/DisableStupidWarnings.h"
14 |
15 | /** \defgroup LU_Module LU module
16 | * This module includes %LU decomposition and related notions such as matrix inversion and determinant.
17 | * This module defines the following MatrixBase methods:
18 | * - MatrixBase::inverse()
19 | * - MatrixBase::determinant()
20 | *
21 | * \code
22 | * #include
23 | * \endcode
24 | */
25 |
26 | #include "src/misc/Kernel.h"
27 | #include "src/misc/Image.h"
28 | #include "src/LU/FullPivLU.h"
29 | #include "src/LU/PartialPivLU.h"
30 | #ifdef EIGEN_USE_LAPACKE
31 | #ifdef EIGEN_USE_MKL
32 | #include "mkl_lapacke.h"
33 | #else
34 | #include "src/misc/lapacke.h"
35 | #endif
36 | #include "src/LU/PartialPivLU_LAPACKE.h"
37 | #endif
38 | #include "src/LU/Determinant.h"
39 | #include "src/LU/InverseImpl.h"
40 |
41 | // Use the SSE optimized version whenever possible. At the moment the
42 | // SSE version doesn't compile when AVX is enabled
43 | #if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX
44 | #include "src/LU/arch/Inverse_SSE.h"
45 | #endif
46 |
47 | #include "src/Core/util/ReenableStupidWarnings.h"
48 |
49 | #endif // EIGEN_LU_MODULE_H
50 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
51 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/MetisSupport:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_METISSUPPORT_MODULE_H
9 | #define EIGEN_METISSUPPORT_MODULE_H
10 |
11 | #include "SparseCore"
12 |
13 | #include "src/Core/util/DisableStupidWarnings.h"
14 |
15 | extern "C" {
16 | #include
17 | }
18 |
19 |
20 | /** \ingroup Support_modules
21 | * \defgroup MetisSupport_Module MetisSupport module
22 | *
23 | * \code
24 | * #include
25 | * \endcode
26 | * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis).
27 | * It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink
28 | */
29 |
30 |
31 | #include "src/MetisSupport/MetisSupport.h"
32 |
33 | #include "src/Core/util/ReenableStupidWarnings.h"
34 |
35 | #endif // EIGEN_METISSUPPORT_MODULE_H
36 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/OrderingMethods:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_ORDERINGMETHODS_MODULE_H
9 | #define EIGEN_ORDERINGMETHODS_MODULE_H
10 |
11 | #include "SparseCore"
12 |
13 | #include "src/Core/util/DisableStupidWarnings.h"
14 |
15 | /**
16 | * \defgroup OrderingMethods_Module OrderingMethods module
17 | *
18 | * This module is currently for internal use only
19 | *
20 | * It defines various built-in and external ordering methods for sparse matrices.
21 | * They are typically used to reduce the number of elements during
22 | * the sparse matrix decomposition (LLT, LU, QR).
23 | * Precisely, in a preprocessing step, a permutation matrix P is computed using
24 | * those ordering methods and applied to the columns of the matrix.
25 | * Using for instance the sparse Cholesky decomposition, it is expected that
26 | * the nonzeros elements in LLT(A*P) will be much smaller than that in LLT(A).
27 | *
28 | *
29 | * Usage :
30 | * \code
31 | * #include
32 | * \endcode
33 | *
34 | * A simple usage is as a template parameter in the sparse decomposition classes :
35 | *
36 | * \code
37 | * SparseLU > solver;
38 | * \endcode
39 | *
40 | * \code
41 | * SparseQR > solver;
42 | * \endcode
43 | *
44 | * It is possible as well to call directly a particular ordering method for your own purpose,
45 | * \code
46 | * AMDOrdering ordering;
47 | * PermutationMatrix perm;
48 | * SparseMatrix A;
49 | * //Fill the matrix ...
50 | *
51 | * ordering(A, perm); // Call AMD
52 | * \endcode
53 | *
54 | * \note Some of these methods (like AMD or METIS), need the sparsity pattern
55 | * of the input matrix to be symmetric. When the matrix is structurally unsymmetric,
56 | * Eigen computes internally the pattern of \f$A^T*A\f$ before calling the method.
57 | * If your matrix is already symmetric (at leat in structure), you can avoid that
58 | * by calling the method with a SelfAdjointView type.
59 | *
60 | * \code
61 | * // Call the ordering on the pattern of the lower triangular matrix A
62 | * ordering(A.selfadjointView(), perm);
63 | * \endcode
64 | */
65 |
66 | #ifndef EIGEN_MPL2_ONLY
67 | #include "src/OrderingMethods/Amd.h"
68 | #endif
69 |
70 | #include "src/OrderingMethods/Ordering.h"
71 | #include "src/Core/util/ReenableStupidWarnings.h"
72 |
73 | #endif // EIGEN_ORDERINGMETHODS_MODULE_H
74 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/PaStiXSupport:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_PASTIXSUPPORT_MODULE_H
9 | #define EIGEN_PASTIXSUPPORT_MODULE_H
10 |
11 | #include "SparseCore"
12 |
13 | #include "src/Core/util/DisableStupidWarnings.h"
14 |
15 | extern "C" {
16 | #include
17 | #include
18 | }
19 |
20 | #ifdef complex
21 | #undef complex
22 | #endif
23 |
24 | /** \ingroup Support_modules
25 | * \defgroup PaStiXSupport_Module PaStiXSupport module
26 | *
27 | * This module provides an interface to the PaSTiX library.
28 | * PaSTiX is a general \b supernodal, \b parallel and \b opensource sparse solver.
29 | * It provides the two following main factorization classes:
30 | * - class PastixLLT : a supernodal, parallel LLt Cholesky factorization.
31 | * - class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization.
32 | * - class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern).
33 | *
34 | * \code
35 | * #include
36 | * \endcode
37 | *
38 | * In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies.
39 | * The dependencies depend on how PaSTiX has been compiled.
40 | * For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task.
41 | *
42 | */
43 |
44 | #include "src/PaStiXSupport/PaStiXSupport.h"
45 |
46 | #include "src/Core/util/ReenableStupidWarnings.h"
47 |
48 | #endif // EIGEN_PASTIXSUPPORT_MODULE_H
49 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/PardisoSupport:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_PARDISOSUPPORT_MODULE_H
9 | #define EIGEN_PARDISOSUPPORT_MODULE_H
10 |
11 | #include "SparseCore"
12 |
13 | #include "src/Core/util/DisableStupidWarnings.h"
14 |
15 | #include
16 |
17 | /** \ingroup Support_modules
18 | * \defgroup PardisoSupport_Module PardisoSupport module
19 | *
20 | * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers.
21 | *
22 | * \code
23 | * #include
24 | * \endcode
25 | *
26 | * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies.
27 | * See this \ref TopicUsingIntelMKL "page" for more information on MKL-Eigen integration.
28 | *
29 | */
30 |
31 | #include "src/PardisoSupport/PardisoSupport.h"
32 |
33 | #include "src/Core/util/ReenableStupidWarnings.h"
34 |
35 | #endif // EIGEN_PARDISOSUPPORT_MODULE_H
36 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/QR:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_QR_MODULE_H
9 | #define EIGEN_QR_MODULE_H
10 |
11 | #include "Core"
12 |
13 | #include "Cholesky"
14 | #include "Jacobi"
15 | #include "Householder"
16 |
17 | #include "src/Core/util/DisableStupidWarnings.h"
18 |
19 | /** \defgroup QR_Module QR module
20 | *
21 | *
22 | *
23 | * This module provides various QR decompositions
24 | * This module also provides some MatrixBase methods, including:
25 | * - MatrixBase::householderQr()
26 | * - MatrixBase::colPivHouseholderQr()
27 | * - MatrixBase::fullPivHouseholderQr()
28 | *
29 | * \code
30 | * #include
31 | * \endcode
32 | */
33 |
34 | #include "src/QR/HouseholderQR.h"
35 | #include "src/QR/FullPivHouseholderQR.h"
36 | #include "src/QR/ColPivHouseholderQR.h"
37 | #include "src/QR/CompleteOrthogonalDecomposition.h"
38 | #ifdef EIGEN_USE_LAPACKE
39 | #ifdef EIGEN_USE_MKL
40 | #include "mkl_lapacke.h"
41 | #else
42 | #include "src/misc/lapacke.h"
43 | #endif
44 | #include "src/QR/HouseholderQR_LAPACKE.h"
45 | #include "src/QR/ColPivHouseholderQR_LAPACKE.h"
46 | #endif
47 |
48 | #include "src/Core/util/ReenableStupidWarnings.h"
49 |
50 | #endif // EIGEN_QR_MODULE_H
51 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
52 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/QtAlignedMalloc:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_QTMALLOC_MODULE_H
9 | #define EIGEN_QTMALLOC_MODULE_H
10 |
11 | #include "Core"
12 |
13 | #if (!EIGEN_MALLOC_ALREADY_ALIGNED)
14 |
15 | #include "src/Core/util/DisableStupidWarnings.h"
16 |
17 | void *qMalloc(std::size_t size)
18 | {
19 | return Eigen::internal::aligned_malloc(size);
20 | }
21 |
22 | void qFree(void *ptr)
23 | {
24 | Eigen::internal::aligned_free(ptr);
25 | }
26 |
27 | void *qRealloc(void *ptr, std::size_t size)
28 | {
29 | void* newPtr = Eigen::internal::aligned_malloc(size);
30 | std::memcpy(newPtr, ptr, size);
31 | Eigen::internal::aligned_free(ptr);
32 | return newPtr;
33 | }
34 |
35 | #include "src/Core/util/ReenableStupidWarnings.h"
36 |
37 | #endif
38 |
39 | #endif // EIGEN_QTMALLOC_MODULE_H
40 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
41 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/SPQRSupport:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_SPQRSUPPORT_MODULE_H
9 | #define EIGEN_SPQRSUPPORT_MODULE_H
10 |
11 | #include "SparseCore"
12 |
13 | #include "src/Core/util/DisableStupidWarnings.h"
14 |
15 | #include "SuiteSparseQR.hpp"
16 |
17 | /** \ingroup Support_modules
18 | * \defgroup SPQRSupport_Module SuiteSparseQR module
19 | *
20 | * This module provides an interface to the SPQR library, which is part of the suitesparse package.
21 | *
22 | * \code
23 | * #include
24 | * \endcode
25 | *
26 | * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...).
27 | * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules
28 | *
29 | */
30 |
31 | #include "src/CholmodSupport/CholmodSupport.h"
32 | #include "src/SPQRSupport/SuiteSparseQRSupport.h"
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/SVD:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_SVD_MODULE_H
9 | #define EIGEN_SVD_MODULE_H
10 |
11 | #include "QR"
12 | #include "Householder"
13 | #include "Jacobi"
14 |
15 | #include "src/Core/util/DisableStupidWarnings.h"
16 |
17 | /** \defgroup SVD_Module SVD module
18 | *
19 | *
20 | *
21 | * This module provides SVD decomposition for matrices (both real and complex).
22 | * Two decomposition algorithms are provided:
23 | * - JacobiSVD implementing two-sided Jacobi iterations is numerically very accurate, fast for small matrices, but very slow for larger ones.
24 | * - BDCSVD implementing a recursive divide & conquer strategy on top of an upper-bidiagonalization which remains fast for large problems.
25 | * These decompositions are accessible via the respective classes and following MatrixBase methods:
26 | * - MatrixBase::jacobiSvd()
27 | * - MatrixBase::bdcSvd()
28 | *
29 | * \code
30 | * #include
31 | * \endcode
32 | */
33 |
34 | #include "src/misc/RealSvd2x2.h"
35 | #include "src/SVD/UpperBidiagonalization.h"
36 | #include "src/SVD/SVDBase.h"
37 | #include "src/SVD/JacobiSVD.h"
38 | #include "src/SVD/BDCSVD.h"
39 | #if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT)
40 | #ifdef EIGEN_USE_MKL
41 | #include "mkl_lapacke.h"
42 | #else
43 | #include "src/misc/lapacke.h"
44 | #endif
45 | #include "src/SVD/JacobiSVD_LAPACKE.h"
46 | #endif
47 |
48 | #include "src/Core/util/ReenableStupidWarnings.h"
49 |
50 | #endif // EIGEN_SVD_MODULE_H
51 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */
52 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/Sparse:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_SPARSE_MODULE_H
9 | #define EIGEN_SPARSE_MODULE_H
10 |
11 | /** \defgroup Sparse_Module Sparse meta-module
12 | *
13 | * Meta-module including all related modules:
14 | * - \ref SparseCore_Module
15 | * - \ref OrderingMethods_Module
16 | * - \ref SparseCholesky_Module
17 | * - \ref SparseLU_Module
18 | * - \ref SparseQR_Module
19 | * - \ref IterativeLinearSolvers_Module
20 | *
21 | \code
22 | #include
23 | \endcode
24 | */
25 |
26 | #include "SparseCore"
27 | #include "OrderingMethods"
28 | #ifndef EIGEN_MPL2_ONLY
29 | #include "SparseCholesky"
30 | #endif
31 | #include "SparseLU"
32 | #include "SparseQR"
33 | #include "IterativeLinearSolvers"
34 |
35 | #endif // EIGEN_SPARSE_MODULE_H
36 |
37 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/SparseCholesky:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // Copyright (C) 2008-2013 Gael Guennebaud
5 | //
6 | // This Source Code Form is subject to the terms of the Mozilla
7 | // Public License v. 2.0. If a copy of the MPL was not distributed
8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 |
10 | #ifndef EIGEN_SPARSECHOLESKY_MODULE_H
11 | #define EIGEN_SPARSECHOLESKY_MODULE_H
12 |
13 | #include "SparseCore"
14 | #include "OrderingMethods"
15 |
16 | #include "src/Core/util/DisableStupidWarnings.h"
17 |
18 | /**
19 | * \defgroup SparseCholesky_Module SparseCholesky module
20 | *
21 | * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices.
22 | * Those decompositions are accessible via the following classes:
23 | * - SimplicialLLt,
24 | * - SimplicialLDLt
25 | *
26 | * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module.
27 | *
28 | * \code
29 | * #include
30 | * \endcode
31 | */
32 |
33 | #ifdef EIGEN_MPL2_ONLY
34 | #error The SparseCholesky module has nothing to offer in MPL2 only mode
35 | #endif
36 |
37 | #include "src/SparseCholesky/SimplicialCholesky.h"
38 |
39 | #ifndef EIGEN_MPL2_ONLY
40 | #include "src/SparseCholesky/SimplicialCholesky_impl.h"
41 | #endif
42 |
43 | #include "src/Core/util/ReenableStupidWarnings.h"
44 |
45 | #endif // EIGEN_SPARSECHOLESKY_MODULE_H
46 |
--------------------------------------------------------------------------------
/User/0-MWL(Middleware Layer)/eigen-3.3.9/Eigen/SparseCore:
--------------------------------------------------------------------------------
1 | // This file is part of Eigen, a lightweight C++ template library
2 | // for linear algebra.
3 | //
4 | // This Source Code Form is subject to the terms of the Mozilla
5 | // Public License v. 2.0. If a copy of the MPL was not distributed
6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 |
8 | #ifndef EIGEN_SPARSECORE_MODULE_H
9 | #define EIGEN_SPARSECORE_MODULE_H
10 |
11 | #include "Core"
12 |
13 | #include "src/Core/util/DisableStupidWarnings.h"
14 |
15 | #include
16 | #include