cancel
Showing results for 
Search instead for 
Did you mean: 

First defined here, stm32cubeide. Help me here bitte.

Vmere.1
Senior

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Vmere.1
Senior

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

View solution in original post

3 REPLIES 3
Bob S
Principal

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
Chief II

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

Vmere.1
Senior

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