1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Unresolved Arduino compile errors

Discussion in 'Troubleshooting' started by joea, Feb 3, 2023.

  1. joea

    joea Active Member

    Joined:
    Nov 12, 2019
    Messages:
    351
    Likes Received:
    51
    Attempting to make some minor changes, did a verify and compile on my currently active firmware, which, obviously, once compiled error free. Likely a file became corrupt, somehow, but looking for guidance on how to proceed. I was going to change some values in pins.h, saving them as a "new sketch", but when opened the original sketch and compiled, still get these errors.

    Errors below:

    In file included from C:\folderallDocuments\Arduino\ROBO3DR1PLUSV2\Marlin.h:23:0,
    from C:\folderallDocuments\Arduino\ROBO3DR1PLUSV2\SdBaseFile.cpp:21:
    C:\folderallDocuments\Arduino\ROBO3DR1PLUSV2\pins.h:2564:0: warning: "X_MAX_PIN" redefined
    #define X_MAX_PIN -1
    In file included from C:\folderallDocuments\Arduino\ROBO3DR1PLUSV2\Marlin.h:23:0,
    from C:\folderallDocuments\Arduino\ROBO3DR1PLUSV2\SdBaseFile.cpp:21:
    C:\folderallDocuments\Arduino\ROBO3DR1PLUSV2\pins.h:445:0: note: this is the location of the previous definition
    #define X_MAX_PIN 2
    In file included from C:\folderallDocuments\Arduino\ROBO3DR1PLUSV2\Marlin.h:23:0,
    from C:\folderallDocuments\Arduino\ROBO3DR1PLUSV2\SdBaseFile.cpp:21:
    C:\folderallDocuments\Arduino\ROBO3DR1PLUSV2\pins.h:2565:0: warning: "Y_MAX_PIN" redefined
    #define Y_MAX_PIN -1
     
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    See the FAQ for the firmware rebuild problem.
    That should get you going and if not THEN we can get the details, but start there.
     
  3. joea

    joea Active Member

    Joined:
    Nov 12, 2019
    Messages:
    351
    Likes Received:
    51
    Well, did not find a FAQ as such but did find a few mentions of this sort of problem. One was a good match and said to find all instanced of "fpos_t" and replace with "FatPos_t".

    Seemed simple enough until I did not find any instances of the former text. In my case it does not appear to be in error messages either. My errors all appear to relate to a redefined pin in "pins.h".

    I've "uploaded" a test file with the complete error listing for your contemplation.
     

    Attached Files:

  4. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
  5. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    Download the ZIP file attached to that post and extract those file into the source code for the firmware and overwrite the existing ones then compile.
     
  6. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    None of those are errors, all warnings (which the post in the FAQ mentions).
    But do merge in the two files with the modifications for the stock R1 firmware to eliminate any potential errors.

    It will build then (warnings will not stop the build, errors will).
    Then upload it to the Arduino in the printer
     

Share This Page