解决:把options for target->target标签页中的use cross-module optimization 打钩就可以了。
MPU6050几个地方:
1、堆栈设置大一点
Stack_Size EQU 0x00001000
AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size
__initial_sp
; <h> Heap Configuration
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000200
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
PRESERVE8
THUMB
2、
试验中发现:不断进行循环读fiffo就可以得到正常数据。
形如这样
while(mpu_dmp_get_data(&pitch,&roll,&yaw)!=0);//返回值:0,DMP成功解出欧拉角
printf("pitch=%f\troll=%f\tyaw=%f\r\n",pitch,roll,yaw);
可知,mpu_dmp_get_data的返回值一直是1是因为读取速度太慢FIFO溢出的问题
解决办法:使用dmp中断,中断一次读一次这样就不会出现溢出的情况了。
Build target '小车V1'
Clean started - Project: 'STM32_DEMO'
deleting intermediate output files for target '小车V1'
compiling main.c...
.\USER\eeprom.h(26): warning: #1295-D: Deprecated declaration FM25CL64_Check - give arg types
u8 FM25CL64_Check();
.\USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
.\USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
.\USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
.\USER\MYUSB.H(4): warning: #1-D: last line of file ends without a newline
void USB_TxString(char *p);
.\USER\USART.H(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
.\USER\USART.H(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
.\USER\USART.H(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
.\USER\USART.H(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
.\USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
.\USER\easycar.h(26): warning: #1-D: last line of file ends without a newline
#endif
main.c(190): warning: #1294-D: Old-style function LED_Blink
void LED_Blink(Times)
main.c(376): warning: #223-D: function "ReadEEPROMToRam" declared implicitly
ReadEEPROMToRam();
main.c(452): warning: #223-D: function "MPU_Init" declared implicitly
MPU_Init();
main.c(352): warning: #177-D: variable "tmp" was declared but never referenced
s16 tmp,i,J=1,loopcnt=0;
main.c(352): warning: #177-D: variable "J" was declared but never referenced
s16 tmp,i,J=1,loopcnt=0;
main.c(352): warning: #177-D: variable "loopcnt" was declared but never referenced
s16 tmp,i,J=1,loopcnt=0;
main.c(354): warning: #177-D: variable "a" was declared but never referenced
u8 a[5];
main.c(356): warning: #177-D: variable "t" was declared but never referenced
u16 t=0;
main.c: 19 warnings, 0 errors
compiling usb_desc.c...
compiling usb_endp.c...
compiling usb_istr.c...
compiling usb_prop.c...
compiling usb_pwr.c...
USER\usb_pwr.c(123): warning: #177-D: variable "tmpreg" was declared but never referenced
uint32_t tmpreg = 0;
USER\usb_pwr.c: 1 warning, 0 errors
compiling hw_config.c...
USER\USART.H(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.H(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.H(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.H(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\hw_config.c: 4 warnings, 0 errors
compiling stm32_it.c...
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\USART.h(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.h(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.h(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.h(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\stm32_it.c: 7 warnings, 0 errors
compiling encoder.c...
USER\encoder.c(371): warning: #1-D: last line of file ends without a newline
USER\encoder.c(7): warning: #177-D: variable "hPrevious_angle" was declared but never referenced
static s16 hPrevious_angle, hSpeed_Buffer[SPEED_BUFFER_SIZE], hRot_Speed;
USER\encoder.c(7): warning: #177-D: variable "hSpeed_Buffer" was declared but never referenced
static s16 hPrevious_angle, hSpeed_Buffer[SPEED_BUFFER_SIZE], hRot_Speed;
USER\encoder.c(7): warning: #177-D: variable "hRot_Speed" was declared but never referenced
static s16 hPrevious_angle, hSpeed_Buffer[SPEED_BUFFER_SIZE], hRot_Speed;
USER\encoder.c(8): warning: #177-D: variable "bSpeed_Buffer_Index" was declared but never referenced
static u8 bSpeed_Buffer_Index = 0;
USER\encoder.c: 5 warnings, 0 errors
compiling stm32f10x_Timebase.c...
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\stm32f10x_Timebase.c: 3 warnings, 0 errors
compiling EEPROM.C...
USER\EEPROM.H(26): warning: #1295-D: Deprecated declaration FM25CL64_Check - give arg types
u8 FM25CL64_Check();
USER\EEPROM.C(190): warning: #550-D: variable "result" was set but never used
u8 result=1;
USER\EEPROM.C: 2 warnings, 0 errors
compiling MotorCtrl.c...
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\MotorCtrl.c(55): warning: #68-D: integer conversion resulted in a change of sign
StepMotor[0].PWM_MAX=42767;//
USER\MotorCtrl.c(841): warning: #940-D: missing return statement at end of non-void function "MC_run"
}
USER\MotorCtrl.c(866): warning: #940-D: missing return statement at end of non-void function "Motor1"
}
USER\MotorCtrl.c(1070): warning: #177-D: variable "i" was declared but never referenced
u8 i;
USER\MotorCtrl.c(1158): warning: #940-D: missing return statement at end of non-void function "Motor4"
}
USER\MotorCtrl.c(1230): warning: #1-D: last line of file ends without a newline
}
USER\MotorCtrl.c: 9 warnings, 0 errors
compiling TIM1_config.c...
USER\TIM1_config.c(12): warning: #177-D: variable "TimerPeriod" was declared but never referenced
uint16_t TimerPeriod = 0;
USER\TIM1_config.c: 1 warning, 0 errors
compiling USART.C...
USER\USART.h(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.h(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.h(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.h(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\USART.C(151): warning: #177-D: variable "tmp" was declared but never referenced
u8 tmp;
USER\USART.C: 5 warnings, 0 errors
compiling communication.c...
USER\USART.H(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.H(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.H(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.H(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\MYUSB.H(4): warning: #1-D: last line of file ends without a newline
void USB_TxString(char *p);
USER\EEPROM.H(26): warning: #1295-D: Deprecated declaration FM25CL64_Check - give arg types
u8 FM25CL64_Check();
USER\communication.c(147): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(208): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(275): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(385): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(398): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(443): warning: #167-D: argument of type "char *" is incompatible with parameter of type "u8 *"
USART1_TX_DMA_DATA(ComString,strlen(ComString));
USER\communication.c(461): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(474): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(505): warning: #1-D: last line of file ends without a newline
}
USER\communication.c: 18 warnings, 0 errors
compiling MYUSB.C...
USER\MYUSB.H(4): warning: #1-D: last line of file ends without a newline
void USB_TxString(char *p);
USER\MYUSB.C(69): warning: #1-D: last line of file ends without a newline
}
USER\MYUSB.C: 2 warnings, 0 errors
assembling startup_stm32f10x_hd.s...
compiling CAN.c...
compiling can_comunication.c...
USER\can_comunication.H(15): warning: #1-D: last line of file ends without a newline
#endif
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\can_comunication.c: 4 warnings, 0 errors
compiling MAP.C...
USER\USART.H(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.H(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.H(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.H(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\EEPROM.H(26): warning: #1295-D: Deprecated declaration FM25CL64_Check - give arg types
u8 FM25CL64_Check();
USER\MAP.C(196): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\MAP.C(235): warning: #223-D: function "ID_decode" declared implicitly
ID_decode(RxMessage.ExtId);
USER\MAP.C(275): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);
USER\MAP.C(412): warning: #1-D: last line of file ends without a newline
}
USER\MAP.C: 12 warnings, 0 errors
compiling can_app.c...
USER\can_app.c(213): warning: #223-D: function "TB_Wait" declared implicitly
TB_Wait(400);
USER\can_app.c: 1 warning, 0 errors
compiling can_driver.c...
USER\can_driver.c(231): warning: #223-D: function "EEPROMRead_u16" declared implicitly
canadd=EEPROMRead_u16(0<<1);
USER\can_driver.c(274): warning: #223-D: function "CanProcess" declared implicitly
CanProcess();
USER\can_driver.c: 2 warnings, 0 errors
compiling delay.c...
USER\delay.c(55): warning: #223-D: function "Wait" declared implicitly
Wait(nms*2);
USER\delay.c(10): warning: #550-D: variable "fac_ms" was set but never used
static u16 fac_ms=0; //ms延时倍乘数
USER\delay.c: 2 warnings, 0 errors
compiling easycar.c...
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\easycar.h(26): warning: #1-D: last line of file ends without a newline
#endif
USER\easycar.c(44): warning: #177-D: variable "i" was declared but never referenced
{ u8 i;
USER\easycar.c(165): warning: #1-D: last line of file ends without a newline
}
USER\easycar.c(91): warning: #177-D: variable "t" was declared but never referenced
u8 t=0,report=1; //默认开启上报
USER\easycar.c(91): warning: #177-D: variable "report" was declared but never referenced
u8 t=0,report=1; //默认开启上报
USER\easycar.c: 8 warnings, 0 errors
compiling TIM8_config.c...
USER\TIM8_config.c(13): warning: #177-D: variable "TimerPeriod" was declared but never referenced
uint16_t TimerPeriod = 0;
USER\TIM8_config.c: 1 warning, 0 errors
compiling misc.c...
compiling stm32f10x_adc.c...
compiling stm32f10x_bkp.c...
compiling stm32f10x_can.c...
compiling stm32f10x_cec.c...
compiling stm32f10x_crc.c...
compiling stm32f10x_dac.c...
compiling stm32f10x_dbgmcu.c...
compiling stm32f10x_dma.c...
compiling stm32f10x_exti.c...
compiling stm32f10x_flash.c...
compiling stm32f10x_fsmc.c...
compiling stm32f10x_gpio.c...
compiling stm32f10x_i2c.c...
compiling stm32f10x_iwdg.c...
compiling stm32f10x_pwr.c...
compiling stm32f10x_rcc.c...
compiling stm32f10x_rtc.c...
compiling stm32f10x_sdio.c...
compiling stm32f10x_spi.c...
compiling stm32f10x_tim.c...
compiling stm32f10x_usart.c...
compiling stm32f10x_wwdg.c...
compiling system_stm32f10x.c...
compiling core_cm3.c...
compiling usb_core.c...
compiling usb_init.c...
compiling usb_int.c...
compiling usb_mem.c...
compiling usb_regs.c...
compiling usb_sil.c...
compiling mpu6050.c...
USER\MPU6050\mpu6050.c(26): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(100);
USER\MPU6050\mpu6050.c: 1 warning, 0 errors
compiling inv_mpu.c...
USER\MPU6050\eMPL\inv_mpu.c(770): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(100);
USER\MPU6050\eMPL\inv_mpu.c(1116): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(50);
USER\MPU6050\eMPL\inv_mpu.c(1141): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(50);
USER\MPU6050\eMPL\inv_mpu.c(1665): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(50);
USER\MPU6050\eMPL\inv_mpu.c(1835): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(3);
USER\MPU6050\eMPL\inv_mpu.c(1853): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(3);
USER\MPU6050\eMPL\inv_mpu.c(2044): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(200);
USER\MPU6050\eMPL\inv_mpu.c(2735): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(5);
USER\MPU6050\eMPL\inv_mpu.c: 8 warnings, 0 errors
compiling inv_mpu_dmp_motion_driver.c...
compiling myiic.c...
USER\IIC\myiic.c(66): warning: #223-D: function "delay_us" declared implicitly
delay_us(4);
USER\IIC\myiic.c(77): warning: #223-D: function "delay_us" declared implicitly
delay_us(4);
USER\IIC\myiic.c(89): warning: #223-D: function "delay_us" declared implicitly
IIC_SDA_H;delay_us(1);
USER\IIC\myiic.c(109): warning: #223-D: function "delay_us" declared implicitly
delay_us(2);
USER\IIC\myiic.c(120): warning: #223-D: function "delay_us" declared implicitly
delay_us(2);
USER\IIC\myiic.c(141): warning: #223-D: function "delay_us" declared implicitly
delay_us(2); //对TEA5767这三个延时都是必须的
USER\IIC\myiic.c(156): warning: #223-D: function "delay_us" declared implicitly
delay_us(2);
USER\IIC\myiic.c: 7 warnings, 0 errors
linking...
Program Size: Code=61958 RO-data=5694 RW-data=772 ZI-data=8396
".\obj\aaa.axf" - 0 Error(s), 122 Warning(s).
*** Performing Cross-Module-Optimization:
compiling main.c...
.\USER\eeprom.h(26): warning: #1295-D: Deprecated declaration FM25CL64_Check - give arg types
u8 FM25CL64_Check();
.\USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
.\USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
.\USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
.\USER\MYUSB.H(4): warning: #1-D: last line of file ends without a newline
void USB_TxString(char *p);
.\USER\USART.H(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
.\USER\USART.H(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
.\USER\USART.H(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
.\USER\USART.H(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
.\USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
.\USER\easycar.h(26): warning: #1-D: last line of file ends without a newline
#endif
main.c(190): warning: #1294-D: Old-style function LED_Blink
void LED_Blink(Times)
main.c(376): warning: #223-D: function "ReadEEPROMToRam" declared implicitly
ReadEEPROMToRam();
main.c(452): warning: #223-D: function "MPU_Init" declared implicitly
MPU_Init();
main.c(352): warning: #177-D: variable "tmp" was declared but never referenced
s16 tmp,i,J=1,loopcnt=0;
main.c(352): warning: #177-D: variable "J" was declared but never referenced
s16 tmp,i,J=1,loopcnt=0;
main.c(352): warning: #177-D: variable "loopcnt" was declared but never referenced
s16 tmp,i,J=1,loopcnt=0;
main.c(354): warning: #177-D: variable "a" was declared but never referenced
u8 a[5];
main.c(356): warning: #177-D: variable "t" was declared but never referenced
u16 t=0;
main.c: 19 warnings, 0 errors
compiling usb_endp.c...
compiling usb_istr.c...
compiling usb_pwr.c...
USER\usb_pwr.c(123): warning: #177-D: variable "tmpreg" was declared but never referenced
uint32_t tmpreg = 0;
USER\usb_pwr.c: 1 warning, 0 errors
compiling hw_config.c...
USER\USART.H(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.H(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.H(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.H(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\hw_config.c: 4 warnings, 0 errors
compiling encoder.c...
USER\encoder.c(371): warning: #1-D: last line of file ends without a newline
USER\encoder.c(7): warning: #177-D: variable "hPrevious_angle" was declared but never referenced
static s16 hPrevious_angle, hSpeed_Buffer[SPEED_BUFFER_SIZE], hRot_Speed;
USER\encoder.c(7): warning: #177-D: variable "hSpeed_Buffer" was declared but never referenced
static s16 hPrevious_angle, hSpeed_Buffer[SPEED_BUFFER_SIZE], hRot_Speed;
USER\encoder.c(7): warning: #177-D: variable "hRot_Speed" was declared but never referenced
static s16 hPrevious_angle, hSpeed_Buffer[SPEED_BUFFER_SIZE], hRot_Speed;
USER\encoder.c(8): warning: #177-D: variable "bSpeed_Buffer_Index" was declared but never referenced
static u8 bSpeed_Buffer_Index = 0;
USER\encoder.c: 5 warnings, 0 errors
compiling stm32f10x_Timebase.c...
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\stm32f10x_Timebase.c: 3 warnings, 0 errors
compiling EEPROM.C...
USER\EEPROM.H(26): warning: #1295-D: Deprecated declaration FM25CL64_Check - give arg types
u8 FM25CL64_Check();
USER\EEPROM.C(190): warning: #550-D: variable "result" was set but never used
u8 result=1;
USER\EEPROM.C: 2 warnings, 0 errors
compiling MotorCtrl.c...
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\MotorCtrl.c(55): warning: #68-D: integer conversion resulted in a change of sign
StepMotor[0].PWM_MAX=42767;//
USER\MotorCtrl.c(841): warning: #940-D: missing return statement at end of non-void function "MC_run"
}
USER\MotorCtrl.c(866): warning: #940-D: missing return statement at end of non-void function "Motor1"
}
USER\MotorCtrl.c(1070): warning: #177-D: variable "i" was declared but never referenced
u8 i;
USER\MotorCtrl.c(1158): warning: #940-D: missing return statement at end of non-void function "Motor4"
}
USER\MotorCtrl.c(1230): warning: #1-D: last line of file ends without a newline
}
USER\MotorCtrl.c: 9 warnings, 0 errors
compiling TIM1_config.c...
USER\TIM1_config.c(12): warning: #177-D: variable "TimerPeriod" was declared but never referenced
uint16_t TimerPeriod = 0;
USER\TIM1_config.c: 1 warning, 0 errors
compiling USART.C...
USER\USART.h(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.h(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.h(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.h(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\USART.C(151): warning: #177-D: variable "tmp" was declared but never referenced
u8 tmp;
USER\USART.C: 5 warnings, 0 errors
compiling communication.c...
USER\USART.H(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.H(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.H(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.H(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\MYUSB.H(4): warning: #1-D: last line of file ends without a newline
void USB_TxString(char *p);
USER\EEPROM.H(26): warning: #1295-D: Deprecated declaration FM25CL64_Check - give arg types
u8 FM25CL64_Check();
USER\communication.c(147): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(208): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(275): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(385): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(398): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(443): warning: #167-D: argument of type "char *" is incompatible with parameter of type "u8 *"
USART1_TX_DMA_DATA(ComString,strlen(ComString));
USER\communication.c(461): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(474): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(505): warning: #1-D: last line of file ends without a newline
}
USER\communication.c: 18 warnings, 0 errors
compiling MYUSB.C...
USER\MYUSB.H(4): warning: #1-D: last line of file ends without a newline
void USB_TxString(char *p);
USER\MYUSB.C(69): warning: #1-D: last line of file ends without a newline
}
USER\MYUSB.C: 2 warnings, 0 errors
compiling CAN.c...
compiling MAP.C...
USER\USART.H(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.H(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.H(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.H(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\EEPROM.H(26): warning: #1295-D: Deprecated declaration FM25CL64_Check - give arg types
u8 FM25CL64_Check();
USER\MAP.C(196): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\MAP.C(235): warning: #223-D: function "ID_decode" declared implicitly
ID_decode(RxMessage.ExtId);
USER\MAP.C(275): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);
USER\MAP.C(412): warning: #1-D: last line of file ends without a newline
}
USER\MAP.C: 12 warnings, 0 errors
compiling can_app.c...
USER\can_app.c(213): warning: #223-D: function "TB_Wait" declared implicitly
TB_Wait(400);
USER\can_app.c: 1 warning, 0 errors
compiling can_driver.c...
USER\can_driver.c(231): warning: #223-D: function "EEPROMRead_u16" declared implicitly
canadd=EEPROMRead_u16(0<<1);
USER\can_driver.c(274): warning: #223-D: function "CanProcess" declared implicitly
CanProcess();
USER\can_driver.c: 2 warnings, 0 errors
compiling delay.c...
USER\delay.c(55): warning: #223-D: function "Wait" declared implicitly
Wait(nms*2);
USER\delay.c(10): warning: #550-D: variable "fac_ms" was set but never used
static u16 fac_ms=0; //ms延时倍乘数
USER\delay.c: 2 warnings, 0 errors
compiling TIM8_config.c...
USER\TIM8_config.c(13): warning: #177-D: variable "TimerPeriod" was declared but never referenced
uint16_t TimerPeriod = 0;
USER\TIM8_config.c: 1 warning, 0 errors
compiling misc.c...
compiling stm32f10x_adc.c...
compiling stm32f10x_bkp.c...
compiling stm32f10x_can.c...
compiling stm32f10x_cec.c...
compiling stm32f10x_crc.c...
compiling stm32f10x_dac.c...
compiling stm32f10x_dbgmcu.c...
compiling stm32f10x_dma.c...
compiling stm32f10x_exti.c...
compiling stm32f10x_flash.c...
compiling stm32f10x_fsmc.c...
compiling stm32f10x_gpio.c...
compiling stm32f10x_i2c.c...
compiling stm32f10x_iwdg.c...
compiling stm32f10x_pwr.c...
compiling stm32f10x_rcc.c...
compiling stm32f10x_rtc.c...
compiling stm32f10x_sdio.c...
compiling stm32f10x_spi.c...
compiling stm32f10x_tim.c...
compiling stm32f10x_usart.c...
compiling stm32f10x_wwdg.c...
compiling system_stm32f10x.c...
compiling core_cm3.c...
compiling usb_core.c...
compiling usb_init.c...
compiling usb_int.c...
compiling usb_mem.c...
compiling usb_regs.c...
compiling usb_sil.c...
compiling inv_mpu.c...
USER\MPU6050\eMPL\inv_mpu.c(770): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(100);
USER\MPU6050\eMPL\inv_mpu.c(1116): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(50);
USER\MPU6050\eMPL\inv_mpu.c(1141): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(50);
USER\MPU6050\eMPL\inv_mpu.c(1665): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(50);
USER\MPU6050\eMPL\inv_mpu.c(1835): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(3);
USER\MPU6050\eMPL\inv_mpu.c(1853): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(3);
USER\MPU6050\eMPL\inv_mpu.c(2044): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(200);
USER\MPU6050\eMPL\inv_mpu.c(2735): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(5);
USER\MPU6050\eMPL\inv_mpu.c: 8 warnings, 0 errors
compiling inv_mpu_dmp_motion_driver.c...
linking...
Program Size: Code=34326 RO-data=2626 RW-data=736 ZI-data=8112
compiling main.c...
.\USER\eeprom.h(26): warning: #1295-D: Deprecated declaration FM25CL64_Check - give arg types
u8 FM25CL64_Check();
.\USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
.\USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
.\USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
.\USER\MYUSB.H(4): warning: #1-D: last line of file ends without a newline
void USB_TxString(char *p);
.\USER\USART.H(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
.\USER\USART.H(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
.\USER\USART.H(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
.\USER\USART.H(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
.\USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
.\USER\easycar.h(26): warning: #1-D: last line of file ends without a newline
#endif
main.c(190): warning: #1294-D: Old-style function LED_Blink
void LED_Blink(Times)
main.c(376): warning: #223-D: function "ReadEEPROMToRam" declared implicitly
ReadEEPROMToRam();
main.c(452): warning: #223-D: function "MPU_Init" declared implicitly
MPU_Init();
main.c(352): warning: #177-D: variable "tmp" was declared but never referenced
s16 tmp,i,J=1,loopcnt=0;
main.c(352): warning: #177-D: variable "J" was declared but never referenced
s16 tmp,i,J=1,loopcnt=0;
main.c(352): warning: #177-D: variable "loopcnt" was declared but never referenced
s16 tmp,i,J=1,loopcnt=0;
main.c(354): warning: #177-D: variable "a" was declared but never referenced
u8 a[5];
main.c(356): warning: #177-D: variable "t" was declared but never referenced
u16 t=0;
main.c: 19 warnings, 0 errors
compiling usb_endp.c...
compiling usb_istr.c...
compiling usb_pwr.c...
USER\usb_pwr.c(123): warning: #177-D: variable "tmpreg" was declared but never referenced
uint32_t tmpreg = 0;
USER\usb_pwr.c: 1 warning, 0 errors
compiling hw_config.c...
USER\USART.H(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.H(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.H(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.H(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\hw_config.c: 4 warnings, 0 errors
compiling encoder.c...
USER\encoder.c(371): warning: #1-D: last line of file ends without a newline
USER\encoder.c(7): warning: #177-D: variable "hPrevious_angle" was declared but never referenced
static s16 hPrevious_angle, hSpeed_Buffer[SPEED_BUFFER_SIZE], hRot_Speed;
USER\encoder.c(7): warning: #177-D: variable "hSpeed_Buffer" was declared but never referenced
static s16 hPrevious_angle, hSpeed_Buffer[SPEED_BUFFER_SIZE], hRot_Speed;
USER\encoder.c(7): warning: #177-D: variable "hRot_Speed" was declared but never referenced
static s16 hPrevious_angle, hSpeed_Buffer[SPEED_BUFFER_SIZE], hRot_Speed;
USER\encoder.c(8): warning: #177-D: variable "bSpeed_Buffer_Index" was declared but never referenced
static u8 bSpeed_Buffer_Index = 0;
USER\encoder.c: 5 warnings, 0 errors
compiling stm32f10x_Timebase.c...
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\stm32f10x_Timebase.c: 3 warnings, 0 errors
compiling EEPROM.C...
USER\EEPROM.H(26): warning: #1295-D: Deprecated declaration FM25CL64_Check - give arg types
u8 FM25CL64_Check();
USER\EEPROM.C(190): warning: #550-D: variable "result" was set but never used
u8 result=1;
USER\EEPROM.C: 2 warnings, 0 errors
compiling MotorCtrl.c...
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\MotorCtrl.c(55): warning: #68-D: integer conversion resulted in a change of sign
StepMotor[0].PWM_MAX=42767;//
USER\MotorCtrl.c(841): warning: #940-D: missing return statement at end of non-void function "MC_run"
}
USER\MotorCtrl.c(866): warning: #940-D: missing return statement at end of non-void function "Motor1"
}
USER\MotorCtrl.c(1070): warning: #177-D: variable "i" was declared but never referenced
u8 i;
USER\MotorCtrl.c(1158): warning: #940-D: missing return statement at end of non-void function "Motor4"
}
USER\MotorCtrl.c(1230): warning: #1-D: last line of file ends without a newline
}
USER\MotorCtrl.c: 9 warnings, 0 errors
compiling TIM1_config.c...
USER\TIM1_config.c(12): warning: #177-D: variable "TimerPeriod" was declared but never referenced
uint16_t TimerPeriod = 0;
USER\TIM1_config.c: 1 warning, 0 errors
compiling USART.C...
USER\USART.h(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.h(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.h(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.h(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\USART.C(151): warning: #177-D: variable "tmp" was declared but never referenced
u8 tmp;
USER\USART.C: 5 warnings, 0 errors
compiling communication.c...
USER\USART.H(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.H(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.H(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.H(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\MYUSB.H(4): warning: #1-D: last line of file ends without a newline
void USB_TxString(char *p);
USER\EEPROM.H(26): warning: #1295-D: Deprecated declaration FM25CL64_Check - give arg types
u8 FM25CL64_Check();
USER\communication.c(147): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(208): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(275): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(385): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(398): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(443): warning: #167-D: argument of type "char *" is incompatible with parameter of type "u8 *"
USART1_TX_DMA_DATA(ComString,strlen(ComString));
USER\communication.c(461): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(474): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\communication.c(505): warning: #1-D: last line of file ends without a newline
}
USER\communication.c: 18 warnings, 0 errors
compiling MYUSB.C...
USER\MYUSB.H(4): warning: #1-D: last line of file ends without a newline
void USB_TxString(char *p);
USER\MYUSB.C(69): warning: #1-D: last line of file ends without a newline
}
USER\MYUSB.C: 2 warnings, 0 errors
compiling CAN.c...
compiling MAP.C...
USER\USART.H(20): warning: #1295-D: Deprecated declaration USART1Init - give arg types
void USART1Init();
USER\USART.H(25): warning: #1295-D: Deprecated declaration USART1_TX_DMA_Init - give arg types
void USART1_TX_DMA_Init();
USER\USART.H(29): warning: #1295-D: Deprecated declaration USART4Init - give arg types
void USART4Init();
USER\USART.H(36): warning: #1295-D: Deprecated declaration USART5Init - give arg types
void USART5Init();
USER\MotorCtrl.h(87): warning: #1295-D: Deprecated declaration PIDInit - give arg types
void PIDInit();
USER\MotorCtrl.h(88): warning: #1295-D: Deprecated declaration CalPID1 - give arg types
void CalPID1();
USER\MotorCtrl.h(102): warning: #1-D: last line of file ends without a newline
#endif
USER\EEPROM.H(26): warning: #1295-D: Deprecated declaration FM25CL64_Check - give arg types
u8 FM25CL64_Check();
USER\MAP.C(196): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);//发送
USER\MAP.C(235): warning: #223-D: function "ID_decode" declared implicitly
ID_decode(RxMessage.ExtId);
USER\MAP.C(275): warning: #223-D: function "CAN_WriteData" declared implicitly
CAN_WriteData(&CAN1_TxMessage);
USER\MAP.C(412): warning: #1-D: last line of file ends without a newline
}
USER\MAP.C: 12 warnings, 0 errors
compiling can_app.c...
USER\can_app.c(213): warning: #223-D: function "TB_Wait" declared implicitly
TB_Wait(400);
USER\can_app.c: 1 warning, 0 errors
compiling can_driver.c...
USER\can_driver.c(231): warning: #223-D: function "EEPROMRead_u16" declared implicitly
canadd=EEPROMRead_u16(0<<1);
USER\can_driver.c(274): warning: #223-D: function "CanProcess" declared implicitly
CanProcess();
USER\can_driver.c: 2 warnings, 0 errors
compiling delay.c...
USER\delay.c(55): warning: #223-D: function "Wait" declared implicitly
Wait(nms*2);
USER\delay.c(10): warning: #550-D: variable "fac_ms" was set but never used
static u16 fac_ms=0; //ms延时倍乘数
USER\delay.c: 2 warnings, 0 errors
compiling TIM8_config.c...
USER\TIM8_config.c(13): warning: #177-D: variable "TimerPeriod" was declared but never referenced
uint16_t TimerPeriod = 0;
USER\TIM8_config.c: 1 warning, 0 errors
compiling misc.c...
compiling stm32f10x_adc.c...
compiling stm32f10x_bkp.c...
compiling stm32f10x_can.c...
compiling stm32f10x_cec.c...
compiling stm32f10x_crc.c...
compiling stm32f10x_dac.c...
compiling stm32f10x_dbgmcu.c...
compiling stm32f10x_dma.c...
compiling stm32f10x_exti.c...
compiling stm32f10x_flash.c...
compiling stm32f10x_fsmc.c...
compiling stm32f10x_gpio.c...
compiling stm32f10x_i2c.c...
compiling stm32f10x_iwdg.c...
compiling stm32f10x_pwr.c...
compiling stm32f10x_rcc.c...
compiling stm32f10x_rtc.c...
compiling stm32f10x_sdio.c...
compiling stm32f10x_spi.c...
compiling stm32f10x_tim.c...
compiling stm32f10x_usart.c...
compiling stm32f10x_wwdg.c...
compiling system_stm32f10x.c...
compiling core_cm3.c...
compiling usb_core.c...
compiling usb_init.c...
compiling usb_int.c...
compiling usb_mem.c...
compiling usb_regs.c...
compiling usb_sil.c...
compiling inv_mpu.c...
USER\MPU6050\eMPL\inv_mpu.c(770): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(100);
USER\MPU6050\eMPL\inv_mpu.c(1116): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(50);
USER\MPU6050\eMPL\inv_mpu.c(1141): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(50);
USER\MPU6050\eMPL\inv_mpu.c(1665): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(50);
USER\MPU6050\eMPL\inv_mpu.c(1835): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(3);
USER\MPU6050\eMPL\inv_mpu.c(1853): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(3);
USER\MPU6050\eMPL\inv_mpu.c(2044): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(200);
USER\MPU6050\eMPL\inv_mpu.c(2735): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(5);
USER\MPU6050\eMPL\inv_mpu.c: 8 warnings, 0 errors
compiling inv_mpu_dmp_motion_driver.c...
linking...
Program Size: Code=34326 RO-data=2626 RW-data=736 ZI-data=8112
FromELF: creating hex file...
After Build - User command #1: fromelf --bin --output .\output\aaa.bin .\obj\aaa.axf
".\obj\aaa.axf" - 0 Error(s), 95 Warning(s).
*** Completed Cross-Module-Optimization after 3 iteration(s).
Load "E:\\项目文件\\UV\\STM32\\显微镜控制\\小车测试V1\\obj\\aaa.axf"
Full Chip Erase Done.
Programming Done.
Verify OK.
Application running ...