"Error compiling for board Sanguino"

I'm trying to flash new firmware to my Monoprice Maker select V2. When I go to compile the repetier firmware i get the error "Error compiling for board Sanguino" 

I've followed the directions in the video I'm using to show me how to flash the firmware to a T but I've gotten stuck here. 

Heres the video for reference: 
(The link to the Repetier firmware I'm trying to flash is in the video description) 

Comments

  • You need to post the error message or I can not say why it does not compile.
  • edited October 2018
    Repetier said:
    You need to post the error message or I can not say why it does not compile.

    /var/folders/_b/4ckf7mp55rd5g00z1zhyqtzh0000gn/T//ccePFXHh.ltrans7.ltrans.o: In function `setTimer(unsigned long)':
    /var/folders/_b/4ckf7mp55rd5g00z1zhyqtzh0000gn/T/arduino_build_702974/sketch/HAL.cpp:662: undefined reference to `stepperWait'
    /var/folders/_b/4ckf7mp55rd5g00z1zhyqtzh0000gn/T/arduino_build_702974/sketch/HAL.cpp:662: undefined reference to `stepperWait'
    /var/folders/_b/4ckf7mp55rd5g00z1zhyqtzh0000gn/T/arduino_build_702974/sketch/HAL.cpp:662: undefined reference to `stepperWait'
    /var/folders/_b/4ckf7mp55rd5g00z1zhyqtzh0000gn/T/arduino_build_702974/sketch/HAL.cpp:662: undefined reference to `stepperWait'
    /var/folders/_b/4ckf7mp55rd5g00z1zhyqtzh0000gn/T/arduino_build_702974/sketch/HAL.cpp:662: undefined reference to `stepperWait'
    /var/folders/_b/4ckf7mp55rd5g00z1zhyqtzh0000gn/T//ccePFXHh.ltrans7.ltrans.o:/var/folders/_b/4ckf7mp55rd5g00z1zhyqtzh0000gn/T/arduino_build_702974/sketch/HAL.cpp:662: more undefined references to `stepperWait' follow
    collect2: error: ld returned 1 exit status
    Using library SPI at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SPI 
    exit status 1
    Error compiling for board Sanguino.

    This is the portion of the text that is error related
  • Check your HAL.cpp it should define stepperWait


    long __attribute__((used)) stepperWait = 0;
    // ================== Interrupt handling ======================
    /** \brief Sets the timer 1 compare value to delay ticks.
    This function sets the OCR1A compare counter  to get the next interrupt
    at delay ticks measured from the last interrupt. delay must be << 2^24
    */
    inline void setTimer(uint32_t delay) {
    especially first line is what linker says is missing.

    Make sure to use a recent Arduino IDE.
  • edited October 2018
    Repetier said:
    Check your HAL.cpp it should define stepperWait


    long __attribute__((used)) stepperWait = 0;
    // ================== Interrupt handling ======================
    /** \brief Sets the timer 1 compare value to delay ticks.
    This function sets the OCR1A compare counter  to get the next interrupt
    at delay ticks measured from the last interrupt. delay must be << 2^24
    */
    inline void setTimer(uint32_t delay) {
    especially first line is what linker says is missing.

    Make sure to use a recent Arduino IDE.
    updated part of the code that seemed to be incomplete with that first line you said was missing and it now complies! 


    Now when I go to upload the firmware to the melzi board i get this error:

    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
    Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
  • That is the uploader failing. Has nothing to do with firmware. stk500 is the protocol, but I'm not sure this is the protocol used melzi. When my sanguino was working I had a special uploader for that board. Might have changed in between. Also make sure no one is using the serial port at same time. Some boards also require a jumper being set to upload. Please check how this is supposed to be done for your melzi board.
  • Repetier said:
    That is the uploader failing. Has nothing to do with firmware. stk500 is the protocol, but I'm not sure this is the protocol used melzi. When my sanguino was working I had a special uploader for that board. Might have changed in between. Also make sure no one is using the serial port at same time. Some boards also require a jumper being set to upload. Please check how this is supposed to be done for your melzi board.
    From what I'm seeing in reading a couple other guides is that "avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00" is generated when the bootloader is not burned correctly? I'll go through doing the bootloader again and see what I can find.
  • biggnft19 said:
    Repetier said:
    That is the uploader failing. Has nothing to do with firmware. stk500 is the protocol, but I'm not sure this is the protocol used melzi. When my sanguino was working I had a special uploader for that board. Might have changed in between. Also make sure no one is using the serial port at same time. Some boards also require a jumper being set to upload. Please check how this is supposed to be done for your melzi board.
    From what I'm seeing in reading a couple other guides is that "avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00" is generated when the bootloader is not burned correctly? I'll go through doing the bootloader again and see what I can find.
    So I followed all steps again but this time the new firmware uploaded? Verified all the new settings were on the printer but sadly I'm still experiencing the same issues I was having that I was hoping a fresh firmware install would fix.
  • And what issue was it you wanted to solve?

  • Repetier said:
    Check your HAL.cpp it should define stepperWait


    long __attribute__((used)) stepperWait = 0;
    // ================== Interrupt handling ======================
    /** \brief Sets the timer 1 compare value to delay ticks.
    This function sets the OCR1A compare counter  to get the next interrupt
    at delay ticks measured from the last interrupt. delay must be << 2^24
    */
    inline void setTimer(uint32_t delay) {
    especially first line is what linker says is missing.

    Make sure to use a recent Arduino IDE.
    When I add long __attribute__((used)) stepperWait = 0; to line 617 I get this error 

    Arduino:1.8.3 (Windows 10), Kort:"Sanguino, ATmega1284 or ATmega1284P (16 MHz)"

    HAL.cpp:679: error: redefinition of 'long int stepperWait'

     long stepperWait = 0;

          ^

    sketch\HAL.cpp:618:28: note: 'long int stepperWait' previously defined here

     long __attribute__((used)) stepperWait = 0;

                                ^

    exit status 1
    redefinition of 'long int stepperWait'



  • You do not need to add, you must replace HAL.cpp:679 definition.
  • Repetier said:
    You do not need to add, you must replace HAL.cpp:679 definition.
    Ahh ok thanks. Got it to work 
  • Repetier said:
    Check your HAL.cpp it should define stepperWait


    long __attribute__((used)) stepperWait = 0;
    // ================== Interrupt handling ======================
    /** \brief Sets the timer 1 compare value to delay ticks.
    This function sets the OCR1A compare counter  to get the next interrupt
    at delay ticks measured from the last interrupt. delay must be << 2^24
    */
    inline void setTimer(uint32_t delay) {
    especially first line is what linker says is missing.

    Make sure to use a recent Arduino IDE.
    Hi i am having same issue, but i don´t understand what to do? looks like i have to replace "HAL.cpp:679" definition but what is 679 definition? and replace with what? 
  • 679 is the line number in HAL.cpp file. Might be some lines higher or lower just search for stepperWait and you will find it.
Sign In or Register to comment.