teemuatlut / Marlin

This fork of 3Dprinter firmware Marlin aims to add better support for Trinamic TMC drivers.
http://www.marlinfw.org/
GNU General Public License v3.0
26 stars 8 forks source link

compile problems #13

Closed NSchnitzler closed 6 years ago

NSchnitzler commented 6 years ago

Hi teemuatlut,

i had to switch to a new PC and used the chance to upgrade all libs and so on. I took your TMC stepper lib and the actual version of Arduino, but now i am getting this compile error: `Arduino: 1.8.5 (Windows 8.1), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

sketch\Marlin_main.cpp: In instantiation of 'void tmc_status(TMC&, TMC_AxisEnum, TMC_debug_enum, float) [with TMC = TMC2208Stepper]':

sketch\Marlin_main.cpp:9953:73: required from here

Marlin_main.cpp:9892: error: 'class TMC2208Stepper' has no member named 'isEnabled'

     case TMC_ENABLED: serialprintPGM(st.isEnabled() ? PSTR("true") : PSTR("false")); break;

                                                     ^

Marlin_main.cpp:9914: error: no matching function for call to 'TMC2208Stepper::TPWMTHRS()'

         uint32_t tpwmthrs_val = st.TPWMTHRS();

                                             ^

sketch\Marlin_main.cpp:9914:49: note: candidates are:

In file included from sketch\stepper_indirection.h:62:0,

             from sketch\stepper.h:48,

             from sketch\Marlin_main.cpp:249:

\Mac\Home\Documents\Arduino\libraries\TMC2208Stepper\src/TMC2208Stepper.h:98:8: note: void TMC2208Stepper::TPWMTHRS(uint32_t)

void TPWMTHRS(uint32_t input);

    ^

\Mac\Home\Documents\Arduino\libraries\TMC2208Stepper\src/TMC2208Stepper.h:98:8: note: candidate expects 1 argument, 0 provided

\Mac\Home\Documents\Arduino\libraries\TMC2208Stepper\src/TMC2208Stepper.h:99:8: note: bool TMC2208Stepper::TPWMTHRS(uint32_t*)

bool TPWMTHRS(uint32_t *data);

    ^

\Mac\Home\Documents\Arduino\libraries\TMC2208Stepper\src/TMC2208Stepper.h:99:8: note: candidate expects 1 argument, 0 provided

Marlin_main.cpp:9920: error: no matching function for call to 'TMC2208Stepper::TPWMTHRS()'

         uint32_t tpwmthrs_val = st.TPWMTHRS();

                                             ^

sketch\Marlin_main.cpp:9920:49: note: candidates are:

In file included from sketch\stepper_indirection.h:62:0,

             from sketch\stepper.h:48,

             from sketch\Marlin_main.cpp:249:

\Mac\Home\Documents\Arduino\libraries\TMC2208Stepper\src/TMC2208Stepper.h:98:8: note: void TMC2208Stepper::TPWMTHRS(uint32_t)

void TPWMTHRS(uint32_t input);

    ^

\Mac\Home\Documents\Arduino\libraries\TMC2208Stepper\src/TMC2208Stepper.h:98:8: note: candidate expects 1 argument, 0 provided

\Mac\Home\Documents\Arduino\libraries\TMC2208Stepper\src/TMC2208Stepper.h:99:8: note: bool TMC2208Stepper::TPWMTHRS(uint32_t*)

bool TPWMTHRS(uint32_t *data);

    ^

\Mac\Home\Documents\Arduino\libraries\TMC2208Stepper\src/TMC2208Stepper.h:99:8: note: candidate expects 1 argument, 0 provided

In file included from sketch\Marlin.h:46:0,

             from sketch\Marlin_main.cpp:245:

serial.h:37: error: 'class TMC2208Stepper' has no member named 'blank_time'

define MYSERIAL customizedSerial

                ^

sketch\Marlin_main.cpp:9927:23: note: in expansion of macro 'MYSERIAL'

     case TMC_TBL: MYSERIAL.print(st.blank_time(), DEC); break;

                   ^

serial.h:37: error: 'class TMC2208Stepper' has no member named 'hysterisis_end'

define MYSERIAL customizedSerial

                ^

sketch\Marlin_main.cpp:9928:24: note: in expansion of macro 'MYSERIAL'

     case TMC_HEND: MYSERIAL.print(st.hysterisis_end(), DEC); break;

                    ^

serial.h:37: error: 'class TMC2208Stepper' has no member named 'hysterisis_start'

define MYSERIAL customizedSerial

                ^

sketch\Marlin_main.cpp:9929:25: note: in expansion of macro 'MYSERIAL'

     case TMC_HSTRT: MYSERIAL.print(st.hysterisis_start(), DEC); break;

                     ^

sketch\Marlin_main.cpp: In instantiation of 'void tmc_parse_drv_status(TMC&, TMC_AxisEnum, TMC_drv_status_enum) [with TMC = TMC2208Stepper]':

sketch\Marlin_main.cpp:9994:48: required from here

Marlin_main.cpp:9946: error: no matching function for call to 'TMC2208Stepper::DRV_STATUS()'

     case TMC_DRV_STATUS_HEX:drv_status_print_hex(extended_axis_codes[axis], st.DRV_STATUS()); break;

                                                                                            ^

sketch\Marlin_main.cpp:9946:96: note: candidate is:

In file included from sketch\stepper_indirection.h:62:0,

             from sketch\stepper.h:48,

             from sketch\Marlin_main.cpp:249:

\Mac\Home\Documents\Arduino\libraries\TMC2208Stepper\src/TMC2208Stepper.h:133:8: note: bool TMC2208Stepper::DRV_STATUS(uint32_t*)

bool DRV_STATUS(uint32_t *data);

    ^

\Mac\Home\Documents\Arduino\libraries\TMC2208Stepper\src/TMC2208Stepper.h:133:8: note: candidate expects 1 argument, 0 provided

exit status 1 'class TMC2208Stepper' has no member named 'isEnabled'

`

teemuatlut commented 6 years ago

Try using the TMC2208 library version straight from github. I haven't pushed an update in a while for the Arduino Library Manager.

NSchnitzler commented 6 years ago

I Could remember this information and replaced the installed ALM lib with your actual one. But it didn't help.

NSchnitzler commented 6 years ago

OK really strange behavior: with windows (which always worked) i get the error mentioned above with mac (which never compiled successfully before) works now!

so it works for me now, that's fine, even if i don't understand why/why not.

thank you for your assistance

teemuatlut commented 6 years ago

Double check that you're using the github version of the library. If it compiles on mac, then it shouldn't be a problem with the code. I'll try to push a new version for the Library Manager in the coming week that might solve your problems.