marlin固件编译报错-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1113|回复: 0

[未解决] marlin固件编译报错

[复制链接]
发表于 2021-4-9 19:24 | 显示全部楼层 |阅读模式
在编译的时候报错,但在arduino低版本下编译没问题
Arduino:1.8.13 (Windows 10), 开发板:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

报错信息:In file included from sketch\Marlin.h:23:0,

                 from sketch\thermistortables.h:4,

                 from sketch\Configuration.h:713,

                 from C:\Users\qian yu\Desktop\Marlin2\Marlin2.ino:33:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



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

                 from sketch\Sd2Card.cpp:20:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



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

                 from sketch\SdVolume.cpp:20:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



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

                 from sketch\SdFile.cpp:20:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



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

                 from sketch\planner.cpp:54:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



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

                 from sketch\SdBaseFile.cpp:21:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



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

                 from sketch\cardreader.cpp:1:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



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

                 from sketch\ConfigurationStore.cpp:1:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



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

                 from sketch\thermistortables.h:4,

                 from sketch\Configuration.h:713,

                 from sketch\Servo.cpp:44:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



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

                 from sketch\BlinkM.cpp:5:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



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

                 from sketch\thermistortables.h:4,

                 from sketch\Configuration.h:713,

                 from sketch\digipot_mcp4451.cpp:1:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



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

                 from sketch\MarlinSerial.cpp:23:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



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

                 from sketch\Marlin_main.cpp:30:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



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

                 from sketch\motion_control.cpp:22:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



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

                 from sketch\SdFatUtil.cpp:20:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



In file included from sketch\SdBaseFile.cpp:24:0:

SdBaseFile.h:38:8: error: using typedef-name 'fpos_t' after 'struct'

struct fpos_t {

        ^~~~~~

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

                 from sketch\SdBaseFile.cpp:21:

d:\arduino\arduino ide\arduino\hardware\tools\avr\avr\include\stdio.h:950:33: note: 'fpos_t' has a previous declaration here

__extension__ typedef long long fpos_t;

                                 ^~~~~~

In file included from sketch\SdFile.h:27:0,

                 from sketch\cardreader.h:8,

                 from sketch\cardreader.cpp:2:

SdBaseFile.h:38:8: error: using typedef-name 'fpos_t' after 'struct'

struct fpos_t {

        ^~~~~~

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

                 from sketch\cardreader.cpp:1:

d:\arduino\arduino ide\arduino\hardware\tools\avr\avr\include\stdio.h:950:33: note: 'fpos_t' has a previous declaration here

__extension__ typedef long long fpos_t;

                                 ^~~~~~

In file included from sketch\SdFile.h:27:0,

                 from sketch\SdFile.cpp:23:

SdBaseFile.h:38:8: error: using typedef-name 'fpos_t' after 'struct'

struct fpos_t {

        ^~~~~~

sketch\Marlin_main.cpp:2070:36: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

         LCD_MESSAGEPGM(MACHINE_NAME" "MSG_OFF".");

                                    ^

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

                 from sketch\SdFile.cpp:20:

d:\arduino\arduino ide\arduino\hardware\tools\avr\avr\include\stdio.h:950:33: note: 'fpos_t' has a previous declaration here

__extension__ typedef long long fpos_t;

                                 ^~~~~~

sketch\SdBaseFile.cpp: In member function 'void SdBaseFile::getpos(fpos_t*)':

SdBaseFile.cpp:298:8: error: request for member 'position' in '* pos', which is of non-class type 'fpos_t {aka long long int}'

   pos->position = curPosition_;

        ^~~~~~~~

SdBaseFile.cpp:299:8: error: request for member 'cluster' in '* pos', which is of non-class type 'fpos_t {aka long long int}'

   pos->cluster = curCluster_;

        ^~~~~~~

sketch\SdBaseFile.cpp: In member function 'void SdBaseFile::setpos(fpos_t*)':

SdBaseFile.cpp:1496:23: error: request for member 'position' in '* pos', which is of non-class type 'fpos_t {aka long long int}'

   curPosition_ = pos->position;

                       ^~~~~~~~

SdBaseFile.cpp:1497:22: error: request for member 'cluster' in '* pos', which is of non-class type 'fpos_t {aka long long int}'

   curCluster_ = pos->cluster;

                      ^~~~~~~

In file included from sketch\SdFile.h:27:0,

                 from sketch\cardreader.h:8,

                 from sketch\Marlin_main.cpp:44:

SdBaseFile.h:38:8: error: using typedef-name 'fpos_t' after 'struct'

struct fpos_t {

        ^~~~~~

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

                 from sketch\Marlin_main.cpp:30:

d:\arduino\arduino ide\arduino\hardware\tools\avr\avr\include\stdio.h:950:33: note: 'fpos_t' has a previous declaration here

__extension__ typedef long long fpos_t;

                                 ^~~~~~

sketch\planner.cpp: In function 'reset_acceleration_rates()':

sketch\planner.cpp:999:78: warning: iteration 4 invokes undefined behavior [-Waggressive-loop-optimizations]

         axis_steps_per_sqr_second[i] = max_acceleration_units_per_sq_second[i] * axis_steps_per_unit[i];

                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

sketch\planner.cpp:997:20: note: within this loop

  for(int8_t i=0; i < NUM_AXIS; i++)

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

                 from sketch\thermistortables.h:4,

                 from sketch\Configuration.h:713,

                 from sketch\qr_solve.h:1,

                 from sketch\qr_solve.cpp:1:

sketch\pins.h:2757:0: warning: "X_MAX_PIN" redefined

#define X_MAX_PIN          -1



sketch\pins.h:1481:0: note: this is the location of the previous definition

#define X_MAX_PIN          36



sketch\pins.h:2758:0: warning: "Y_MAX_PIN" redefined

#define Y_MAX_PIN          -1



sketch\pins.h:1487:0: note: this is the location of the previous definition

#define Y_MAX_PIN          34



sketch\pins.h:2759:0: warning: "Z_MAX_PIN" redefined

#define Z_MAX_PIN          -1



sketch\pins.h:1493:0: note: this is the location of the previous definition

#define Z_MAX_PIN          32



exit status 1

using typedef-name 'fpos_t' after 'struct'
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-29 08:50 , Processed in 0.068886 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表