Удален старые сурсы. Проект компилится но не проверен в симулинке

This commit is contained in:
2025-03-25 14:55:28 +03:00
parent 4556b453db
commit 7b6cc2fa50
41 changed files with 255 additions and 7436 deletions

View File

@@ -26,7 +26,7 @@
* limitations under the License.
*/
#include "arm_math.h"
#include "controller_functions.h"
/**
* @addtogroup PID

View File

@@ -26,7 +26,7 @@
* limitations under the License.
*/
#include "arm_math.h"
#include "controller_functions.h"
/**
* @addtogroup PID

View File

@@ -81,10 +81,6 @@ MSVC.
#define __UNALIGNED_UINT32_READ(addr) (*((const __packed uint32_t *)(addr)))
#endif
#ifndef __ALIGNED
#define __ALIGNED(x) __attribute__((aligned(x)))
#endif
#ifndef __RESTRICT
#define __RESTRICT __restrict
#endif
@@ -165,14 +161,14 @@ MSVC.
#define __REVSH(value) value
/**
\brief Rotate Right in unsigned value (32 bit)
\details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
\param [in] op1 Value to rotate
\param [in] op2 Number of Bits to rotate
\return Rotated value
*/
#define __ROR()
// /**
// \brief Rotate Right in unsigned value (32 bit)
// \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
// \param [in] op1 Value to rotate
// \param [in] op2 Number of Bits to rotate
// \return Rotated value
// */
//#define __ROR()
/**
@@ -191,15 +187,15 @@ MSVC.
\param [in] value Value to reverse
\return Reversed value
*/
#define __RBIT() _byteswap_ulong(_rotr(value, 16))
#define __RBIT(value) _byteswap_ulong(_rotr(value, 16))
/**
\brief Count leading zeros
\details Counts the number of leading zeros of a data value.
\param [in] value Value to count the leading zeros
\return number of leading zeros in value
*/
#define __CLZ() __lzcnt(value)
// /**
// \brief Count leading zeros
// \details Counts the number of leading zeros of a data value.
// \param [in] value Value to count the leading zeros
// \return number of leading zeros in value
// */
//#define __CLZ(value) __lzcnt(value)
/**
@@ -270,22 +266,22 @@ MSVC.
/**
\brief Signed Saturate
\details Saturates a signed value.
\param [in] value Value to be saturated
\param [in] sat Bit position to saturate to (1..32)
\return Saturated value
*/
#define __SSAT
// /**
// \brief Signed Saturate
// \details Saturates a signed value.
// \param [in] value Value to be saturated
// \param [in] sat Bit position to saturate to (1..32)
// \return Saturated value
// */
//#define __SSAT
/**
\brief Unsigned Saturate
\details Saturates an unsigned value.
\param [in] value Value to be saturated
\param [in] sat Bit position to saturate to (0..31)
\return Saturated value
*/
#define __USAT
// /**
// \brief Unsigned Saturate
// \details Saturates an unsigned value.
// \param [in] value Value to be saturated
// \param [in] sat Bit position to saturate to (0..31)
// \return Saturated value
// */
//#define __USAT

View File

@@ -11,38 +11,38 @@
#define __stdint_h
#define __ARMCLIB_VERSION 6190004
#ifdef __INT64_TYPE__
/* armclang predefines '__INT64_TYPE__' and '__INT64_C_SUFFIX__' */
#define __INT64 __INT64_TYPE__
#else
/* armcc has builtin '__int64' which can be used in --strict mode */
#define __INT64 __int64
#define __INT64_C_SUFFIX__ ll
#endif
#define __PASTE2(x, y) x ## y
#define __PASTE(x, y) __PASTE2(x, y)
#define __INT64_C(x) __ESCAPE__(__PASTE(x, __INT64_C_SUFFIX__))
#define __UINT64_C(x) __ESCAPE__(__PASTE(x ## u, __INT64_C_SUFFIX__))
#if defined(__clang__) || (defined(__ARMCC_VERSION) && !defined(__STRICT_ANSI__))
/* armclang and non-strict armcc allow 'long long' in system headers */
#define __LONGLONG long long
#else
/* strict armcc has '__int64' */
#define __LONGLONG __int64
#endif
#ifdef __INT64_TYPE__
/* armclang predefines '__INT64_TYPE__' and '__INT64_C_SUFFIX__' */
#define __INT64 __INT64_TYPE__
#else
/* armcc has builtin '__int64' which can be used in --strict mode */
#define __INT64 __int64
#define __INT64_C_SUFFIX__ ll
#endif
#define __PASTE2(x, y) x ## y
#define __PASTE(x, y) __PASTE2(x, y)
#define __INT64_C(x) __ESCAPE__(__PASTE(x, __INT64_C_SUFFIX__))
#define __UINT64_C(x) __ESCAPE__(__PASTE(x ## u, __INT64_C_SUFFIX__))
#if defined(__clang__) || (defined(__ARMCC_VERSION) && !defined(__STRICT_ANSI__))
/* armclang and non-strict armcc allow 'long long' in system headers */
#define __LONGLONG long long
#else
/* strict armcc has '__int64' */
#define __LONGLONG __int64
#endif
#ifndef __STDINT_DECLS
#define __STDINT_DECLS
#ifndef __STDINT_DECLS
#define __STDINT_DECLS
#undef __CLIBNS
#undef __CLIBNS
#ifdef __cplusplus
namespace std {
#define __CLIBNS std::
extern "C" {
#else
#define __CLIBNS
#endif /* __cplusplus */
#ifdef __cplusplus
namespace std {
#define __CLIBNS std::
extern "C" {
#else
#define __CLIBNS
#endif /* __cplusplus */
/*
@@ -50,51 +50,50 @@ namespace std {
* the typedef is used to declare a bitfield.
*/
/* 7.18.1.1 */
/* 7.18.1.1 */
/* exact-width signed integer types */
/* exact-width signed integer types */
typedef signed char int8_t;
typedef signed short int int16_t;
typedef signed int int32_t;
typedef signed __INT64 int64_t;
/* exact-width unsigned integer types */
/* exact-width unsigned integer types */
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
typedef unsigned int uint32_t;
typedef unsigned __INT64 uint64_t;
/* 7.18.1.2 */
/* 7.18.1.2 */
/* smallest type of at least n bits */
/* minimum-width signed integer types */
/* smallest type of at least n bits */
/* minimum-width signed integer types */
typedef signed char int_least8_t;
typedef signed short int int_least16_t;
typedef signed int int_least32_t;
typedef signed __INT64 int_least64_t;
/* minimum-width unsigned integer types */
/* minimum-width unsigned integer types */
typedef unsigned char uint_least8_t;
typedef unsigned short int uint_least16_t;
typedef unsigned int uint_least32_t;
typedef unsigned __INT64 uint_least64_t;
/* 7.18.1.3 */
/* 7.18.1.3 */
/* fastest minimum-width signed integer types */
/* fastest minimum-width signed integer types */
typedef signed int int_fast8_t;
typedef signed int int_fast16_t;
typedef signed int int_fast32_t;
typedef signed __INT64 int_fast64_t;
/* fastest minimum-width unsigned integer types */
/* fastest minimum-width unsigned integer types */
typedef unsigned int uint_fast8_t;
typedef unsigned int uint_fast16_t;
typedef unsigned int uint_fast32_t;
typedef unsigned __INT64 uint_fast64_t;
/* 7.18.1.4 integer types capable of holding object pointers */
/* 7.18.1.4 integer types capable of holding object pointers */
#if __sizeof_ptr == 8
typedef signed __INT64 intptr_t;
typedef unsigned __INT64 uintptr_t;
@@ -103,16 +102,16 @@ typedef signed int intptr_t;
typedef unsigned int uintptr_t;
#endif
/* 7.18.1.5 greatest-width integer types */
/* 7.18.1.5 greatest-width integer types */
typedef signed __LONGLONG intmax_t;
typedef unsigned __LONGLONG uintmax_t;
#if !defined(__cplusplus) || defined(__USE_C99_ALL) || 201103L <= __cplusplus || defined(__STDC_LIMIT_MACROS)
/* 7.18.2.1 */
/* 7.18.2.1 */
/* minimum values of exact-width signed integer types */
/* minimum values of exact-width signed integer types */
#define INT8_MIN -128
#define INT16_MIN -32768
#define INT32_MIN (~0x7fffffff) /* -2147483648 is unsigned */
@@ -233,14 +232,14 @@ typedef unsigned __LONGLONG uintmax_t;
#undef WCHAR_MAX
#if defined(__WCHAR32) || (defined(__ARM_SIZEOF_WCHAR_T) && __ARM_SIZEOF_WCHAR_T == 4)
#define WCHAR_MIN 0
#define WCHAR_MAX 0xffffffffU
#define WCHAR_MIN 0
#define WCHAR_MAX 0xffffffffU
#else
#define WCHAR_MIN 0
#define WCHAR_MAX 65535
#define WCHAR_MIN 0
#define WCHAR_MAX 65535
#endif
/* limits of wint_t */
/* limits of wint_t */
#define WINT_MIN (~0x7fffffff)
#define WINT_MAX 2147483647
@@ -265,44 +264,44 @@ typedef unsigned __LONGLONG uintmax_t;
#endif /* __STDC_CONSTANT_MACROS */
#ifdef __cplusplus
} /* extern "C" */
} /* namespace std */
#endif /* __cplusplus */
#endif /* __STDINT_DECLS */
#ifdef __cplusplus
} /* extern "C" */
} /* namespace std */
#endif /* __cplusplus */
#endif /* __STDINT_DECLS */
#ifdef __cplusplus
#ifndef __STDINT_NO_EXPORTS
using ::std::int8_t;
using ::std::int16_t;
using ::std::int32_t;
using ::std::int64_t;
using ::std::uint8_t;
using ::std::uint16_t;
using ::std::uint32_t;
using ::std::uint64_t;
using ::std::int_least8_t;
using ::std::int_least16_t;
using ::std::int_least32_t;
using ::std::int_least64_t;
using ::std::uint_least8_t;
using ::std::uint_least16_t;
using ::std::uint_least32_t;
using ::std::uint_least64_t;
using ::std::int_fast8_t;
using ::std::int_fast16_t;
using ::std::int_fast32_t;
using ::std::int_fast64_t;
using ::std::uint_fast8_t;
using ::std::uint_fast16_t;
using ::std::uint_fast32_t;
using ::std::uint_fast64_t;
using ::std::intptr_t;
using ::std::uintptr_t;
using ::std::intmax_t;
using ::std::uintmax_t;
#endif
#endif /* __cplusplus */
#ifdef __cplusplus
#ifndef __STDINT_NO_EXPORTS
using ::std::int8_t;
using ::std::int16_t;
using ::std::int32_t;
using ::std::int64_t;
using ::std::uint8_t;
using ::std::uint16_t;
using ::std::uint32_t;
using ::std::uint64_t;
using ::std::int_least8_t;
using ::std::int_least16_t;
using ::std::int_least32_t;
using ::std::int_least64_t;
using ::std::uint_least8_t;
using ::std::uint_least16_t;
using ::std::uint_least32_t;
using ::std::uint_least64_t;
using ::std::int_fast8_t;
using ::std::int_fast16_t;
using ::std::int_fast32_t;
using ::std::int_fast64_t;
using ::std::uint_fast8_t;
using ::std::uint_fast16_t;
using ::std::uint_fast32_t;
using ::std::uint_fast64_t;
using ::std::intptr_t;
using ::std::uintptr_t;
using ::std::intmax_t;
using ::std::uintmax_t;
#endif
#endif /* __cplusplus */
#undef __INT64
#undef __LONGLONG

View File

@@ -250,28 +250,28 @@ __weak void HAL_MspDeInit(void)
* @param TickPriority Tick interrupt priority.
* @retval HAL status
*/
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
/* Configure the SysTick to have interrupt in 1ms time basis*/
if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
{
return HAL_ERROR;
}
/* Configure the SysTick IRQ priority */
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
{
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
uwTickPrio = TickPriority;
}
else
{
return HAL_ERROR;
}
/* Return function status */
return HAL_OK;
}
//__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
//{
// /* Configure the SysTick to have interrupt in 1ms time basis*/
// if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
// {
// return HAL_ERROR;
// }
//
// /* Configure the SysTick IRQ priority */
// if (TickPriority < (1UL << __NVIC_PRIO_BITS))
// {
// HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
// uwTickPrio = TickPriority;
// }
// else
// {
// return HAL_ERROR;
// }
//
// /* Return function status */
// return HAL_OK;
//}
/**
* @}
@@ -412,11 +412,11 @@ __weak void HAL_Delay(uint32_t Delay)
* implementations in user file.
* @retval None
*/
__weak void HAL_SuspendTick(void)
{
/* Disable SysTick Interrupt */
SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk;
}
//__weak void HAL_SuspendTick(void)
//{
// /* Disable SysTick Interrupt */
// SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk;
//}
/**
* @brief Resume Tick increment.
@@ -428,11 +428,11 @@ __weak void HAL_SuspendTick(void)
* implementations in user file.
* @retval None
*/
__weak void HAL_ResumeTick(void)
{
/* Enable SysTick Interrupt */
SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk;
}
//__weak void HAL_ResumeTick(void)
//{
// /* Enable SysTick Interrupt */
// SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk;
//}
/**
* @brief Returns the HAL revision

View File

@@ -651,6 +651,8 @@ void TIM1_TRG_COM_TIM11_IRQHandler(void) {}
#endif
#ifndef USE_TIM8_BRK_TIM12_HANDLER
void TIM8_BRK_TIM12_IRQHandler(void) {}
//#else
//extern void TIM8_BRK_TIM12_IRQHandler(void);
#endif
#ifndef USE_TIM8_TRG_COM_TIM14_HANDLER
void TIM8_TRG_COM_TIM14_IRQHandler(void) {}

View File

@@ -67,12 +67,12 @@
#define USE_TIM4_HANDLER
//#define USE_TIM5_HANDLER
//#define USE_TIM6_HANDLER
//#define USE_TIM7_HANDLER
//#define USE_TIM8_UP_TIM13_HANDLER
#define USE_TIM7_HANDLER
#define USE_TIM8_UP_TIM13_HANDLER
//#define USE_TIM1_BRK_TIM9_HANDLER
//#define USE_TIM1_TRG_COM_TIM11_HANDLER
#define USE_TIM8_BRK_TIM12_HANDLER
//#define USE_TIM8_TRG_COM_TIM14_HANDLER
//#define USE_TIM8_BRK_TIM12_HANDLER
#define USE_TIM8_TRG_COM_TIM14_HANDLER
/** SIMULATOR_CONF