cubeIDE在运行时显示Failed to execute MI command是什么问题呢?
LL库变成黑色,不能用,怎么回事
如何使用STM32CubeIde生成BLE Audio工程
用stm32cubeide生成的STM32G030F6P6代码只要一开中断,任何中断程序都会跑飞.
关于stm32cubeide下载问题
cubeide 1.15.0 Build Analyzer 不显示内容 有会解决的吗
stm32cubeide如何修改芯片型号和启动文件
My.st.账号注册没反应试了两台电脑
STM32CubeIde生成的工程,使用printf函数没有调用_write函数
keil无法对G474CBTx扇区擦除烧录较大程序是什么原因?
显示如下报错
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库源码,学学别人的代码结构。