2022-07-18 02:31 PM
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.
Solved! Go to Solution.
2022-07-18 08:52 PM
Deleted the folder which is causing the problem and added it again. It is working fine now. Thank you
2022-07-18 02:49 PM
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.
2022-07-18 04:32 PM
Another consequence of the Eclipse's flawed philosophy of "compile everything".
2022-07-18 08:52 PM
Deleted the folder which is causing the problem and added it again. It is working fine now. Thank you