.\Obj\STM32_EXTInterrupt.axf: Error: L6200E: Symbol NVIC_Configuration multiply defined (by sys.o and extinterrupt.o).
时间: 2023-10-22 16:31:32 浏览: 183
这个错误是因为在你的代码中,NVIC_Configuration符号被sys.o和extinterrupt.o两个目标文件同时定义了。这通常是因为你在两个文件中都定义了相同的函数或变量。
要解决这个错误,你需要检查你的代码并确保在整个项目中,每个函数和变量只被定义了一次。如果你确定这个函数只需要在extinterrupt.c中使用,你可以在sys.c中将其声明为extern,以避免重复定义。
你可以在extinterrupt.c文件中添加以下代码来解决这个错误:
```c
//在extinterrupt.c中添加以下代码
extern void NVIC_Configuration(void);
```
然后在sys.c文件中删除与NVIC_Configuration函数相关的定义,只保留函数声明:
```c
//在sys.c中删除与NVIC_Configuration函数相关的定义,只保留函数声明
extern void NVIC_Configuration(void);
```
这样做会告诉编译器,该函数的定义在另一个文件中,并且只需要在extinterrupt.c中使用。这应该解决这个错误。
相关问题
..\OBJ\05_class_one.axf: Error: L6200E: Symbol kp multiply defined (by pid.o and main.o). ..\OBJ\05_class_one.axf: Error: L6200E: Symbol ki multiply defined (by pid.o and main.o). ..\OBJ\05_class_one.axf: Error: L6200E: Symbol kd multiply defined (by pid.o and main.o). ..\OBJ\05_class_one.axf: Error: L6200E: Symbol error multiply defined (by pid.o and main.o). ..\OBJ\05_class_one.axf: Error: L6200E: Symbol last_error multiply defined (by pid.o and main.o). ..\OBJ\05_class_one.axf: Error: L6200E: Symbol add_error multiply defined (by pid.o and main.o). ..\OBJ\05_class_one.axf: Error: L6200E: Symbol dy_error multiply defined (by pid.o and main.o). ..\OBJ\05_class_one.axf: Error: L6200E: Symbol pid_out multiply defined (by pid.o and main.o). Not enough information to list image symbols. Not enough information to list load addresses in the image map.
这些错误是由于在 'pid.o' 和 'main.o' 文件中同时定义了 'kp'、'ki'、'kd'、'error'、'last_error'、'add_error'、'dy_error' 和 'pid_out' 这些符号导致的。这种重复定义会导致链接时的冲突。要解决这个问题,你需要确保这些符号只在一个文件中定义。你可以检查一下这些文件,看看是否有重复定义的地方,并将其中一处定义删除或修改。
阅读全文
相关推荐
















