#42 …\HEADWARE\EXTI\EXTI.c(165): error: #42: operand types are incompatible (“uint32_t *” and “int”)
for(i=0; i<800 && (uint32_t *)SendBuf[i]!=0xffff; i++)
while(read_buf[i++] != “P”);
修改:1、#42、#167、#148一起出现时,修饰变量的关键字不对应,出现严重的错误
2、第二条错误,引用号修改为’P’
#148 …\HEADWARE\USBProcess\USBProcess.c(11): error: #148: variable “cCONE_Reack” has already been initialized
uint8_t cCONE_Reack[] = “PTN001202CONE10----79END”;
修改:
#852 …\HEADWARE\flash\flash.c(46): error: #852: expression must be a pointer to a complete object type
*(uint32_t *)&ReadBuf[i] = (__IO uint32_t)addr_start;
修改:
#81 …\HEADWARE\EXTI\EXTI.h(17): error: #81: more than one storage class may not be specified(不能指定多个存储类)
extern static u8 irLearnStatus;
修改:extern 和static 不能同时存在,删除其中一个
#165 …\HEADWARE\USBProcess\USBProcess.c(86): error: #165: too few arguments in function call
if(‘P’==buf[0] && ‘T’==buf[1] && ‘N’==buf[2] && (strstr((const char *)buf锛?40PRES")))
修改:当#7、#20、#165、#18一起出现时,说明这行代码出现中文符号,将之修改即可
#175-D …\HEADWARE\USBProcess\USBProcess.c(245): warning: #175-D: subscript out of range
send_buf[197] = ‘E’;
修改:数组下标超出范围,修改数组大小或,将赋值的数组下标修改,删除….
#170-D …\HEADWARE\USBProcess\USBProcess.c(235): warning: #170-D: pointer points outside of underlying object
CharToHLChar(chesksum,(u8 *)(send_buf+195));
修改:指针指到数组外部,将数字改小或将数组下标加大
#951-D main.c(6): warning: #951-D: return type of function “main” must be “int”
void main(void)
修改:main函数返回必须是int类型
#767-D …\HEADWARE\USBProcess\USBProcess.c(289): warning: #767-D: conversion from pointer to smaller integer
CharToHLChar((char )acount_len,(u8 *)send_buf+193);
修改:
#1441-D …\HEADWARE\USBProcess\USBProcess.c(298): warning: #1441-D: nonstandard cast on lvalue
(u8 *)send_buf[193] = acount_len[0];
修改:非标强制转换
#259 …\HEADWARE\USBProcess\USBProcess.c(147): error: #259: constant value is not known
u8 read_buf[len];
修改:常数值未知,将定义的常量赋初值
#92 …\HEADWARE\DataAnalyze\DataAnalyze.h(4): error: #92: identifier-list parameters may only be used in a function definition
void analyze_data(total_len,read_buf);
修改:标识符列表参数只能在函数定义中使用
#65 …\HEADWARE\USBProcess\USBProcess.c(160): error: #65: expected a “;”
for(i = 0; i < total_len; i++)
修改:缺少“;”字符
#37 …\HARDWARE\src\uart.c(23): error: #37: the #endif for this directive is missing
#if EN_USART2_RX //如果使能了接收
修改:#endif缺失,前面有#if等语句
..\Output\led.axf: Error: L6200E: Symbol LED_GPIO_Config multiply defined (by bsp_led.o and main.o).
..\Output\led.axf: Error: L6200E: Symbol LED_GPIO_Config multiply defined (by exti.o and main.o).
Not enough information to list image symbols.
原因:重复定义
解决:
如果从未引用过这个头文件..
则会执行下面的代码...将需要引用的函数的声明写在下面..
总结:
在当前代码页..需要用到别的代码中的东西..用啥包含啥..直接写在当前代码页上..
不需要的不要写.. 最后在主函数中..将所有子模块的头文件包含进来..你就有所有功能了.
欢迎跟帖留言~