This commit is contained in:
yunhai8432 2025-11-30 19:50:34 +08:00
parent e50944c11b
commit 998dbdd8d1
8 changed files with 59 additions and 29 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -21,7 +21,7 @@ Target DLL: CMSIS_AGDI.dll V1.32.13.0
Dialog DLL: TCM.DLL V1.48.0.0
<h2>Project:</h2>
D:\yunha\gimbal\motor\gimbal\MDK-ARM\gimbal.uvprojx
D:\yunha\gimbal\MDK-ARM\gimbal.uvprojx
Project File Date: 10/25/2025
<h2>Output:</h2>
@ -31,6 +31,9 @@ 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 gimbal.c...
linking...
Program Size: Code=84848 RO-data=996 RW-data=404 ZI-data=34268
"gimbal\gimbal.axf" - 0 Error(s), 0 Warning(s).
<h2>Software Packages used:</h2>
@ -55,7 +58,7 @@ Package Vendor: Keil
* Component: ARM::CMSIS:CORE:5.4.0
Include file: CMSIS\Core\Include\tz_context.h
Build Time Elapsed: 00:00:01
Build Time Elapsed: 00:00:02
</pre>
</body>
</html>

View File

@ -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>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Fri Nov 14 21:27:19 2025
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Sun Nov 30 19:50:03 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>

View File

@ -8699,7 +8699,7 @@ Image component sizes
134 0 0 0 0 3297 dma.o
780 8 0 0 0 3412 filter.o
98 0 48 0 4 3084 freertos.o
2740 48 0 0 0 8732 gimbal.o
2740 48 0 0 0 8719 gimbal.o
236 12 0 0 772 5081 gimbal_ctrl.o
554 0 0 0 0 4164 gpio.o
576 12 56 0 64 4722 gpio_1.o
@ -8745,7 +8745,7 @@ Image component sizes
0 0 183 0 80 3063 user_task.o
----------------------------------------------------------------------
77128 314 804 404 34172 454349 Object Totals
77128 314 804 404 34172 454336 Object Totals
0 0 32 0 0 0 (incl. Generated)
394 8 3 3 30 0 (incl. Padding)
@ -8836,8 +8836,8 @@ Image component sizes
Code (inc. data) RO Data RW Data ZI Data Debug
84848 990 996 404 34268 456113 Grand Totals
84848 990 996 120 34268 456113 ELF Image Totals (compressed)
84848 990 996 404 34268 456100 Grand Totals
84848 990 996 120 34268 456100 ELF Image Totals (compressed)
84848 990 996 120 0 0 ROM Totals
==============================================================================

Binary file not shown.

View File

@ -2534,7 +2534,7 @@ 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)(0x69172E35)(-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)
F (..\User\module\gimbal.c)(0x692C2F69)(-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)(0x6917284C)
I (..\User\component\ahrs.h)(0x68F3410E)
I (..\User\component\user_math.h)(0x68F22FA9)

View File

@ -298,7 +298,7 @@ int8_t Gimbal_Control(Gimbal_t *g, Gimbal_CMD_t *g_cmd) {
case GIMBAL_MODE_RELATIVE:
/*计算零点*/
g->zero.travel.yaw=motor_imu_offset(&g->feedback.motor.yaw.rotor_abs_angle,&g->feedback.imu.eulr.yaw);
g->zero.travel.yaw=motor_imu_offset(&g->feedback.motor.pit.rotor_abs_angle,&g->feedback.imu.eulr.pit);
g->zero.travel.pit=motor_imu_offset(&g->feedback.motor.pit.rotor_abs_angle,&g->feedback.imu.eulr.pit);
g->zero.yaw = g->param->zero.yaw_encoder - g->zero.travel.yaw;
g->zero.pit = g->param->zero.pit_encoder - g->zero.travel.pit;