STM32CubeIDE编译时报“_close is not implemented and will always fail”等警告的解决方法

使用STM32CubeIDE编译时,报了_close,_fstat等不能执行的警告:

解决方法很简单:拷贝一个新生成项目里的syscalls.c到本项目的源文件目录,加入工程即可。

原因:syscalls.c文件中弱定义了_close, _fstat, _read, _write等函数,出现这类编译报警多是因为未使用STM32CubeIDE生成的项目(比如建立标准库空项目或者从Keil导入的项目)。

D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-closer.o): in function `_close_r': (.text._close_r+0xc): warning: _close is not implemented and will always fail D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-lseekr.o): in function `_lseek_r': (.text._lseek_r+0x10): warning: _lseek is not implemented and will always fail D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-closer.o): note: the message above does not take linker garbage collection into account D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-lseekr.o): note: the message above does not take linker garbage collection into account D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-readr.o): note: the message above does not take linker garbage collection into account D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-readr.o): in function `_read_r': (.text._read_r+0x10): warning: _read is not implemented and will always fail D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-writer.o): in function `_write_r': (.text._write_r+0x10): warning: _write is not implemented and will always fail D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-writer.o): note: the message above does not take linker garbage collection into account Finished building target: usart2comm.elf
07-10
arm-none-eabi-gcc -o "usart2comm.elf" @"objects.list" -mcpu=cortex-m0 -T"D:\ST\STM32CubeIDE\workspace_1.18.1\F030\usart2comm\STM32F030C8TX_FLASH.ld" --specs=nosys.specs -Wl,-Map="usart2comm.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f030x6.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f030x6.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f030x6.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f030x8.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f030x8.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f030x8.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f030xc.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f030xc.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f030xc.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f031x6.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f031x6.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f031x6.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f038xx.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f038xx.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f038xx.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f042x6.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f042x6.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f042x6.s:140: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f048xx.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f048xx.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f048xx.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f051x8.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f051x8.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f051x8.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f058xx.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f058xx.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f058xx.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f070x6.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f070x6.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f070x6.s:140: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f070xb.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f070xb.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f070xb.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f071xb.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f071xb.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f071xb.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f072xb.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f072xb.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f072xb.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f078xx.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f078xx.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f078xx.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f091xc.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f091xc.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f091xc.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f098xx.o:(.isr_vector+0x0): multiple definition of `g_pfnVectors'; ./Core/Startup/startup_stm32f030x8.o:(.isr_vector+0x0): first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f098xx.o: in function `NMI_Handler': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f098xx.s:110: multiple definition of `Default_Handler'; ./Core/Startup/startup_stm32f030x8.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Startup/startup_stm32f030x8.s:110: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c:120: multiple definition of `SystemCoreClock'; ./Core/Src/system_stm32f0xx.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Src/system_stm32f0xx.c:120: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c:122: multiple definition of `AHBPrescTable'; ./Core/Src/system_stm32f0xx.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Src/system_stm32f0xx.c:122: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c:123: multiple definition of `APBPrescTable'; ./Core/Src/system_stm32f0xx.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Src/system_stm32f0xx.c:123: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.o: in function `SystemInit': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c:147: multiple definition of `SystemInit'; ./Core/Src/system_stm32f0xx.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Src/system_stm32f0xx.c:147: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.o: in function `SystemCoreClockUpdate': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/system_stm32f0xx.c:193: multiple definition of `SystemCoreClockUpdate'; ./Core/Src/system_stm32f0xx.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Src/system_stm32f0xx.c:193: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_msp_template.o: in function `HAL_MspInit': D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_msp_template.c:58: multiple definition of `HAL_MspInit'; ./Core/Src/stm32f0xx_hal_msp.o:D:/ST/STM32CubeIDE/workspace_1.18.1/F030/usart2comm/Debug/../Core/Src/stm32f0xx_hal_msp.c:65: first defined here D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-closer.o): in function `_close_r': (.text._close_r+0xc): warning: _close is not implemented and will always fail D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-lseekr.o): in function `_lseek_r': (.text._lseek_r+0x10): warning: _lseek is not implemented and will always fail D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-closer.o): note: the message above does not take linker garbage collection into account D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-lseekr.o): note: the message above does not take linker garbage collection into account D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-readr.o): note: the message above does not take linker garbage collection into account D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-readr.o): in function `_read_r': (.text._read_r+0x10): warning: _read is not implemented and will always fail D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-writer.o): in function `_write_r': (.text._write_r+0x10): warning: _write is not implemented and will always fail D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-writer.o): note: the message above does not take linker garbage collection into account collect2.exe: error: ld returned 1 exit status make: *** [makefile:66: usart2comm.elf] Error 1 "make -j12 all" terminated with exit code 2. Build might be incomplete. 17:07:35 Build Failed. 43 errors, 4 warnings. (took 37s.761ms)
07-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值