Linking problem
-
Hello, i have a problem linking firmware (version 2.05.1+) for duet2:
Toolchain version is 2018-q4
Eclipse is 6.3.1.2022OS is win11. Firmware is modified, but it compiles on different pc which runs win10. Did anyone had same problems before?
-
-
@azs123 the functions whose names begin "xQueue" are all in FreeRTOS. Try building FreeRTOS and check for errors before you run the linker.
The "pow" and "llrint" functions are in the standard C++ library, so they should be provided by your compiler tool chain.
There was a change made to Eclipse around a year ago which meant that we had to change the linker command line to get it to pick up all the libraries. I don't think we've tried to compile RRF2 since then, so perhaps you have hit the same problem. The change we made will be in the commit history for the .cproject file in RRF3.
Edit: it was this commit https://github.com/Duet3D/RepRapFirmware/commit/14d68a3e3cb4af05602dc4d0af87778bc523709b.
-
@dc42 Thanks for help. I've changed .cproject file and these errors are gone. Instead i've got a "Undefined reference to _sbrk" which i solved by adding a -OS --specs=nosys.specs flag to linker. Now i got a "Undefined reference to 'end' ". Do you have any suggestions on how to solve it?
-
@azs123 I've managed to succesfully link firmware by adding a " -l c " flag to linker flags in Project --> Properties --> Settings --> Cross G++ Linker --> Miscellaneous. This flag links libc library against firmware. Once again thanks for help.
-
@azs123 did you try adding ${EXTRA_FLAGS} in the linker command line, as in the commit that I linked to?
-
@dc42 Yes, i added ${EXTRA_FLAGS} in linker command but it did not fix the issue.