Compare commits

..

2 Commits

162 changed files with 12753 additions and 5456 deletions

View File

@@ -8,10 +8,9 @@ SR 英雄 2025 的代码,适用于 C 板开发,使用标准库
编译器使用Keil V5 编译器使用Keil V5
目前正在调试,/尝试修复云台pitch 云台pitch轴等待后续修复代码yaw轴皮带需调整 目前正在调试,需要添加单发限位
//Raw Code下的代码为被注释掉的源代码通常用于关闭某些异常或不需要的功能用于调试 //Raw Code下的代码为被注释掉的源代码通常用于关闭某些异常或不需要的功能用于调试
//Testing Code下的代码为替代代码用于关闭某些异常或不需要的功能用于调试 //Testing Code下的代码为替代代码用于关闭某些异常或不需要的功能用于调试

View File

@@ -60,7 +60,7 @@ void Gimbal_Init(void)
PID_PositionSetOUTRange(&Gimbal_PitchAngleSpeedPID,-30000,30000); PID_PositionSetOUTRange(&Gimbal_PitchAngleSpeedPID,-30000,30000);
*/ */
PID_PositionStructureInit(&Gimbal_YawAnglePositionPID,0);//Yaw轴陀螺仪闭环 PID_PositionStructureInit(&Gimbal_YawAnglePositionPID,0);//Yaw轴陀螺仪闭环
PID_PositionSetParameter(&Gimbal_YawAnglePositionPID,5,0,0.1); PID_PositionSetParameter(&Gimbal_YawAnglePositionPID,10,0,650);
PID_PositionSetEkRange(&Gimbal_YawAnglePositionPID,-1,1); PID_PositionSetEkRange(&Gimbal_YawAnglePositionPID,-1,1);
PID_PositionSetOUTRange(&Gimbal_YawAnglePositionPID,-200,200); PID_PositionSetOUTRange(&Gimbal_YawAnglePositionPID,-200,200);
PID_PositionStructureInit(&Gimbal_YawAngleSpeedPID,200); PID_PositionStructureInit(&Gimbal_YawAngleSpeedPID,200);
@@ -69,32 +69,32 @@ void Gimbal_Init(void)
PID_PositionSetOUTRange(&Gimbal_YawAngleSpeedPID,-50000,50000); PID_PositionSetOUTRange(&Gimbal_YawAngleSpeedPID,-50000,50000);
PID_PositionStructureInit(&Gimbal_PitchAnglePositionPID,0);//Pitch轴陀螺仪闭环 PID_PositionStructureInit(&Gimbal_PitchAnglePositionPID,0);//Pitch轴陀螺仪闭环
PID_PositionSetParameter(&Gimbal_PitchAnglePositionPID,5,0,0); PID_PositionSetParameter(&Gimbal_PitchAnglePositionPID,40,0,700);
PID_PositionSetEkRange(&Gimbal_PitchAnglePositionPID,-1,1); PID_PositionSetEkRange(&Gimbal_PitchAnglePositionPID,-0.1,0.1);
PID_PositionSetOUTRange(&Gimbal_PitchAnglePositionPID,-150,150); PID_PositionSetOUTRange(&Gimbal_PitchAnglePositionPID,-200,200);
PID_PositionStructureInit(&Gimbal_PitchAngleSpeedPID,150); PID_PositionStructureInit(&Gimbal_PitchAngleSpeedPID,150);
PID_PositionSetParameter(&Gimbal_PitchAngleSpeedPID,200,0,10); PID_PositionSetParameter(&Gimbal_PitchAngleSpeedPID,150,0.001,7);
PID_PositionSetEkRange(&Gimbal_PitchAngleSpeedPID,-0,0); PID_PositionSetEkRange(&Gimbal_PitchAngleSpeedPID,-0.1,0.1);
PID_PositionSetOUTRange(&Gimbal_PitchAngleSpeedPID,-30000,30000); PID_PositionSetOUTRange(&Gimbal_PitchAngleSpeedPID,-50000,50000);
PID_PositionStructureInit(&Gimbal_L1_FrictionWheelPID,0);//左摩擦轮 PID_PositionStructureInit(&Gimbal_L1_FrictionWheelPID,0);//左摩擦轮
PID_PositionSetParameter(&Gimbal_L1_FrictionWheelPID,0.1,0,0); PID_PositionSetParameter(&Gimbal_L1_FrictionWheelPID,15,0,0);
PID_PositionSetEkRange(&Gimbal_L1_FrictionWheelPID,-5,5); PID_PositionSetEkRange(&Gimbal_L1_FrictionWheelPID,-1,1);
PID_PositionSetOUTRange(&Gimbal_L1_FrictionWheelPID,-15000,15000); PID_PositionSetOUTRange(&Gimbal_L1_FrictionWheelPID,-15000,15000);
PID_PositionStructureInit(&Gimbal_R1_FrictionWheelPID,0);//右摩擦轮 PID_PositionStructureInit(&Gimbal_R1_FrictionWheelPID,0);//右摩擦轮
PID_PositionSetParameter(&Gimbal_R1_FrictionWheelPID,0.1,0,0); PID_PositionSetParameter(&Gimbal_R1_FrictionWheelPID,15,0,0);
PID_PositionSetEkRange(&Gimbal_R1_FrictionWheelPID,-5,5); PID_PositionSetEkRange(&Gimbal_R1_FrictionWheelPID,-1,1);
PID_PositionSetOUTRange(&Gimbal_R1_FrictionWheelPID,-15000,15000); PID_PositionSetOUTRange(&Gimbal_R1_FrictionWheelPID,-15000,15000);
PID_PositionStructureInit(&Gimbal_L2_FrictionWheelPID,0);//左摩擦轮 PID_PositionStructureInit(&Gimbal_L2_FrictionWheelPID,0);//左摩擦轮
PID_PositionSetParameter(&Gimbal_L2_FrictionWheelPID,0.1,0,0); PID_PositionSetParameter(&Gimbal_L2_FrictionWheelPID,15,0,0);
PID_PositionSetEkRange(&Gimbal_L2_FrictionWheelPID,-5,5); PID_PositionSetEkRange(&Gimbal_L2_FrictionWheelPID,-1,1);
PID_PositionSetOUTRange(&Gimbal_L2_FrictionWheelPID,-15000,15000); PID_PositionSetOUTRange(&Gimbal_L2_FrictionWheelPID,-15000,15000);
PID_PositionStructureInit(&Gimbal_R2_FrictionWheelPID,0);//右摩擦轮 PID_PositionStructureInit(&Gimbal_R2_FrictionWheelPID,0);//右摩擦轮
PID_PositionSetParameter(&Gimbal_R2_FrictionWheelPID,0.1,0,0); PID_PositionSetParameter(&Gimbal_R2_FrictionWheelPID,15,0,0);
PID_PositionSetEkRange(&Gimbal_R2_FrictionWheelPID,-5,5); PID_PositionSetEkRange(&Gimbal_R2_FrictionWheelPID,-1,1);
PID_PositionSetOUTRange(&Gimbal_R2_FrictionWheelPID,-15000,15000); PID_PositionSetOUTRange(&Gimbal_R2_FrictionWheelPID,-15000,15000);
PID_PositionStructureInit(&Gimbal_RammerSpinSpeedPID,Gimbal_RammerSpeed);//拨弹盘 PID_PositionStructureInit(&Gimbal_RammerSpinSpeedPID,Gimbal_RammerSpeed);//拨弹盘
@@ -160,7 +160,7 @@ void Gimbal_PitchControl(void)
//串级PID闭环Pitch角 //串级PID闭环Pitch角
PID_PositionCalc(&Gimbal_PitchAnglePositionPID,AttitudeAlgorithms_DegRoll); PID_PositionCalc(&Gimbal_PitchAnglePositionPID,AttitudeAlgorithms_DegRoll);
Gimbal_PitchAnglePositionPID.OUT=kalmanFilter(&kfp_PITCH,Gimbal_PitchAnglePositionPID.OUT); Gimbal_PitchAnglePositionPID.OUT=kalmanFilter(&kfp_PITCH,Gimbal_PitchAnglePositionPID.OUT);
Gimbal_PitchAngleSpeedPID.Need_Value=-Gimbal_PitchAnglePositionPID.OUT; Gimbal_PitchAngleSpeedPID.Need_Value=-Gimbal_PitchAnglePositionPID.OUT;
PID_PositionCalc(&Gimbal_PitchAngleSpeedPID,GM6020_MotorStatus[Gimbal_PitchMotor-0x205].Speed); PID_PositionCalc(&Gimbal_PitchAngleSpeedPID,GM6020_MotorStatus[Gimbal_PitchMotor-0x205].Speed);

View File

@@ -12,6 +12,32 @@ KFP kfp={0.02,0,0,0,0.01,0.543};//卡尔曼滤波器结构体
float AttitudeAlgorithms_q[4];//姿态解算四元数 float AttitudeAlgorithms_q[4];//姿态解算四元数
float AttitudeAlgorithms_RadYaw,AttitudeAlgorithms_RadPitch,AttitudeAlgorithms_RadRoll;//弧度制角度 float AttitudeAlgorithms_RadYaw,AttitudeAlgorithms_RadPitch,AttitudeAlgorithms_RadRoll;//弧度制角度
float AttitudeAlgorithms_DegYaw,AttitudeAlgorithms_DegPitch,AttitudeAlgorithms_DegRoll;//角度制角度 float AttitudeAlgorithms_DegYaw,AttitudeAlgorithms_DegPitch,AttitudeAlgorithms_DegRoll;//角度制角度
float BMI088_GyroZeroOffset[3];//陀螺仪初始零偏
float BMI088_GyroWithoutOffset[3];//消除零偏后的陀螺仪数据
/*
*函数简介:BMI088清除零偏
*参数说明:无
*返回类型:无
*备注:采集前100次数据取平均值消除零偏
*/
void ZeroOffset_Calibration(void)
{
uint16_t BMI088_CountFlag;
for (BMI088_CountFlag=0; BMI088_CountFlag < 1000; BMI088_CountFlag++)
{
BMI088_GyroZeroOffset[0]=BMI088_GyroZeroOffset[0]+BMI088_Gyro[0];
}
BMI088_GyroZeroOffset[0]=BMI088_GyroZeroOffset[0]/1000;
for (BMI088_CountFlag=0; BMI088_CountFlag < 1000; BMI088_CountFlag++)
{
BMI088_GyroZeroOffset[1]=BMI088_GyroZeroOffset[1]+BMI088_Gyro[1];
}
BMI088_GyroZeroOffset[1]=BMI088_GyroZeroOffset[1]/1000;
}
/* /*
*函数简介:姿态解算初始化 *函数简介:姿态解算初始化

View File

@@ -842,16 +842,16 @@ ARM Macro Assembler Page 13
00000000 00000000
Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M4.fp.sp --apcs= Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M4.fp.sp --apcs=
interwork --depend=.\objects\startup_stm32f40_41xxx.d -o.\objects\startup_stm32 interwork --depend=.\objects\startup_stm32f40_41xxx.d -o.\objects\startup_stm32
f40_41xxx.o -IC:\Users\LSMushui\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\3.1. f40_41xxx.o -ID:\useless\ARM\PACK\Keil\STM32F4xx_DFP\3.0.0\Drivers\CMSIS\Device
ARM Macro Assembler Page 14 ARM Macro Assembler Page 14
1\Drivers\CMSIS\Device\ST\STM32F4xx\Include --predefine="__MICROLIB SETA 1" --p \ST\STM32F4xx\Include --predefine="__MICROLIB SETA 1" --predefine="__UVISION_VE
redefine="__UVISION_VERSION SETA 543" --predefine="STM32F407xx SETA 1" --list=. RSION SETA 539" --predefine="STM32F407xx SETA 1" --list=.\listings\startup_stm3
\listings\startup_stm32f40_41xxx.lst Start\startup_stm32f40_41xxx.s 2f40_41xxx.lst Start\startup_stm32f40_41xxx.s

Binary file not shown.

View File

@@ -3,131 +3,43 @@
<pre> <pre>
<h1><EFBFBD>Vision Build Log</h1> <h1><EFBFBD>Vision Build Log</h1>
<h2>Tool Versions:</h2> <h2>Tool Versions:</h2>
IDE-Version: <20><>Vision V5.43.1.0 IDE-Version: <20><>Vision V5.39.0.0
Copyright (C) 2025 ARM Ltd and ARM Germany GmbH. All rights reserved. Copyright (C) 2023 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: LS Mushui, 1, LIC=NQQMA-1N3GT-30GNC-71PK8-06QJT-WGQ3X License Information: sun JXF, sun, LIC=HN0AE-5SW5I-PCIJ8-3MDKX-KLD28-41CF7
Tool Versions: Tool Versions:
Toolchain: MDK-ARM Plus Version: 5.43.0.0 Toolchain: MDK-ARM Plus Version: 5.39.0.0
Toolchain Path: C:\Users\LSMushui\AppData\Local\Keil_v5\ARM\ARMCC\Bin Toolchain Path: D:\useless\ARM\ARM_Compiler_5.06u7\Bin
C Compiler: Armcc.exe V5.06 update 7 (build 960) C Compiler: Armcc.exe V5.06 update 7 (build 960)
Assembler: Armasm.exe V5.06 update 7 (build 960) Assembler: Armasm.exe V5.06 update 7 (build 960)
Linker/Locator: ArmLink.exe V5.06 update 7 (build 960) Linker/Locator: ArmLink.exe V5.06 update 7 (build 960)
Library Manager: ArmAr.exe V5.06 update 7 (build 960) Library Manager: ArmAr.exe V5.06 update 7 (build 960)
Hex Converter: FromElf.exe V5.06 update 7 (build 960) Hex Converter: FromElf.exe V5.06 update 7 (build 960)
CPU DLL: SARMCM3.DLL V5.43.0.0 CPU DLL: SARMCM3.DLL V5.39.0.0
Dialog DLL: DCM.DLL V1.17.5.0 Dialog DLL: DCM.DLL V1.17.5.0
Target DLL: CMSIS_AGDI.dll V1.33.24.0 Target DLL: CMSIS_AGDI.dll V1.33.16.0
Dialog DLL: TCM.DLL V1.56.6.0 Dialog DLL: TCM.DLL V1.56.4.0
<h2>Project:</h2> <h2>Project:</h2>
C:\Users\LSMushui\Desktop\RM\Hero-C-Board-Legacy\<5C><>̨\<5C><>̨\Project.uvprojx D:\robomaster\Hero-C-Board-Legacy-main\hero-c-board-legacy\<5C><>̨\<5C><>̨\Project.uvprojx
Project File Date: 11/02/2025 Project File Date: 03/14/2026
<h2>Output:</h2> <h2>Output:</h2>
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Users\LSMushui\AppData\Local\Keil_v5\ARM\ARMCC\Bin' *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\useless\ARM\ARM_Compiler_5.06u7\Bin'
Rebuild target 'Target 1' Build target 'Target 1'
assembling startup_stm32f40_41xxx.s... ".\Objects\Project.axf" - 0 Error(s), 0 Warning(s).
compiling system_stm32f4xx.c...
compiling stm32f4xx_cec.c...
compiling stm32f4xx_can.c...
compiling stm32f4xx_crc.c...
compiling stm32f4xx_dsi.c...
compiling misc.c...
compiling stm32f4xx_cryp_des.c...
compiling stm32f4xx_adc.c...
compiling stm32f4xx_cryp.c...
compiling stm32f4xx_flash_ramfunc.c...
compiling stm32f4xx_dcmi.c...
compiling stm32f4xx_cryp_aes.c...
compiling stm32f4xx_dbgmcu.c...
compiling stm32f4xx_dfsdm.c...
compiling stm32f4xx_fmpi2c.c...
compiling stm32f4xx_dma.c...
compiling stm32f4xx_dma2d.c...
compiling stm32f4xx_cryp_tdes.c...
compiling stm32f4xx_gpio.c...
compiling stm32f4xx_dac.c...
compiling stm32f4xx_exti.c...
compiling stm32f4xx_flash.c...
compiling stm32f4xx_fsmc.c...
compiling stm32f4xx_hash_md5.c...
compiling stm32f4xx_hash_sha1.c...
compiling stm32f4xx_iwdg.c...
compiling stm32f4xx_hash.c...
compiling stm32f4xx_lptim.c...
compiling stm32f4xx_rng.c...
compiling stm32f4xx_i2c.c...
compiling stm32f4xx_qspi.c...
compiling stm32f4xx_pwr.c...
compiling stm32f4xx_spdifrx.c...
compiling stm32f4xx_sdio.c...
compiling stm32f4xx_ltdc.c...
compiling stm32f4xx_syscfg.c...
compiling stm32f4xx_spi.c...
compiling stm32f4xx_sai.c...
compiling stm32f4xx_rtc.c...
compiling stm32f4xx_rcc.c...
compiling Delay.c...
compiling stm32f4xx_wwdg.c...
compiling stm32f4xx_usart.c...
compiling stm32f4xx_tim.c...
compiling TIM.c...
compiling UART.c...
compiling AHRS_middleware.c...
compiling user_lib.c...
compiling WaveFiltering_Kalman_Filtering.c...
Control\WaveFiltering_Kalman_Filtering.c(13): warning: #177-D: variable "pDst" was declared but never referenced
float pDst,pDst1=1.0f;
Control\WaveFiltering_Kalman_Filtering.c(13): warning: #177-D: variable "pDst1" was declared but never referenced
float pDst,pDst1=1.0f;
Control\WaveFiltering_Kalman_Filtering.c(32): warning: #1-D: last line of file ends without a newline
Control\WaveFiltering_Kalman_Filtering.c: 3 warnings, 0 errors
compiling MyI2C.c...
compiling CAN.c...
compiling Buzzer.c...
compiling LED.c...
compiling IST8310.c...
compiling Remote.c...
compiling BMI088.c...
compiling Laser.c...
compiling CloseLoopControl.c...
compiling LinkCheck.c...
compiling Warming.c...
compiling M3508.c...
compiling M2006.c...
compiling GM6020.c...
compiling AttitudeAlgorithms.c...
compiling CToC.c...
compiling IMUTemperatureControl.c...
compiling PID.c...
compiling Visual.c...
CarBody\Visual.c(68): warning: #9-D: nested comment is not allowed
UART2_Printf("%f %f %f %f \n",Visual_Yaw,Visual_Pitch,Visual_GetRoll,Visual_GetDelay);//*0.0030518509475997f*/
CarBody\Visual.c(165): warning: #1-D: last line of file ends without a newline
}
CarBody\Visual.c: 2 warnings, 0 errors
compiling Gimbal.c...
compiling RefereeSystem.c...
compiling Keyboard.c...
compiling main.c...
compiling stm32f4xx_it.c...
linking...
Program Size: Code=31636 RO-data=1236 RW-data=552 ZI-data=3520
".\Objects\Project.axf" - 0 Error(s), 5 Warning(s).
<h2>Software Packages used:</h2> <h2>Software Packages used:</h2>
Package Vendor: Keil Package Vendor: Keil
https://www.keil.com/pack/Keil.STM32F4xx_DFP.3.1.1.pack https://www.keil.com/pack/Keil.STM32F4xx_DFP.3.0.0.pack
Keil::STM32F4xx_DFP@3.1.1 Keil::STM32F4xx_DFP@3.0.0
STMicroelectronics STM32F4 Series Device Support STMicroelectronics STM32F4 Series Device Support
<h2>Collection of Component include folders:</h2> <h2>Collection of Component include folders:</h2>
<h2>Collection of Component Files used:</h2> <h2>Collection of Component Files used:</h2>
Build Time Elapsed: 00:00:05 Build Time Elapsed: 00:00:00
</pre> </pre>
</body> </body>
</html> </html>

View File

@@ -3,7 +3,7 @@
<title>Static Call Graph - [.\Objects\Project.axf]</title></head> <title>Static Call Graph - [.\Objects\Project.axf]</title></head>
<body><HR> <body><HR>
<H1>Static Call Graph for image .\Objects\Project.axf</H1><HR> <H1>Static Call Graph for image .\Objects\Project.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060960: Last Updated: Sat Mar 14 13:25:17 2026 <BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060960: Last Updated: Sat Mar 21 13:37:53 2026
<BR><P> <BR><P>
<H3>Maximum Stack Usage = 280 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3> <H3>Maximum Stack Usage = 280 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3> Call chain for Maximum Stack Depth:</H3>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x08000000 0x00100000 { ; load region size_region
ER_IROM1 0x08000000 0x00100000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00020000 { ; RW data
.ANY (+RW +ZI)
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -103,7 +103,7 @@
<bEvRecOn>1</bEvRecOn> <bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf> <bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf> <bTchkAxf>0</bTchkAxf>
<nTsel>3</nTsel> <nTsel>2</nTsel>
<sDll></sDll> <sDll></sDll>
<sDllPa></sDllPa> <sDllPa></sDllPa>
<sDlgDll></sDlgDll> <sDlgDll></sDlgDll>
@@ -120,7 +120,7 @@
<SetRegEntry> <SetRegEntry>
<Number>0</Number> <Number>0</Number>
<Key>CMSIS_AGDI</Key> <Key>CMSIS_AGDI</Key>
<Name>-X"CMSIS-DAP_LU" -ULU_2022_8888 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407IGHx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name> <Name>-X"CMSIS-DAP_LU" -ULU_2022_8888 -O206 -S8 -C0 -P00000000 -N00("") -D00(00000000) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407IGHx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name>
</SetRegEntry> </SetRegEntry>
<SetRegEntry> <SetRegEntry>
<Number>0</Number> <Number>0</Number>

View File

@@ -10,14 +10,14 @@
<TargetName>Target 1</TargetName> <TargetName>Target 1</TargetName>
<ToolsetNumber>0x4</ToolsetNumber> <ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName> <ToolsetName>ARM-ADS</ToolsetName>
<pArmCC>5060960::V5.06 update 7 (build 960)::.\ARMCC</pArmCC> <pArmCC>5060960::V5.06 update 7 (build 960)::.\ARM_Compiler_5.06u7</pArmCC>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed> <pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARM_Compiler_5.06u7</pCCUsed>
<uAC6>0</uAC6> <uAC6>0</uAC6>
<TargetOption> <TargetOption>
<TargetCommonOption> <TargetCommonOption>
<Device>STM32F407IGHx</Device> <Device>STM32F407IGHx</Device>
<Vendor>STMicroelectronics</Vendor> <Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32F4xx_DFP.3.1.1</PackID> <PackID>Keil.STM32F4xx_DFP.3.0.0</PackID>
<PackURL>https://www.keil.com/pack/</PackURL> <PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x10000000,0x00010000) IROM(0x08000000,0x00100000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE</Cpu> <Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x10000000,0x00010000) IROM(0x08000000,0x00100000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec> <FlashUtilSpec></FlashUtilSpec>

View File

@@ -58,7 +58,7 @@ void Mecanum_Init(void)
//Raw Code// //Raw Code//
//PID_PositionSetParameter(&Mecanum_TrackPID,0.007,0,0.8); //PID_PositionSetParameter(&Mecanum_TrackPID,0.007,0,0.8);
//Testing Code// //Testing Code//
PID_PositionSetParameter(&Mecanum_TrackPID,0.01,0,01);//随便写的PID值勉强可以用 PID_PositionSetParameter(&Mecanum_TrackPID,0.01,0,1);//随便写的PID值勉强可以用
PID_PositionSetEkRange(&Mecanum_TrackPID,-1,1); PID_PositionSetEkRange(&Mecanum_TrackPID,-1,1);
PID_PositionSetOUTRange(&Mecanum_TrackPID,-4,4); PID_PositionSetOUTRange(&Mecanum_TrackPID,-4,4);
@@ -184,16 +184,16 @@ void Mecanum_PowerMoveControl(void)
vx=vx_*cosf(Mecanum_YawTheta)-vy_*sinf(Mecanum_YawTheta); vx=vx_*cosf(Mecanum_YawTheta)-vy_*sinf(Mecanum_YawTheta);
vy=vx_*sinf(Mecanum_YawTheta)+vy_*cosf(Mecanum_YawTheta);//根据底盘云台相对角度修正xy轴速度 vy=vx_*sinf(Mecanum_YawTheta)+vy_*cosf(Mecanum_YawTheta);//根据底盘云台相对角度修正xy轴速度
/*==========小陀螺处理==========*/ /*==========小陀螺处理==========*/
if(Yaw_GM6020PositionValue<4096)//正向小陀螺为逆时针 if(Yaw_GM6020PositionValue<4096)//正向小陀螺为逆时针
{ {
if((Remote_RxData.Remote_RS==2 || Remote_RxData.Remote_KeyPush_Ctrl==1) || (Mecanum_GyroScopeFlag==1 && Mecanum_GyroScopeCloseFlag==1 && GM6020_MotorStatus[0].Position<Yaw_GM6020PositionValue+500))//小陀螺模式 if((Remote_RxData.Remote_RS==2 || Remote_RxData.Remote_KeyPush_Ctrl==1) || (Mecanum_GyroScopeFlag==1 && Mecanum_GyroScopeCloseFlag==1 && GM6020_MotorStatus[0].Position<Yaw_GM6020PositionValue+500))//小陀螺模式
{ {
w=Mecanum_GyroScopeAngularVelocity; w=-Mecanum_GyroScopeAngularVelocity;
Mecanum_GyroScopeFlag=1;//处于小陀螺状态 Mecanum_GyroScopeFlag=1;//处于小陀螺状态
Mecanum_GyroScopeCloseFlag=1;//小陀螺处于待关闭状态 Mecanum_GyroScopeCloseFlag=1;//小陀螺处于待关闭状态
} }
else if(Mecanum_GyroScopeFlag==1 && ((GM6020_MotorStatus[0].Angle>Yaw_GM6020PositionValue+100 || GM6020_MotorStatus[0].Angle<Yaw_GM6020PositionValue-100) || (GM6020_MotorStatus[0].Speed>2||GM6020_MotorStatus[0].Speed<-2)))//小陀螺关闭状态 else if(Mecanum_GyroScopeFlag==1 && ((GM6020_MotorStatus[0].Angle>Yaw_GM6020PositionValue+200 || GM6020_MotorStatus[0].Angle<Yaw_GM6020PositionValue-200) || (GM6020_MotorStatus[0].Speed>3||GM6020_MotorStatus[0].Speed<-3)))//小陀螺关闭状态
{ {
PID_PositionSetOUTRange(&Mecanum_TrackPID,-2,2); PID_PositionSetOUTRange(&Mecanum_TrackPID,-2,2);
PID_PositionCalc(&Mecanum_TrackPID,GM6020_MotorStatus[0].Position);//底盘跟云台 PID_PositionCalc(&Mecanum_TrackPID,GM6020_MotorStatus[0].Position);//底盘跟云台
@@ -201,7 +201,7 @@ void Mecanum_PowerMoveControl(void)
Mecanum_GyroScopeCloseFlag=0;//小陀螺未处于待关闭状态 Mecanum_GyroScopeCloseFlag=0;//小陀螺未处于待关闭状态
} }
else if(Remote_RxData.Remote_RS==1)//反向小陀螺模式(仅检录使用) else if(Remote_RxData.Remote_RS==1)//反向小陀螺模式(仅检录使用)
w=-Mecanum_GyroScopeAngularVelocity; w=Mecanum_GyroScopeAngularVelocity;
else else
{ {
PID_PositionSetOUTRange(&Mecanum_TrackPID,-5,5); PID_PositionSetOUTRange(&Mecanum_TrackPID,-5,5);
@@ -214,11 +214,11 @@ void Mecanum_PowerMoveControl(void)
{ {
if((Remote_RxData.Remote_RS==2 || Remote_RxData.Remote_KeyPush_Ctrl==1) || (Mecanum_GyroScopeFlag==1 && Mecanum_GyroScopeCloseFlag==1 && GM6020_MotorStatus[0].Position>Yaw_GM6020PositionValue-500))//小陀螺模式 if((Remote_RxData.Remote_RS==2 || Remote_RxData.Remote_KeyPush_Ctrl==1) || (Mecanum_GyroScopeFlag==1 && Mecanum_GyroScopeCloseFlag==1 && GM6020_MotorStatus[0].Position>Yaw_GM6020PositionValue-500))//小陀螺模式
{ {
w=-Mecanum_GyroScopeAngularVelocity; w=Mecanum_GyroScopeAngularVelocity;
Mecanum_GyroScopeFlag=1;//处于小陀螺状态 Mecanum_GyroScopeFlag=1;//处于小陀螺状态
Mecanum_GyroScopeCloseFlag=1;//小陀螺处于待关闭状态 Mecanum_GyroScopeCloseFlag=1;//小陀螺处于待关闭状态
} }
else if(Mecanum_GyroScopeFlag==1 && ((GM6020_MotorStatus[0].Angle>Yaw_GM6020PositionValue+5 || GM6020_MotorStatus[0].Angle<Yaw_GM6020PositionValue-5) || (GM6020_MotorStatus[0].Speed>1||GM6020_MotorStatus[0].Speed<-1)))//小陀螺关闭状态 else if(Mecanum_GyroScopeFlag==1 && ((GM6020_MotorStatus[0].Angle>Yaw_GM6020PositionValue+200 || GM6020_MotorStatus[0].Angle<Yaw_GM6020PositionValue-200) || (GM6020_MotorStatus[0].Speed>3||GM6020_MotorStatus[0].Speed<-3)))//小陀螺关闭状态
{ {
PID_PositionSetOUTRange(&Mecanum_TrackPID,-2,2); PID_PositionSetOUTRange(&Mecanum_TrackPID,-2,2);
PID_PositionCalc(&Mecanum_TrackPID,GM6020_MotorStatus[0].Position);//底盘跟云台 PID_PositionCalc(&Mecanum_TrackPID,GM6020_MotorStatus[0].Position);//底盘跟云台
@@ -226,7 +226,7 @@ void Mecanum_PowerMoveControl(void)
Mecanum_GyroScopeCloseFlag=0;//小陀螺未处于待关闭状态 Mecanum_GyroScopeCloseFlag=0;//小陀螺未处于待关闭状态
} }
else if(Remote_RxData.Remote_RS==1)//反向小陀螺模式(仅检录使用) else if(Remote_RxData.Remote_RS==1)//反向小陀螺模式(仅检录使用)
w=Mecanum_GyroScopeAngularVelocity; w=-Mecanum_GyroScopeAngularVelocity;
else else
{ {
PID_PositionSetOUTRange(&Mecanum_TrackPID,-5,5); PID_PositionSetOUTRange(&Mecanum_TrackPID,-5,5);
@@ -235,7 +235,6 @@ void Mecanum_PowerMoveControl(void)
w=-Mecanum_TrackPID.OUT; w=-Mecanum_TrackPID.OUT;
} }
} }
/*==========功率上限处理==========*/ /*==========功率上限处理==========*/
/*由缓冲能量得到功率控制功率上限*/ /*由缓冲能量得到功率控制功率上限*/
float Mecanum_PowerRef=1.0f/(60.0f-Mecanum_PowerControl_UseBuffer)*RefereeSystem_Buffer;//功率增益 float Mecanum_PowerRef=1.0f/(60.0f-Mecanum_PowerControl_UseBuffer)*RefereeSystem_Buffer;//功率增益

View File

@@ -842,16 +842,16 @@ ARM Macro Assembler Page 13
00000000 00000000
Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M4.fp.sp --apcs= Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M4.fp.sp --apcs=
interwork --depend=.\objects\startup_stm32f40_41xxx.d -o.\objects\startup_stm32 interwork --depend=.\objects\startup_stm32f40_41xxx.d -o.\objects\startup_stm32
f40_41xxx.o -IC:\Users\LSMushui\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\3.1. f40_41xxx.o -ID:\useless\ARM\PACK\Keil\STM32F4xx_DFP\3.0.0\Drivers\CMSIS\Device
ARM Macro Assembler Page 14 ARM Macro Assembler Page 14
1\Drivers\CMSIS\Device\ST\STM32F4xx\Include --predefine="__MICROLIB SETA 1" --p \ST\STM32F4xx\Include --predefine="__MICROLIB SETA 1" --predefine="__UVISION_VE
redefine="__UVISION_VERSION SETA 543" --predefine="STM32F407xx SETA 1" --list=. RSION SETA 539" --predefine="STM32F407xx SETA 1" --list=.\listings\startup_stm3
\listings\startup_stm32f40_41xxx.lst Start\startup_stm32f40_41xxx.s 2f40_41xxx.lst Start\startup_stm32f40_41xxx.s

View File

@@ -0,0 +1,2 @@
[EXTDLL]
Count=0

Binary file not shown.

View File

@@ -3,112 +3,43 @@
<pre> <pre>
<h1><EFBFBD>Vision Build Log</h1> <h1><EFBFBD>Vision Build Log</h1>
<h2>Tool Versions:</h2> <h2>Tool Versions:</h2>
IDE-Version: <20><>Vision V5.43.1.0 IDE-Version: <20><>Vision V5.39.0.0
Copyright (C) 2025 ARM Ltd and ARM Germany GmbH. All rights reserved. Copyright (C) 2023 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: LS Mushui, 1, LIC=NQQMA-1N3GT-30GNC-71PK8-06QJT-WGQ3X License Information: sun JXF, sun, LIC=HN0AE-5SW5I-PCIJ8-3MDKX-KLD28-41CF7
Tool Versions: Tool Versions:
Toolchain: MDK-ARM Plus Version: 5.43.0.0 Toolchain: MDK-ARM Plus Version: 5.39.0.0
Toolchain Path: C:\Users\LSMushui\AppData\Local\Keil_v5\ARM\ARMCC\Bin Toolchain Path: D:\useless\ARM\ARM_Compiler_5.06u7\Bin
C Compiler: Armcc.exe V5.06 update 7 (build 960) C Compiler: Armcc.exe V5.06 update 7 (build 960)
Assembler: Armasm.exe V5.06 update 7 (build 960) Assembler: Armasm.exe V5.06 update 7 (build 960)
Linker/Locator: ArmLink.exe V5.06 update 7 (build 960) Linker/Locator: ArmLink.exe V5.06 update 7 (build 960)
Library Manager: ArmAr.exe V5.06 update 7 (build 960) Library Manager: ArmAr.exe V5.06 update 7 (build 960)
Hex Converter: FromElf.exe V5.06 update 7 (build 960) Hex Converter: FromElf.exe V5.06 update 7 (build 960)
CPU DLL: SARMCM3.DLL V5.43.0.0 CPU DLL: SARMCM3.DLL V5.39.0.0
Dialog DLL: DCM.DLL V1.17.5.0 Dialog DLL: DCM.DLL V1.17.5.0
Target DLL: CMSIS_AGDI.dll V1.33.24.0 Target DLL: CMSIS_AGDI.dll V1.33.16.0
Dialog DLL: TCM.DLL V1.56.6.0 Dialog DLL: TCM.DLL V1.56.4.0
<h2>Project:</h2> <h2>Project:</h2>
C:\Users\LSMushui\Desktop\RM\Hero-C-Board-Legacy\<5C><><EFBFBD><EFBFBD>\<5C><><EFBFBD><EFBFBD>\Project.uvprojx D:\robomaster\Hero-C-Board-Legacy-main\hero-c-board-legacy\<5C><><EFBFBD><EFBFBD>\<5C><><EFBFBD><EFBFBD>\Project.uvprojx
Project File Date: 11/02/2025 Project File Date: 03/19/2026
<h2>Output:</h2> <h2>Output:</h2>
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Users\LSMushui\AppData\Local\Keil_v5\ARM\ARMCC\Bin' *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\useless\ARM\ARM_Compiler_5.06u7\Bin'
Rebuild target 'Target 1' Build target 'Target 1'
assembling startup_stm32f40_41xxx.s...
compiling system_stm32f4xx.c...
compiling stm32f4xx_cec.c...
compiling stm32f4xx_dsi.c...
compiling stm32f4xx_can.c...
compiling stm32f4xx_adc.c...
compiling stm32f4xx_cryp.c...
compiling stm32f4xx_crc.c...
compiling stm32f4xx_cryp_tdes.c...
compiling stm32f4xx_dma2d.c...
compiling stm32f4xx_gpio.c...
compiling stm32f4xx_fmpi2c.c...
compiling stm32f4xx_cryp_des.c...
compiling stm32f4xx_dfsdm.c...
compiling stm32f4xx_dac.c...
compiling misc.c...
compiling stm32f4xx_flash_ramfunc.c...
compiling stm32f4xx_exti.c...
compiling stm32f4xx_dbgmcu.c...
compiling stm32f4xx_dcmi.c...
compiling stm32f4xx_fsmc.c...
compiling stm32f4xx_dma.c...
compiling stm32f4xx_flash.c...
compiling stm32f4xx_cryp_aes.c...
compiling stm32f4xx_hash.c...
compiling stm32f4xx_hash_sha1.c...
compiling stm32f4xx_hash_md5.c...
compiling stm32f4xx_i2c.c...
compiling stm32f4xx_iwdg.c...
compiling stm32f4xx_lptim.c...
compiling stm32f4xx_ltdc.c...
compiling stm32f4xx_qspi.c...
compiling stm32f4xx_pwr.c...
compiling stm32f4xx_rng.c...
compiling stm32f4xx_rcc.c...
compiling stm32f4xx_spdifrx.c...
compiling TIM.c...
compiling stm32f4xx_sai.c...
compiling stm32f4xx_wwdg.c...
compiling Delay.c...
compiling stm32f4xx_syscfg.c...
compiling stm32f4xx_sdio.c...
compiling stm32f4xx_spi.c...
compiling stm32f4xx_usart.c...
compiling stm32f4xx_rtc.c...
compiling UART.c...
compiling stm32f4xx_tim.c...
compiling CAN.c...
compiling Buzzer.c...
compiling LED.c...
compiling Remote.c...
compiling M3508.c...
compiling GM6020.c...
compiling Warming.c...
compiling CToC.c...
compiling LinkCheck.c...
compiling CloseLoopControl.c...
compiling PID.c...
compiling RefereeSystem.c...
compiling Mecanum.c...
compiling RefereeSystem_CRCTable.c...
compiling UI.c...
compiling Ultra_CAP.c...
compiling UI_Base.c...
compiling UI_Library.c...
compiling stm32f4xx_it.c...
compiling main.c...
linking...
Program Size: Code=18636 RO-data=1224 RW-data=408 ZI-data=2496
".\Objects\Project.axf" - 0 Error(s), 0 Warning(s). ".\Objects\Project.axf" - 0 Error(s), 0 Warning(s).
<h2>Software Packages used:</h2> <h2>Software Packages used:</h2>
Package Vendor: Keil Package Vendor: Keil
https://www.keil.com/pack/Keil.STM32F4xx_DFP.3.1.1.pack https://www.keil.com/pack/Keil.STM32F4xx_DFP.3.0.0.pack
Keil::STM32F4xx_DFP@3.1.1 Keil::STM32F4xx_DFP@3.0.0
STMicroelectronics STM32F4 Series Device Support STMicroelectronics STM32F4 Series Device Support
<h2>Collection of Component include folders:</h2> <h2>Collection of Component include folders:</h2>
<h2>Collection of Component Files used:</h2> <h2>Collection of Component Files used:</h2>
Build Time Elapsed: 00:00:04 Build Time Elapsed: 00:00:01
</pre> </pre>
</body> </body>
</html> </html>

View File

@@ -3,7 +3,7 @@
<title>Static Call Graph - [.\Objects\Project.axf]</title></head> <title>Static Call Graph - [.\Objects\Project.axf]</title></head>
<body><HR> <body><HR>
<H1>Static Call Graph for image .\Objects\Project.axf</H1><HR> <H1>Static Call Graph for image .\Objects\Project.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060960: Last Updated: Sun Jan 11 14:26:24 2026 <BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060960: Last Updated: Sat Mar 21 18:49:59 2026
<BR><P> <BR><P>
<H3>Maximum Stack Usage = 232 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3> <H3>Maximum Stack Usage = 232 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3> Call chain for Maximum Stack Depth:</H3>
@@ -934,7 +934,7 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CloseLoopControl_Init <BR>[Called By]<UL><LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CloseLoopControl_Init
</UL> </UL>
<P><STRONG><a name="[b0]"></a>Mecanum_PowerMoveControl</STRONG> (Thumb, 2004 bytes, Stack size 80 bytes, mecanum.o(i.Mecanum_PowerMoveControl)) <P><STRONG><a name="[b0]"></a>Mecanum_PowerMoveControl</STRONG> (Thumb, 2000 bytes, Stack size 80 bytes, mecanum.o(i.Mecanum_PowerMoveControl))
<BR><BR>[Stack]<UL><LI>Max Depth = 224<LI>Call Chain = Mecanum_PowerMoveControl &rArr; Mecanum_ControlSpeed &rArr; __aeabi_dadd &rArr; _double_epilogue &rArr; _double_round <BR><BR>[Stack]<UL><LI>Max Depth = 224<LI>Call Chain = Mecanum_PowerMoveControl &rArr; Mecanum_ControlSpeed &rArr; __aeabi_dadd &rArr; _double_epilogue &rArr; _double_round
</UL> </UL>
<BR>[Calls]<UL><LI><a href="#[b4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Ultra_CAP_SetPower <BR>[Calls]<UL><LI><a href="#[b4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Ultra_CAP_SetPower

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x08000000 0x00100000 { ; load region size_region
ER_IROM1 0x08000000 0x00100000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00020000 { ; RW data
.ANY (+RW +ZI)
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More