keil安装pack中提示Encountered an improper argument. 如何解决
stm32cubide搜索不到.h文件里的文本
stm32cubeide-boot loader跳转APP异常问题
我用过stm32cubemax 但是我给stm32cubeide整服了
STM2cubeide使用Freertos v2提示错误问题
cubeIDE在运行时显示Failed to execute MI command是什么问题呢?
为什么ETH配置中没有Advanced Parameters?
STM32出现error downloading following files
安装STM32CUBEIDE时提示Error launching installer,我的电脑设置的是中文简体,杀毒软件也推出了,怎么才能安装软件?
STM32CubIDE代码编辑页面相同变量可以高亮显示么?如何设置?
显示如下报错
D:/stm32cubeide/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/gpio.o:D:/stm32cubeide/L431_RTOS/Debug/../Core/Inc/main.h:42: multiple definition of `u_buf'; ./Core/Src/freertos.o:D:/stm32cubeide/L431_RTOS/Debug/../Core/Inc/main.h:42: first defined here
D:/stm32cubeide/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/main.o:D:/stm32cubeide/L431_RTOS/Debug/../Core/Inc/main.h:42: multiple definition of `u_buf'; ./Core/Src/freertos.o:D:/stm32cubeide/L431_RTOS/Debug/../Core/Inc/main.h:42: first defined here
D:/stm32cubeide/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/stm32l4xx_hal_msp.o:D:/stm32cubeide/L431_RTOS/Debug/../Core/Inc/main.h:42: multiple definition of `u_buf'; ./Core/Src/freertos.o:D:/stm32cubeide/L431_RTOS/Debug/../Core/Inc/main.h:42: first defined here
D:/stm32cubeide/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/stm32l4xx_it.o:D:/stm32cubeide/L431_RTOS/Debug/../Core/Inc/main.h:42: multiple definition of `u_buf'; ./Core/Src/freertos.o:D:/stm32cubeide/L431_RTOS/Debug/../Core/Inc/main.h:42: first defined here
D:/stm32cubeide/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/usart.o:D:/stm32cubeide/L431_RTOS/Debug/../Core/Inc/main.h:42: multiple definition of `u_buf'; ./Core/Src/freertos.o:D:/stm32cubeide/L431_RTOS/Debug/../Core/Inc/main.h:42: first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:68: L431_RTOS.elf] Error 1
重复定义了,引用一次main.h就会定义一次,在main.h中,一般用户extern或者特殊的定义方式,防止重复定义。
建议看看C语言extern关键字的用法。
建议多读读HAL库源码,学学别人的代码结构。