-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when trying to compile firmware #185
Comments
CMakeLists.txt L63: Change |
Open
zavorka
pushed a commit
to zavorka/MM-control-01
that referenced
this issue
Oct 25, 2021
As the 'inline' designation is merely a hint for a compiler, an inline function might likely actually end up being compiled on its own, in which case, the linkage specifiers become significant. Therefore, one has to be prepared for such eventuality: you can either declare the function 'static' and have it be compiled in each translation unit separately, or redeclare it with 'extern' in one translation unit. Another option is to inline it forcefully with `always_inline` attribute. Either way, it has to be dealt with. Note: the `inline` keyword behaves differently in C++ than in C99/C11. Fixes prusa3d#181, prusa3d#185
zavorka
pushed a commit
to zavorka/MM-control-01
that referenced
this issue
Oct 25, 2021
As the 'inline' designation is merely a hint for a compiler, an inline function might likely actually end up being compiled on its own, in which case, the linkage specifiers become significant. Therefore, one has to be prepared for such eventuality: you can either declare the function 'static' and have it be compiled in each translation unit separately, or redeclare it with 'extern' in one translation unit. Another option is to inline it forcefully with `always_inline` attribute. Either way, it has to be dealt with. Note: the `inline` keyword behaves differently in C++ than in C99/C11. Fixes prusa3d#181, prusa3d#185
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Arduino: 1.8.13 (Windows 10), Board: "Original Prusa i3 MK3 Multi Material 2.0 upgrade"
C:\Users\rmilyard\AppData\Local\Temp\ccb7Y1Ma.ltrans0.ltrans.o: In function `tmc2130_rx':
sketch/tmc2130.c:320: undefined reference to `tmc2130_cs_low'
sketch/tmc2130.c:321: undefined reference to `spi_txrx'
sketch/tmc2130.c:322: undefined reference to `spi_txrx'
sketch/tmc2130.c:323: undefined reference to `spi_txrx'
sketch/tmc2130.c:324: undefined reference to `spi_txrx'
sketch/tmc2130.c:325: undefined reference to `spi_txrx'
sketch/tmc2130.c:326: undefined reference to `tmc2130_cs_high'
sketch/tmc2130.c:330: undefined reference to `tmc2130_cs_low'
sketch/tmc2130.c:331: undefined reference to `spi_txrx'
sketch/tmc2130.c:333: undefined reference to `spi_txrx'
sketch/tmc2130.c:334: undefined reference to `spi_txrx'
sketch/tmc2130.c:335: undefined reference to `spi_txrx'
sketch/tmc2130.c:336: undefined reference to `spi_txrx'
sketch/tmc2130.c:337: undefined reference to `tmc2130_cs_high'
C:\Users\rmilyard\AppData\Local\Temp\ccb7Y1Ma.ltrans0.ltrans.o: In function `tmc2130_tx':
sketch/tmc2130.c:306: undefined reference to `tmc2130_cs_low'
sketch/tmc2130.c:307: undefined reference to `spi_txrx'
sketch/tmc2130.c:308: undefined reference to `spi_txrx'
sketch/tmc2130.c:309: undefined reference to `spi_txrx'
sketch/tmc2130.c:310: undefined reference to `spi_txrx'
sketch/tmc2130.c:311: undefined reference to `spi_txrx'
sketch/tmc2130.c:312: undefined reference to `tmc2130_cs_high'
C:\Users\rmilyard\AppData\Local\Temp\ccb7Y1Ma.ltrans0.ltrans.o: In function `tmc2130_init_axis_current_normal':
sketch/tmc2130.c:218: undefined reference to `__res'
C:\Users\rmilyard\AppData\Local\Temp\ccb7Y1Ma.ltrans0.ltrans.o: In function `tmc2130_init_axis_current_stealth':
sketch/tmc2130.c:205: undefined reference to `__res'
C:\Users\rmilyard\AppData\Local\Temp\ccb7Y1Ma.ltrans0.ltrans.o: In function `tmc2130_init':
sketch/tmc2130.c:247: undefined reference to `selector_step_pin_init'
sketch/tmc2130.c:248: undefined reference to `pulley_step_pin_init'
sketch/tmc2130.c:249: undefined reference to `idler_step_pin_init'
sketch/tmc2130.c:250: undefined reference to `selector_step_pin_reset'
sketch/tmc2130.c:251: undefined reference to `pulley_step_pin_reset'
sketch/tmc2130.c:252: undefined reference to `idler_step_pin_reset'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Original Prusa i3 MK3 Multi Material 2.0 upgrade.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
The text was updated successfully, but these errors were encountered: