cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE Error / bug

StanCosgrove
Associate II

Hi 

 I m working on NUCLEO-H723 Board,  was programming SPI and is working fine, when trying to add USART function to display text on serial terminal and encountered the following errors, unable to make sense what went wrong, anyone can help ? thx. 

 

 

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.202305231506/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

3 REPLIES 3
TDK
Guru

I would say you're posting in the wrong forum, but there's actually no description anywhere on what the "Feedback Forum" is for.

TDK_0-1694748753387.png

Historically, the feedback forum is not meant for technical questions.

 

If you feel a post has answered your question, please click "Accept as Solution".

>> multiple definition of `huart3';

So DON'T do that. Create the instance in one file, make extern references in others, and in include files, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hello @TDK , 

Well noted. The description is now in place!

Thanks, 
Lina


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.