Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] (Anycubic Compiling error) #22818

Closed
francko76 opened this issue Sep 22, 2021 · 5 comments
Closed

[BUG] (Anycubic Compiling error) #22818

francko76 opened this issue Sep 22, 2021 · 5 comments

Comments

@francko76
Copy link

Did you test the latest bugfix-2.0.x code?

Yes, and the problem still exists.

Bug Description

error: expected primary-expression before 'do'

serial.h:210:35
210 #define SERIAL_ECHOLNPGM(V...) do{ EVAL(_SELP_N(TWO_ARGS(V),V)); }while(0)

I can imagine something wrong with the change from ECHOLNPAIR to ECHOLNPGM

Bug Timeline

No response

Expected behavior

No response

Actual behavior

No response

Steps to Reproduce

No response

Version of Marlin Firmware

Marlin-bugfix-2.0.x

Printer model

Anycubic i3 mega s

Electronics

No response

Add-ons

No response

Bed Leveling

No Bed Leveling

Your Slicer

Simplify3D

Host Software

OctoPrint

Additional information & file uploads

No response

@ellensp
Copy link
Contributor

ellensp commented Sep 23, 2021

Marlin has no example configs for "Anycubic i3 mega s"
only
Anycubic Chiron
Anycubic Mega Zero 2.0
Anycubic Mega Zero
Anycubic i3 Mega
Anycubic i3

@ellensp
Copy link
Contributor

ellensp commented Sep 23, 2021

If I use the example configs for the "Anycubic i3 mega" I do get the error

In file included from Marlin/src/lcd/extui/anycubic_i3mega/../../../sd/../inc/MarlinConfig.h:55:0,
                 from Marlin/src/lcd/extui/anycubic_i3mega/../../../sd/SdFatConfig.h:33,
                 from Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.h:24,
                 from Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp:26:
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp: In static member function 'static void AnycubicTFTClass::OnSetup()':
Marlin/src/lcd/extui/anycubic_i3mega/../../../sd/../inc/../core/serial.h:210:35: error: expected primary-expression before 'do'
 #define SERIAL_ECHOLNPGM(V...)    do{ EVAL(_SELP_N(TWO_ARGS(V),V)); }while(0)
                                   ^
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp:41:61: note: in expansion of macro 'SERIAL_ECHOLNPGM'
   #define SENDLINE_DBG_PGM(x,y)       (sendLine_P(PSTR(x)), SERIAL_ECHOLNPGM(y))
                                                             ^~~~~~~~~~~~~~~~
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp:84:3: note: in expansion of macro 'SENDLINE_DBG_PGM'
   SENDLINE_DBG_PGM("J17", "TFT Serial Debug: Main board reset... J17"); // J17 Main board reset
   ^~~~~~~~~~~~~~~~
Marlin/src/lcd/extui/anycubic_i3mega/../../../sd/../inc/../core/serial.h:210:35: error: expected ')' before 'do'
 #define SERIAL_ECHOLNPGM(V...)    do{ EVAL(_SELP_N(TWO_ARGS(V),V)); }while(0)
                                   ^
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp:41:61: note: in expansion of macro 'SERIAL_ECHOLNPGM'
   #define SENDLINE_DBG_PGM(x,y)       (sendLine_P(PSTR(x)), SERIAL_ECHOLNPGM(y))
                                                             ^~~~~~~~~~~~~~~~
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp:84:3: note: in expansion of macro 'SENDLINE_DBG_PGM'
   SENDLINE_DBG_PGM("J17", "TFT Serial Debug: Main board reset... J17"); // J17 Main board reset
   ^~~~~~~~~~~~~~~~
Marlin/src/lcd/extui/anycubic_i3mega/../../../sd/../inc/../core/serial.h:210:35: error: expected primary-expression before 'do'
 #define SERIAL_ECHOLNPGM(V...)    do{ EVAL(_SELP_N(TWO_ARGS(V),V)); }while(0)
                                   ^
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp:41:61: note: in expansion of macro 'SERIAL_ECHOLNPGM'
   #define SENDLINE_DBG_PGM(x,y)       (sendLine_P(PSTR(x)), SERIAL_ECHOLNPGM(y))
                                                             ^~~~~~~~~~~~~~~~
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp:99:3: note: in expansion of macro 'SENDLINE_DBG_PGM'
   SENDLINE_DBG_PGM("J12", "TFT Serial Debug: Ready... J12"); // J12 Ready
   ^~~~~~~~~~~~~~~~
Marlin/src/lcd/extui/anycubic_i3mega/../../../sd/../inc/../core/serial.h:210:35: error: expected ')' before 'do'
 #define SERIAL_ECHOLNPGM(V...)    do{ EVAL(_SELP_N(TWO_ARGS(V),V)); }while(0)
                                   ^
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp:41:61: note: in expansion of macro 'SERIAL_ECHOLNPGM'
   #define SENDLINE_DBG_PGM(x,y)       (sendLine_P(PSTR(x)), SERIAL_ECHOLNPGM(y))
                                                             ^~~~~~~~~~~~~~~~
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp:99:3: note: in expansion of macro 'SENDLINE_DBG_PGM'
   SENDLINE_DBG_PGM("J12", "TFT Serial Debug: Ready... J12"); // J12 Ready
   ^~~~~~~~~~~~~~~~
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp: In static member function 'static void AnycubicTFTClass::OnCommandScan()':
Marlin/src/lcd/extui/anycubic_i3mega/../../../sd/../inc/../core/serial.h:210:35: error: expected primary-expression before 'do'
 #define SERIAL_ECHOLNPGM(V...)    do{ EVAL(_SELP_N(TWO_ARGS(V),V)); }while(0)
                                   ^
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp:41:61: note: in expansion of macro 'SERIAL_ECHOLNPGM'
   #define SENDLINE_DBG_PGM(x,y)       (sendLine_P(PSTR(x)), SERIAL_ECHOLNPGM(y))
                                                             ^~~~~~~~~~~~~~~~
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp:127:7: note: in expansion of macro 'SENDLINE_DBG_PGM'
       SENDLINE_DBG_PGM("J14", "TFT Serial Debug: SD Print Stopped... J14");
 

@ellensp
Copy link
Contributor

ellensp commented Sep 23, 2021

Disabling #define ANYCUBIC_LCD_DEBUG avoids the issue.

@ellensp
Copy link
Contributor

ellensp commented Sep 23, 2021

Created a PR to fix this

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants