SDCARDDETECT

I apologize if there is already a forum on this but I couldn't find it. I am trying to reflash my Monoprice Select V2 but when I go to compile the firmware I get an error with my SDCARDDETECT.

Error message: Arduino: 1.8.8 (Windows 10), Board: "Sanguino, ATmega1284 or ATmega1284P (16 MHz)"

In file included from sketch\Repetier.h:574:0,

                 from sketch\BedLeveling.cpp:107:

In file included from sketch\Repetier.h:574:0,

                 from sketch\SdFat.cpp:20:

sketch\ui.h:865:0: warning: "SDCARDDETECT" redefined

 #define SDCARDDETECT          -1

 ^

sketch\ui.h:513:0: note: this is the location of the previous definition

 #define SDCARDDETECT 49

 ^

C:\Users\SAMRAD~1\AppData\Local\Temp\ccw5ZghK.ltrans7.ltrans.o: In function `setTimer(unsigned long)':

sketch/HAL.cpp:662: undefined reference to `stepperWait'

sketch/HAL.cpp:662: undefined reference to `stepperWait'

sketch/HAL.cpp:662: undefined reference to `stepperWait'

sketch/HAL.cpp:662: undefined reference to `stepperWait'

sketch/HAL.cpp:662: undefined reference to `stepperWait'

C:\Users\SAMRAD~1\AppData\Local\Temp\ccw5ZghK.ltrans7.ltrans.o:sketch/HAL.cpp:662: more undefined references to `stepperWait' follow

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Sanguino.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Comments

  • No, sdcarddetect is not the problem. Check HAL.cpp line 662 and replace it with this

    volatile long __attribute__((used)) stepperWait = 0;

    it seems this solution works better. Compiler optimized the variable away.
Sign In or Register to comment.