1
This commit is contained in:
parent
ffb26fc9e3
commit
0fa8329aa4
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -31,9 +31,6 @@ Note: source file '..\User\bsp\can.c' - object file renamed from 'gimbal\can.o'
|
||||
Note: source file '..\User\bsp\gpio.c' - object file renamed from 'gimbal\gpio.o' to 'gimbal\gpio_1.o'.
|
||||
Note: source file '..\User\bsp\i2c.c' - object file renamed from 'gimbal\i2c.o' to 'gimbal\i2c_1.o'.
|
||||
Note: source file '..\User\bsp\spi.c' - object file renamed from 'gimbal\spi.o' to 'gimbal\spi_1.o'.
|
||||
compiling config.c...
|
||||
linking...
|
||||
Program Size: Code=84448 RO-data=996 RW-data=424 ZI-data=34272
|
||||
"gimbal\gimbal.axf" - 0 Error(s), 0 Warning(s).
|
||||
|
||||
<h2>Software Packages used:</h2>
|
||||
@ -58,7 +55,7 @@ Package Vendor: Keil
|
||||
|
||||
* Component: ARM::CMSIS:CORE:5.4.0
|
||||
Include file: CMSIS\Core\Include\tz_context.h
|
||||
Build Time Elapsed: 00:00:02
|
||||
Build Time Elapsed: 00:00:01
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<title>Static Call Graph - [gimbal\gimbal.axf]</title></head>
|
||||
<body><HR>
|
||||
<H1>Static Call Graph for image gimbal\gimbal.axf</H1><HR>
|
||||
<BR><P>#<CALLGRAPH># ARM Linker, 6160001: Last Updated: Sat Nov 1 22:06:33 2025
|
||||
<BR><P>#<CALLGRAPH># ARM Linker, 6160001: Last Updated: Wed Nov 12 20:41:26 2025
|
||||
<BR><P>
|
||||
<H3>Maximum Stack Usage = 432 bytes + Unknown(Functions without stacksize, Cycles, Untraceable Function Pointers)</H3><H3>
|
||||
Call chain for Maximum Stack Depth:</H3>
|
||||
@ -658,7 +658,7 @@ Global Symbols
|
||||
<P><STRONG><a name="[1a9]"></a>AbsClip</STRONG> (Thumb, 106 bytes, Stack size 16 bytes, user_math.o(.text.AbsClip))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 16<LI>Call Chain = AbsClip
|
||||
</UL>
|
||||
<BR>[Called By]<UL><LI><a href="#[f2]">>></a> PID_Calc
|
||||
<BR>[Called By]<UL><LI><a href="#[f1]">>></a> PID_Calc
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[9b]"></a>BMI088_AcclStartDmaRecv</STRONG> (Thumb, 30 bytes, Stack size 16 bytes, bmi088.o(.text.BMI088_AcclStartDmaRecv))
|
||||
@ -1013,7 +1013,7 @@ Global Symbols
|
||||
</UL>
|
||||
<BR>[Address Reference Count : 1]<UL><LI> startup_stm32f407xx.o(RESET)
|
||||
</UL>
|
||||
<P><STRONG><a name="[f1]"></a>CircleAdd</STRONG> (Thumb, 132 bytes, Stack size 16 bytes, user_math.o(.text.CircleAdd))
|
||||
<P><STRONG><a name="[f2]"></a>CircleAdd</STRONG> (Thumb, 132 bytes, Stack size 16 bytes, user_math.o(.text.CircleAdd))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 16<LI>Call Chain = CircleAdd
|
||||
</UL>
|
||||
<BR>[Called By]<UL><LI><a href="#[eb]">>></a> Gimbal_Control
|
||||
@ -1022,7 +1022,7 @@ Global Symbols
|
||||
<P><STRONG><a name="[ef]"></a>CircleError</STRONG> (Thumb, 154 bytes, Stack size 20 bytes, user_math.o(.text.CircleError))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 20<LI>Call Chain = CircleError
|
||||
</UL>
|
||||
<BR>[Called By]<UL><LI><a href="#[f2]">>></a> PID_Calc
|
||||
<BR>[Called By]<UL><LI><a href="#[f1]">>></a> PID_Calc
|
||||
<LI><a href="#[eb]">>></a> Gimbal_Control
|
||||
</UL>
|
||||
|
||||
@ -1114,12 +1114,12 @@ Global Symbols
|
||||
<LI><a href="#[197]">>></a> MX_CAN1_Init
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[eb]"></a>Gimbal_Control</STRONG> (Thumb, 1000 bytes, Stack size 88 bytes, gimbal.o(.text.Gimbal_Control))
|
||||
<P><STRONG><a name="[eb]"></a>Gimbal_Control</STRONG> (Thumb, 1312 bytes, Stack size 88 bytes, gimbal.o(.text.Gimbal_Control))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 208<LI>Call Chain = Gimbal_Control ⇒ PID_Calc ⇒ LowPassFilter2p_Apply ⇒ __ARM_isinf
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[f0]">>></a> Clip
|
||||
<LI><a href="#[f1]">>></a> CircleAdd
|
||||
<LI><a href="#[f2]">>></a> PID_Calc
|
||||
<LI><a href="#[f2]">>></a> CircleAdd
|
||||
<LI><a href="#[f1]">>></a> PID_Calc
|
||||
<LI><a href="#[ef]">>></a> CircleError
|
||||
<LI><a href="#[ec]">>></a> BSP_TIME_Get_us
|
||||
<LI><a href="#[ed]">>></a> __aeabi_ul2f
|
||||
@ -1128,7 +1128,7 @@ Global Symbols
|
||||
<BR>[Called By]<UL><LI><a href="#[70]">>></a> Task_gimbal_ctrl
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[f3]"></a>Gimbal_Init</STRONG> (Thumb, 472 bytes, Stack size 32 bytes, gimbal.o(.text.Gimbal_Init))
|
||||
<P><STRONG><a name="[f3]"></a>Gimbal_Init</STRONG> (Thumb, 424 bytes, Stack size 32 bytes, gimbal.o(.text.Gimbal_Init))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 372 + Unknown Stack Size
|
||||
<LI>Call Chain = Gimbal_Init ⇒ BSP_CAN_Init ⇒ osMutexNew ⇒ xQueueCreateMutexStatic ⇒ prvInitialiseMutex ⇒ xQueueGenericSend ⇒ prvCopyDataToQueue ⇒ xTaskPriorityDisinherit ⇒ vListInsertEnd
|
||||
</UL>
|
||||
@ -2115,7 +2115,7 @@ Global Symbols
|
||||
<LI><a href="#[186]">>></a> __ARM_isinf
|
||||
<LI><a href="#[94]">>></a> __aeabi_f2d
|
||||
</UL>
|
||||
<BR>[Called By]<UL><LI><a href="#[f2]">>></a> PID_Calc
|
||||
<BR>[Called By]<UL><LI><a href="#[f1]">>></a> PID_Calc
|
||||
<LI><a href="#[fe]">>></a> LowPassFilter2p_Reset
|
||||
</UL>
|
||||
|
||||
@ -2376,7 +2376,7 @@ Global Symbols
|
||||
<P><STRONG><a name="[1]"></a>NMI_Handler</STRONG> (Thumb, 4 bytes, Stack size 0 bytes, stm32f4xx_it.o(.text.NMI_Handler))
|
||||
<BR>[Address Reference Count : 1]<UL><LI> startup_stm32f407xx.o(RESET)
|
||||
</UL>
|
||||
<P><STRONG><a name="[f2]"></a>PID_Calc</STRONG> (Thumb, 752 bytes, Stack size 72 bytes, pid.o(.text.PID_Calc))
|
||||
<P><STRONG><a name="[f1]"></a>PID_Calc</STRONG> (Thumb, 752 bytes, Stack size 72 bytes, pid.o(.text.PID_Calc))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 120<LI>Call Chain = PID_Calc ⇒ LowPassFilter2p_Apply ⇒ __ARM_isinf
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[ef]">>></a> CircleError
|
||||
@ -2519,7 +2519,7 @@ Global Symbols
|
||||
<LI><a href="#[9d]">>></a> BMI088_AcclWaitDmaCplt
|
||||
<LI><a href="#[9b]">>></a> BMI088_AcclStartDmaRecv
|
||||
<LI><a href="#[f4]">>></a> PID_Init
|
||||
<LI><a href="#[f2]">>></a> PID_Calc
|
||||
<LI><a href="#[f1]">>></a> PID_Calc
|
||||
<LI><a href="#[97]">>></a> AHRS_Update
|
||||
<LI><a href="#[93]">>></a> AHRS_Init
|
||||
<LI><a href="#[8f]">>></a> AHRS_GetEulr
|
||||
@ -2539,8 +2539,8 @@ Global Symbols
|
||||
</UL>
|
||||
<BR>[Address Reference Count : 1]<UL><LI> init.o(.text.Task_Init)
|
||||
</UL>
|
||||
<P><STRONG><a name="[70]"></a>Task_gimbal_ctrl</STRONG> (Thumb, 220 bytes, Stack size 32 bytes, gimbal_ctrl.o(.text.Task_gimbal_ctrl))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 404 + Unknown Stack Size
|
||||
<P><STRONG><a name="[70]"></a>Task_gimbal_ctrl</STRONG> (Thumb, 236 bytes, Stack size 24 bytes, gimbal_ctrl.o(.text.Task_gimbal_ctrl))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 396 + Unknown Stack Size
|
||||
<LI>Call Chain = Task_gimbal_ctrl ⇒ Gimbal_Init ⇒ BSP_CAN_Init ⇒ osMutexNew ⇒ xQueueCreateMutexStatic ⇒ prvInitialiseMutex ⇒ xQueueGenericSend ⇒ prvCopyDataToQueue ⇒ xTaskPriorityDisinherit ⇒ vListInsertEnd
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[b7]">>></a> osMessageQueueGet
|
||||
@ -3899,7 +3899,7 @@ Global Symbols
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 16<LI>Call Chain = __aeabi_f2d
|
||||
</UL>
|
||||
<BR>[Called By]<UL><LI><a href="#[f4]">>></a> PID_Init
|
||||
<LI><a href="#[f2]">>></a> PID_Calc
|
||||
<LI><a href="#[f1]">>></a> PID_Calc
|
||||
<LI><a href="#[fe]">>></a> LowPassFilter2p_Reset
|
||||
<LI><a href="#[184]">>></a> LowPassFilter2p_Apply
|
||||
<LI><a href="#[93]">>></a> AHRS_Init
|
||||
@ -4803,14 +4803,14 @@ Local Symbols
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 8<LI>Call Chain = __ARM_isfinite
|
||||
</UL>
|
||||
<BR>[Called By]<UL><LI><a href="#[f4]">>></a> PID_Init
|
||||
<LI><a href="#[f2]">>></a> PID_Calc
|
||||
<LI><a href="#[f1]">>></a> PID_Calc
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[1a7]"></a>__ARM_isfinitef</STRONG> (Thumb, 24 bytes, Stack size 4 bytes, pid.o(.text.__ARM_isfinitef))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 4<LI>Call Chain = __ARM_isfinitef
|
||||
</UL>
|
||||
<BR>[Called By]<UL><LI><a href="#[f4]">>></a> PID_Init
|
||||
<LI><a href="#[f2]">>></a> PID_Calc
|
||||
<LI><a href="#[f1]">>></a> PID_Calc
|
||||
</UL>
|
||||
|
||||
<P><STRONG><a name="[5e]"></a>BMI088_AcclIntCallback</STRONG> (Thumb, 20 bytes, Stack size 8 bytes, bmi088.o(.text.BMI088_AcclIntCallback))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@ -2126,7 +2126,7 @@ I (D:\Keil_v5\ARM\ARMCLANG\include\math.h)(0x6035A4A8)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\stdbool.h)(0x6035A4A8)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\stdint.h)(0x6035A4A8)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\stddef.h)(0x6035A4A8)
|
||||
I (..\User\module\gimbal.h)(0x690613C5)
|
||||
I (..\User\module\gimbal.h)(0x69147C6E)
|
||||
I (..\User\component\ahrs.h)(0x68F3410E)
|
||||
I (..\User\component\filter.h)(0x68F22FA9)
|
||||
I (..\User\component\pid.h)(0x68F22FA9)
|
||||
@ -2264,7 +2264,7 @@ I (..\Middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F\portmacro.h
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h)(0x68B055DB)
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\task.h)(0x68B055DB)
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\list.h)(0x68B055DB)
|
||||
I (..\User\module\gimbal.h)(0x690613C5)
|
||||
I (..\User\module\gimbal.h)(0x69147C6E)
|
||||
I (..\User\component\ahrs.h)(0x68F3410E)
|
||||
I (..\User\component\user_math.h)(0x68F22FA9)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\float.h)(0x6035A4A0)
|
||||
@ -2376,7 +2376,7 @@ I (..\User\component\pid.h)(0x68F22FA9)
|
||||
I (..\User\component\filter.h)(0x68F22FA9)
|
||||
I (..\User\device\bmi088.h)(0x68F22F87)
|
||||
I (..\User\device\device.h)(0x68F22FA9)
|
||||
I (..\User\module\gimbal.h)(0x690613C5)
|
||||
I (..\User\module\gimbal.h)(0x69147C6E)
|
||||
I (..\User\device\motor.h)(0x68F22F87)
|
||||
I (..\User\device\motor_dm.h)(0x68F22F87)
|
||||
I (..\User\bsp\can.h)(0x68F22FA9)
|
||||
@ -2407,7 +2407,7 @@ I (..\User\component\user_math.h)(0x68F22FA9)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\float.h)(0x6035A4A0)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\math.h)(0x6035A4A8)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\stdbool.h)(0x6035A4A8)
|
||||
I (..\User\module\gimbal.h)(0x690613C5)
|
||||
I (..\User\module\gimbal.h)(0x69147C6E)
|
||||
I (..\User\component\ahrs.h)(0x68F3410E)
|
||||
I (..\User\component\filter.h)(0x68F22FA9)
|
||||
I (..\User\component\pid.h)(0x68F22FA9)
|
||||
@ -2467,7 +2467,7 @@ I (..\Middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F\portmacro.h
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h)(0x68B055DB)
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\task.h)(0x68B055DB)
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\list.h)(0x68B055DB)
|
||||
F (..\User\task\gimbal_ctrl.c)(0x68F23895)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-gdwarf-3 -O0 -ffunction-sections -w -I ../Core/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../User/bsp -I ../User/component -I ../User/device -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../User/task -I ../User -I ../User/module
-I./RTE/_gimbal
-ID:/Keil_v5/Arm/Packs/ARM/CMSIS/5.7.0/CMSIS/Core/Include
-ID:/Keil_v5/Arm/Packs/Keil/STM32F4xx_DFP/2.17.1/Drivers/CMSIS/Device/ST/STM32F4xx/Include
-D__UVISION_VERSION="534" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx
-o gimbal/gimbal_ctrl.o -MD)
|
||||
F (..\User\task\gimbal_ctrl.c)(0x6908B058)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-gdwarf-3 -O0 -ffunction-sections -w -I ../Core/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../User/bsp -I ../User/component -I ../User/device -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../User/task -I ../User -I ../User/module
-I./RTE/_gimbal
-ID:/Keil_v5/Arm/Packs/ARM/CMSIS/5.7.0/CMSIS/Core/Include
-ID:/Keil_v5/Arm/Packs/Keil/STM32F4xx_DFP/2.17.1/Drivers/CMSIS/Device/ST/STM32F4xx/Include
-D__UVISION_VERSION="534" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx
-o gimbal/gimbal_ctrl.o -MD)
|
||||
I (..\User\task\user_task.h)(0x68DCD971)
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS_V2\cmsis_os2.h)(0x68B055DB)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\stdint.h)(0x6035A4A8)
|
||||
@ -2481,7 +2481,7 @@ I (..\Middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F\portmacro.h
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h)(0x68B055DB)
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\task.h)(0x68B055DB)
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\list.h)(0x68B055DB)
|
||||
I (..\User\module\gimbal.h)(0x690613C5)
|
||||
I (..\User\module\gimbal.h)(0x69147C6E)
|
||||
I (..\User\component\ahrs.h)(0x68F3410E)
|
||||
I (..\User\component\user_math.h)(0x68F22FA9)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\float.h)(0x6035A4A0)
|
||||
@ -2534,8 +2534,8 @@ I (..\User\device\motor_rm.h)(0x68F22F87)
|
||||
I (..\User\module\config.h)(0x68DD3463)
|
||||
I (..\User\device\motor_lz.h)(0x68F22F87)
|
||||
I (..\User\device\motor_lk.h)(0x68F22F87)
|
||||
F (..\User\module\gimbal.c)(0x690613C5)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-gdwarf-3 -O0 -ffunction-sections -w -I ../Core/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../User/bsp -I ../User/component -I ../User/device -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../User/task -I ../User -I ../User/module
-I./RTE/_gimbal
-ID:/Keil_v5/Arm/Packs/ARM/CMSIS/5.7.0/CMSIS/Core/Include
-ID:/Keil_v5/Arm/Packs/Keil/STM32F4xx_DFP/2.17.1/Drivers/CMSIS/Device/ST/STM32F4xx/Include
-D__UVISION_VERSION="534" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx
-o gimbal/gimbal.o -MD)
|
||||
I (..\User\module\gimbal.h)(0x690613C5)
|
||||
F (..\User\module\gimbal.c)(0x69148074)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-gdwarf-3 -O0 -ffunction-sections -w -I ../Core/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../User/bsp -I ../User/component -I ../User/device -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../User/task -I ../User -I ../User/module
-I./RTE/_gimbal
-ID:/Keil_v5/Arm/Packs/ARM/CMSIS/5.7.0/CMSIS/Core/Include
-ID:/Keil_v5/Arm/Packs/Keil/STM32F4xx_DFP/2.17.1/Drivers/CMSIS/Device/ST/STM32F4xx/Include
-D__UVISION_VERSION="534" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx
-o gimbal/gimbal.o -MD)
|
||||
I (..\User\module\gimbal.h)(0x69147C6E)
|
||||
I (..\User\component\ahrs.h)(0x68F3410E)
|
||||
I (..\User\component\user_math.h)(0x68F22FA9)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\float.h)(0x6035A4A0)
|
||||
@ -2598,7 +2598,7 @@ I (..\Middlewares\Third_Party\FreeRTOS\Source\include\list.h)(0x68B055DB)
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS_V2\cmsis_os2.h)(0x68B055DB)
|
||||
I (..\User\device\motor_rm.h)(0x68F22F87)
|
||||
I (..\User\bsp\time.h)(0x68F22FA9)
|
||||
F (..\User\module\config.c)(0x690613E7)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-gdwarf-3 -O0 -ffunction-sections -w -I ../Core/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../User/bsp -I ../User/component -I ../User/device -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../User/task -I ../User -I ../User/module
-I./RTE/_gimbal
-ID:/Keil_v5/Arm/Packs/ARM/CMSIS/5.7.0/CMSIS/Core/Include
-ID:/Keil_v5/Arm/Packs/Keil/STM32F4xx_DFP/2.17.1/Drivers/CMSIS/Device/ST/STM32F4xx/Include
-D__UVISION_VERSION="534" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx
-o gimbal/config.o -MD)
|
||||
F (..\User\module\config.c)(0x69143650)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
-gdwarf-3 -O0 -ffunction-sections -w -I ../Core/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../User/bsp -I ../User/component -I ../User/device -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../User/task -I ../User -I ../User/module
-I./RTE/_gimbal
-ID:/Keil_v5/Arm/Packs/ARM/CMSIS/5.7.0/CMSIS/Core/Include
-ID:/Keil_v5/Arm/Packs/Keil/STM32F4xx_DFP/2.17.1/Drivers/CMSIS/Device/ST/STM32F4xx/Include
-D__UVISION_VERSION="534" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx
-o gimbal/config.o -MD)
|
||||
I (..\User\component\user_math.h)(0x68F22FA9)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\float.h)(0x6035A4A0)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\math.h)(0x6035A4A8)
|
||||
@ -2658,7 +2658,7 @@ I (..\Middlewares\Third_Party\FreeRTOS\Source\include\task.h)(0x68B055DB)
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\list.h)(0x68B055DB)
|
||||
I (..\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS_V2\cmsis_os2.h)(0x68B055DB)
|
||||
I (..\User\device\motor_lk.h)(0x68F22F87)
|
||||
I (..\User\module\gimbal.h)(0x690613C5)
|
||||
I (..\User\module\gimbal.h)(0x69147C6E)
|
||||
I (..\User\component\ahrs.h)(0x68F3410E)
|
||||
I (..\User\component\filter.h)(0x68F22FA9)
|
||||
I (..\User\component\pid.h)(0x68F22FA9)
|
||||
|
||||
Binary file not shown.
@ -23,34 +23,39 @@ Config_RobotParam_t robot_config = {
|
||||
.Set_Limit_t= {
|
||||
.pit_max=0.69,
|
||||
.pit_min=-0.47,
|
||||
.yaw_max= 1.0,//yaw的限位作用于小yaw
|
||||
.yaw_max= 1.0,//yaw的
|
||||
.yaw_min=-1.0,
|
||||
.pit_ecd_max=0,
|
||||
.pit_ecd_min=0,
|
||||
.yaw_ecd_max=0,
|
||||
.yaw_ecd_min=0,
|
||||
},
|
||||
|
||||
// .mech_zero = {
|
||||
// .yaw = 0.0f,
|
||||
// .pit = -0.69f,
|
||||
// },
|
||||
|
||||
/*是否启动限位,1启动,-1不启动
|
||||
小yaw默认限位
|
||||
一般pit统一限位*/
|
||||
.travel = {
|
||||
.yaw = -1.0f,
|
||||
.pit = 1.0f,
|
||||
.ecd_yaw=-1.0f,
|
||||
.ecd_pit=1.0f,
|
||||
},
|
||||
|
||||
|
||||
.feedforward={
|
||||
.imu = {
|
||||
.yaw=false,
|
||||
.pit=false,
|
||||
.coefficient_yaw=0,
|
||||
.coefficient_pit=0,
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
/*零点参数*/
|
||||
.gimbal_zero={
|
||||
.pit_encoder=0,
|
||||
.yaw_encoder=0,
|
||||
/*零点行程*/
|
||||
.travel={
|
||||
.yaw=0,
|
||||
.pit=0,
|
||||
},
|
||||
},
|
||||
|
||||
.motor={
|
||||
/*按自己需求选择电机*/
|
||||
.pit=RM,
|
||||
.pit=DM,
|
||||
.yaw=RM,
|
||||
/*是否开启限位*/
|
||||
.limit_yaw=false,
|
||||
.limit_pit=true,
|
||||
.pit_rm_motor={BSP_CAN_2,0x20A,MOTOR_GM6020,false,false},
|
||||
.yaw_rm_motor={BSP_CAN_1,0x205,MOTOR_GM6020,false,false},
|
||||
/*达妙电机参数自己配*/
|
||||
@ -110,48 +115,7 @@ Config_RobotParam_t robot_config = {
|
||||
.out_limit = 10.0f,
|
||||
.d_cutoff_freq = -1.0f,
|
||||
.range = M_2PI,
|
||||
},
|
||||
/*电机控制参数*/
|
||||
.yaw_velocity = {
|
||||
.k = 1.0f,
|
||||
.p = 1.0f,
|
||||
.i = 0.0f,
|
||||
.d = 0.000f,//0
|
||||
.i_limit = 1.0f,
|
||||
.out_limit = 1.0f,
|
||||
.d_cutoff_freq = -1.0f,
|
||||
.range = -1.0f,
|
||||
},
|
||||
.yaw_ecd_angle = {
|
||||
.k = 1.0f,
|
||||
.p = 1.0f ,
|
||||
.i = 0.0f,
|
||||
.d = 0.0f,
|
||||
.i_limit = 0.0f,
|
||||
.out_limit = 10.0f,
|
||||
.d_cutoff_freq = -1.0f,
|
||||
.range = M_2PI,
|
||||
},
|
||||
.pit_velocity = {
|
||||
.k = 0.0f,
|
||||
.p = 0.0f,
|
||||
.i = 0.0f,
|
||||
.d = 0.0f,
|
||||
.i_limit = 1.0f,
|
||||
.out_limit = 1.0f,
|
||||
.d_cutoff_freq = -1.0f,
|
||||
.range = -1.0f,
|
||||
},
|
||||
.pit_ecd_angle = {
|
||||
.k = 1.0f,
|
||||
.p = 0.0f,
|
||||
.i = 0.0f,
|
||||
.d = 0.0f,
|
||||
.i_limit = 0.0f,
|
||||
.out_limit = 10.0f,
|
||||
.d_cutoff_freq = -1.0f,
|
||||
.range = M_2PI,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@ -122,10 +122,7 @@ int8_t Gimbal_Init(Gimbal_t *g,Gimbal_Params_t *param,
|
||||
g->limit.set_pit.min=g->param->Set_Limit_t.pit_min;
|
||||
g->limit.set_yaw.max=g->param->Set_Limit_t.yaw_max;
|
||||
g->limit.set_yaw.min=g->param->Set_Limit_t.yaw_min;
|
||||
g->limit.set_ecd_pit.max=g->param->Set_Limit_t.pit_ecd_max;
|
||||
g->limit.set_ecd_pit.min=g->param->Set_Limit_t.pit_ecd_min;
|
||||
g->limit.set_ecd_yaw.max=g->param->Set_Limit_t.yaw_ecd_max;
|
||||
g->limit.set_ecd_yaw.min=g->param->Set_Limit_t.yaw_ecd_min;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -230,8 +227,8 @@ int8_t Gimbal_Control(Gimbal_t *g, Gimbal_CMD_t *g_cmd) {
|
||||
float yaw_omega_set_point, pit_omega_set_point;
|
||||
/* 电机角度控制相关逻辑 */
|
||||
float yaw_velocity_set_point, pit_velocity_set_point;
|
||||
|
||||
float small_yaw_omega_setpoint;
|
||||
|
||||
|
||||
|
||||
float delta_ecd_yaw = g_cmd->delta_yaw*g->dt;
|
||||
float delta_ecd_pit = g_cmd->delta_pit*g->dt;
|
||||
@ -241,11 +238,13 @@ int8_t Gimbal_Control(Gimbal_t *g, Gimbal_CMD_t *g_cmd) {
|
||||
|
||||
|
||||
|
||||
// if((g->feedback.motor.yaw.rotor_abs_angle)>M_PI)g->feedback.motor.yaw.rotor_abs_angle-M_2PI;
|
||||
|
||||
float motor_imu_offset = g->feedback.motor.yaw.rotor_abs_angle - g->feedback.imu.eulr.yaw;
|
||||
/* 处理跨越±π的情况 */
|
||||
if (motor_imu_offset > M_PI) motor_imu_offset -= M_2PI;
|
||||
if (motor_imu_offset < -M_PI) motor_imu_offset += M_2PI;
|
||||
/* 计算到限位边界的距离 (这个限位给双yaw)*/
|
||||
/* 计算到限位边界的距离 (这个限位给yaw)*/
|
||||
float delta_max = CircleError(g->limit.set_yaw.max,
|
||||
(g->setpoint.eulr.yaw + motor_imu_offset + delta_yaw), M_2PI);
|
||||
float delta_min = CircleError(g->limit.set_yaw.min,
|
||||
@ -259,10 +258,9 @@ int8_t Gimbal_Control(Gimbal_t *g, Gimbal_CMD_t *g_cmd) {
|
||||
case GIMBAL_MODE_ABSOLUTE:/*绝对模式*/
|
||||
|
||||
g->setpoint.eulr.yaw+=delta_yaw;
|
||||
if (g->param->travel.yaw > 0)
|
||||
if (g->param->motor.limit_yaw==true)
|
||||
Clip(&(g->setpoint.eulr.yaw),delta_min,delta_max);
|
||||
else{
|
||||
CircleAdd(&(g->setpoint.eulr.yaw), delta_yaw, M_2PI);
|
||||
/*限制在-3.14~3.14*/
|
||||
if (g->setpoint.eulr.yaw > M_PI) g->setpoint.eulr.yaw -= M_2PI;
|
||||
}
|
||||
@ -270,7 +268,7 @@ int8_t Gimbal_Control(Gimbal_t *g, Gimbal_CMD_t *g_cmd) {
|
||||
/* 处理pitch控制命令,软件限位 - 使用电机绝对角度 */
|
||||
g->setpoint.eulr.pit+=delta_pit;
|
||||
|
||||
if (g->param->travel.pit > 0)
|
||||
if (g->param->motor.limit_pit == true)
|
||||
/* 限制pit控制命令 */
|
||||
Clip(&(g->setpoint.eulr.pit),g->limit.set_pit.min,g->limit.set_pit.max);
|
||||
|
||||
@ -283,37 +281,54 @@ int8_t Gimbal_Control(Gimbal_t *g, Gimbal_CMD_t *g_cmd) {
|
||||
g->feedback.imu.eulr.pit, 0.0f, g->dt);
|
||||
g->out.pit = PID_Calc(&(g->pid.pit_omega), pit_omega_set_point,
|
||||
g->feedback.imu.gyro.x, 0.f, g->dt);
|
||||
|
||||
|
||||
|
||||
/*前馈添加*/
|
||||
if(g->param->feedforward.imu.yaw==true)
|
||||
g->out.yaw+=g->param->feedforward.imu.coefficient_yaw*(yaw_omega_set_point - g->feedback.imu.gyro.z);
|
||||
if(g->param->feedforward.imu.pit==true)
|
||||
g->out.pit+=g->param->feedforward.imu.coefficient_pit*(pit_omega_set_point - g->feedback.imu.gyro.x);
|
||||
|
||||
break;
|
||||
case GIMBAL_MODE_RELATIVE:
|
||||
/*跟据电机角度控制,遥控器不给值不会动*/
|
||||
g->setpoint.ecd.yaw+=delta_ecd_yaw;
|
||||
/*yaw的限位*/
|
||||
if(g->param->travel.yaw > 0)
|
||||
Clip(&(g->setpoint.ecd.yaw),g->limit.set_ecd_yaw.min,g->limit.set_ecd_yaw.max);
|
||||
else{
|
||||
/*限制yaw在0~6.28*/
|
||||
CircleAdd(&(g->setpoint.ecd.yaw), delta_ecd_yaw, M_2PI);
|
||||
}
|
||||
/*计算零点*/
|
||||
g->param->gimbal_zero.yaw = g->param->gimbal_zero.yaw_encoder - g->param->gimbal_zero.travel.yaw;
|
||||
g->param->gimbal_zero.pit = g->param->gimbal_zero.pit_encoder - g->param->gimbal_zero.travel.pit;
|
||||
/*基于零点的设定角度*/
|
||||
/*加的相对角度应该限制在3.14~-3.14*/
|
||||
CircleAdd(&(g->relative_angle.yaw),delta_yaw,M_2PI);
|
||||
if((g->relative_angle.yaw)>=M_2PI)g->relative_angle.yaw-=(M_2PI);
|
||||
|
||||
/* 处理pitch控制命令,软件限位 - 使用电机绝对角度 */
|
||||
g->setpoint.ecd.pit+=delta_ecd_pit;
|
||||
/* 限制控制命令 */
|
||||
if (g->param->travel.pit > 0)
|
||||
Clip(&(g->setpoint.ecd.pit),g->limit.set_ecd_pit.min,g->limit.set_ecd_pit.max);
|
||||
|
||||
|
||||
yaw_velocity_set_point = PID_Calc(&(g->pid.yaw_ecd_angle), g->setpoint.ecd.yaw,
|
||||
g->feedback.motor.yaw.rotor_abs_angle, 0.0f, g->dt);
|
||||
g->out.yaw = PID_Calc(&(g->pid.yaw_velocity), yaw_velocity_set_point,
|
||||
g->feedback.motor.yaw.rotor_speed, 0.f, g->dt);
|
||||
g->relative_angle.pit=+delta_pit;
|
||||
|
||||
g->setpoint.eulr.yaw=g->param->gimbal_zero.yaw + g->relative_angle.yaw;
|
||||
g->setpoint.eulr.pit=g->param->gimbal_zero.pit + g->relative_angle.pit;
|
||||
|
||||
pit_velocity_set_point = PID_Calc(&(g->pid.pit_ecd_angle), g->setpoint.ecd.pit,
|
||||
g->feedback.motor.pit.rotor_abs_angle, 0.0f, g->dt);
|
||||
g->out.pit = PID_Calc(&(g->pid.pit_velocity), pit_velocity_set_point,
|
||||
g->feedback.motor.pit.rotor_speed, 0.f, g->dt);
|
||||
|
||||
/*yaw的限位*/
|
||||
if (g->param->motor.limit_yaw==true)
|
||||
Clip(&(g->setpoint.eulr.yaw),g->limit.set_yaw.min,g->limit.set_yaw.max);
|
||||
else{
|
||||
/*限制在-3.14~3.14*/
|
||||
if(g->setpoint.eulr.yaw > M_PI) g->setpoint.eulr.yaw -= M_2PI;
|
||||
}
|
||||
/* pit限制控制命令 */
|
||||
if (g->param->motor.limit_pit==true)
|
||||
Clip(&(g->setpoint.eulr.pit),g->limit.set_pit.min,g->limit.set_pit.max);
|
||||
|
||||
yaw_omega_set_point = PID_Calc(&(g->pid.yaw_angle), g->setpoint.eulr.yaw,
|
||||
g->feedback.imu.eulr.yaw, 0.0f, g->dt);
|
||||
g->out.yaw = PID_Calc(&(g->pid.yaw_omega), yaw_omega_set_point,
|
||||
g->feedback.imu.gyro.z, 0.f, g->dt);
|
||||
|
||||
pit_omega_set_point = PID_Calc(&(g->pid.pit_angle), g->setpoint.eulr.pit,
|
||||
g->feedback.imu.eulr.pit, 0.0f, g->dt);
|
||||
g->out.pit = PID_Calc(&(g->pid.pit_omega), pit_omega_set_point,
|
||||
g->feedback.imu.gyro.x, 0.f, g->dt);
|
||||
|
||||
/*前馈添加*/
|
||||
if(g->param->feedforward.imu.yaw==true)
|
||||
g->out.yaw+=g->param->feedforward.imu.coefficient_yaw*(yaw_omega_set_point - g->feedback.imu.gyro.z);
|
||||
if(g->param->feedforward.imu.pit==true)
|
||||
g->out.pit+=g->param->feedforward.imu.coefficient_pit*(pit_omega_set_point - g->feedback.imu.gyro.x);
|
||||
|
||||
break;
|
||||
/* 输出滤波 */
|
||||
|
||||
@ -49,7 +49,8 @@ typedef struct {
|
||||
|
||||
|
||||
typedef struct {
|
||||
|
||||
bool limit_yaw;/*是否开启限位*/
|
||||
bool limit_pit;
|
||||
Gimbal_MOTOR pit;
|
||||
Gimbal_MOTOR yaw;
|
||||
MOTOR_DM_Param_t pit_dm_motor; /* pitch轴电机参数 */
|
||||
@ -57,6 +58,7 @@ typedef struct {
|
||||
|
||||
MOTOR_RM_Param_t pit_rm_motor; /* pitch轴电机参数 */
|
||||
MOTOR_RM_Param_t yaw_rm_motor; /* yaw轴电机参数 */
|
||||
|
||||
} Gimbal_MOTOR_Param_t;
|
||||
|
||||
/* 云台参数的结构体,包含所有初始化用的参数,通常是const,存好几组。*/
|
||||
@ -78,35 +80,48 @@ typedef struct {
|
||||
|
||||
} pid;
|
||||
|
||||
/* 前馈系数 */
|
||||
struct {
|
||||
struct{
|
||||
bool yaw;
|
||||
bool pit;
|
||||
float coefficient_yaw;
|
||||
float coefficient_pit;
|
||||
}imu;
|
||||
|
||||
}feedforward;
|
||||
|
||||
/* 低通滤波器截止频率 */
|
||||
struct {
|
||||
float out; /* 电机输出 */
|
||||
float gyro; /* 陀螺仪数据 */
|
||||
} low_pass_cutoff_freq;
|
||||
|
||||
struct {
|
||||
float yaw; /* yaw轴机械限位 */
|
||||
float pit; /* pitch轴机械限位 */
|
||||
} mech_zero;
|
||||
|
||||
struct {
|
||||
float yaw; /* yaw轴机械限位行程 -1表示无限位 */
|
||||
float pit; /* pitch轴机械限位行程 -1表示无限位*/
|
||||
float ecd_yaw; /* yaw轴机械限位行程 -1表示无限位 */
|
||||
float ecd_pit; /* pitch轴机械限位行程 -1表示无限位*/
|
||||
} travel;
|
||||
|
||||
struct {
|
||||
float pit_max; /*pit的限位*/
|
||||
float pit_min;
|
||||
float yaw_max; /*yaw的限位*/
|
||||
float yaw_min;
|
||||
float pit_ecd_max; /*pit的限位*/
|
||||
float pit_ecd_min;
|
||||
float yaw_ecd_max; /*yaw的限位*/
|
||||
float yaw_ecd_min;
|
||||
|
||||
}Set_Limit_t;
|
||||
|
||||
struct {
|
||||
|
||||
struct{
|
||||
float yaw; /* 零点行程 */
|
||||
float pit;
|
||||
}travel;
|
||||
|
||||
float pit; /*零点*/
|
||||
float yaw;
|
||||
|
||||
float pit_encoder; /*零点*/
|
||||
float yaw_encoder;
|
||||
}gimbal_zero;
|
||||
|
||||
|
||||
|
||||
struct {
|
||||
MOTOR_MIT_Output_t yaw_dm; /*达妙的参数*/
|
||||
MOTOR_MIT_Output_t pit_dm;
|
||||
@ -170,16 +185,15 @@ typedef struct {
|
||||
} pid;
|
||||
|
||||
struct {
|
||||
Gimbal_Limit_t yaw;
|
||||
Gimbal_Limit_t pit;
|
||||
|
||||
Gimbal_Limit_t set_yaw;
|
||||
Gimbal_Limit_t set_pit;
|
||||
Gimbal_Limit_t set_ecd_yaw;
|
||||
Gimbal_Limit_t set_ecd_pit;
|
||||
} limit;
|
||||
|
||||
|
||||
|
||||
struct {
|
||||
float yaw;
|
||||
float pit;
|
||||
} relative_angle;
|
||||
|
||||
struct {
|
||||
LowPassFilter2p_t yaw;
|
||||
|
||||
@ -39,11 +39,9 @@ void Task_gimbal_ctrl(void *argument) {
|
||||
while (1) {
|
||||
tick += delay_tick; /* 计算下一个唤醒时刻 */
|
||||
/* USER CODE BEGIN */
|
||||
if(osMessageQueueGet(task_runtime.msgq.gimbal.imu, &gimbal_imu, NULL, 0)==osOK)
|
||||
Gimbal_UpdateIMU(&gimbal, &gimbal_imu);
|
||||
|
||||
|
||||
osMessageQueueGet(task_runtime.msgq.gimbal.cmd, &gimbal_cmd, NULL, 0);
|
||||
if(osMessageQueueGet(task_runtime.msgq.gimbal.imu, &gimbal_imu, NULL, 0)==osOK){
|
||||
Gimbal_UpdateIMU(&gimbal, &gimbal_imu);}
|
||||
if(osMessageQueueGet(task_runtime.msgq.gimbal.cmd, &gimbal_cmd, NULL, 0)==osOK)
|
||||
Gimbal_UpdateFeedback(&gimbal);
|
||||
Gimbal_Control(&gimbal,&gimbal_cmd);
|
||||
Gimbal_Output(&gimbal);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user