|
在 NUCLEO-H723 开发板做中,此前对 SPI 外设的编程开发一直都很正常,但当我添加 USART 串口功能、想在串口终端上显示文本时,却突然出现了下述报错。
arm-none-eabi-gcc "../Core/Src/gpio.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32H723xx -c -I../Core/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/gpio.d" -MT"Core/Src/gpio.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Core/Src/gpio.o"
arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32H723xx -c -I../Core/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o"
arm-none-eabi-gcc -o "SPI_PWRSTP01_USART.elf" @"objects.list" -mcpu=cortex-m7 -T"C:\Users\goh\STM32CubeIDE\workspace_1.13.1\proj_USART-v1\proj_USART\STM32H723ZGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="proj_USART.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
C:/ST/STM32CubeIDE_1.13.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202601231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/usart.o:C:/Users/goh/STM32CubeIDE/workspace_1.13.1/SPI_PWRSTP01_USART-v1/SPI_PWRSTP01/Debug/../Core/Src/usart.c:27: multiple definition of `huart3'; ./Core/Src/main.o:C:/Users/goh/STM32CubeIDE/workspace_1.13.1/SPI_PWRSTP01_USART-v1/SPI_PWRSTP01/Debug/../Core/Src/main.c:53: first defined here
collect2.exe: error: ld returned 1 exit status
|