Skip to main content
Vmere.1
Associate III
July 18, 2022
Solved

First defined here, stm32cubeide. Help me here bitte.

  • July 18, 2022
  • 3 replies
  • 6751 views

Stupid Error: Banged my head more than 30 times. No result.

I want to debug using segger system view. Everything is good. but some first defined here error.

C:/Users/xxxx/OneDrive/Documents/ImportantDocuments/FREERTOS/RTOS_workspace/001_ThreadManagement/Middlewares/Third_Party/SEGGER_Systemview/SEGGER/SEGGER_SYSVIEW_Config_FreeRTOS.c:98: multiple definition of `SEGGER_SYSVIEW_Conf'; Middlewares/Third_Party/SEGGER_Systemview/SEGGER/SEGGER_SYSVIEW_Config_FreeRTOS.o:C:/Users/xxxx/OneDrive/Documents/ImportantDocuments/FREERTOS/RTOS_workspace/001_ThreadManagement/Debug/../Middlewares/Third_Party/SEGGER_Systemview/SEGGER/SEGGER_SYSVIEW_Config_FreeRTOS.c:98: first defined here
 
collect2.exe: error: ld returned 1 exit status
 
make: *** [makefile:71: 001_ThreadManagement.elf] Error 1
 
"make -j8 all" terminated with exit code 2. Build might be incomplete.

    This topic has been closed for replies.
    Best answer by Vmere.1

    Deleted the folder which is causing the problem and added it again. It is working fine now. Thank you

    3 replies

    Bob S
    Super User
    July 18, 2022

    This is not a "first defined here" error, but a "multiple definition" error. Where else is that variable or function name defined? Perhaps there are multiple "config" files for multiple RTOSs and you need to exclude the other config files from your project build. Or maybe the include file that (should) declare that variable as "extern" left off the "extern" and you are running a recent version of GCC that requires the "extern" in the .h files else you get tons of "multiple definition" errors.

    Piranha
    Principal III
    July 18, 2022

    Another consequence of the Eclipse's flawed philosophy of "compile everything".

    Vmere.1
    Vmere.1AuthorBest answer
    Associate III
    July 19, 2022

    Deleted the folder which is causing the problem and added it again. It is working fine now. Thank you