Closed mrv96 closed 3 years ago
Our main goal for this Marlin fork is to clean-up the Creality source code so it can be merged upstream. As a Marlin fork, yes, we intend to merge with Marlin main. Is that what you're suggesting?
Also this issue probably belongs under touchscreen development: https://github.com/CR6Community/CR-6-touchscreen
No, this issue is not about touchscreen firmware.
I mean that it would be preferable if your Marlin fork works compiles and works with any mainboard. Try to compile it for an atmega2560 based board (e.g. ramps 14) and you'll see why I opened this issue
From: dryphi notifications@github.com Sent: Wednesday, November 25, 2020 6:29:59 AM To: CR6Community/Marlin Marlin@noreply.github.com Cc: mrv96 marione96@live.it; Author author@noreply.github.com Subject: Re: [CR6Community/Marlin] [FR] Undependency from the mainboard (#52)
Also this probably belongs in the touchscreen fork: https://github.com/CR6Community/CR-6-touchscreen
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/CR6Community/Marlin/issues/52#issuecomment-733475319, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADD27VRYXKSN2XMYZUJ7EWDSRSI5PANCNFSM4UBUVJFA.
Why would you want to use this fork instead of mainstream Marlin?
This fork is meant for:
Once upstream Marlin supports the strain gauge, currently being whipped into shape in this PR I've submitted, the future of this project will probably be:
I wrote here because:
From: Sebastiaan Dammann notifications@github.com Sent: Wednesday, November 25, 2020 11:31:39 AM To: CR6Community/Marlin Marlin@noreply.github.com Cc: mrv96 marione96@live.it; Author author@noreply.github.com Subject: Re: [CR6Community/Marlin] [FR] Undependency from the mainboard (#52)
Why would you want to use this fork instead of mainstream Marlin?
This fork is meant for:
Once upstream Marlin supports the strain gauge, currently being whipped into shape in this PR I've submittedhttps://github.com/MarlinFirmware/Marlin/pull/19958, the future of this project will probably be:
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/CR6Community/Marlin/issues/52#issuecomment-733619849, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADD27VQBC5YSC6APPZIGCMDSRTMIXANCNFSM4UBUVJFA.
- mainstream Marlin has a very limited support to DWIN display
I actually based the implementation on that of upstream Marlin but it was too opinionated to use for how the CR-6 display was constructed so I still had to change most of it. The original code was implemented in this PR.
you made a PR to official Marlin and it is not printer specific, but it is general for each printer. Hence, IMHO if you want to merge with mainstream, it would be better to generalize and open your code to every printer.
I don't understand this?
I mean: if you can, please, generalize your code allowing it to be executed also on non-CR6 printers because it is very promising. This one https://github.com/MarlinFirmware/Marlin/tree/2.0.x/Marlin/src/lcd/extui/lib/dgus is worst than yours.
Otherwise you can close the issue.
Thank you.
Da: Sebastiaan Dammannmailto:notifications@github.com Inviato: mercoledì 25 novembre 2020 12:30 A: CR6Community/Marlinmailto:Marlin@noreply.github.com Cc: mrv96mailto:marione96@live.it; Authormailto:author@noreply.github.com Oggetto: Re: [CR6Community/Marlin] [FR] Undependency from the mainboard (#52)
I actually based the implementation on that of upstream Marlinhttps://github.com/MarlinFirmware/Marlin/tree/2.0.x/Marlin/src/lcd/extui/lib/dgus but it was too opinionated to use for how the CR-6 display was constructed so I still had to change most of it. The original code was implemented in this PRhttps://github.com/MarlinFirmware/Marlin/pull/13253.
you made a PR to official Marlin and it is not printer specific, but it is general for each printer. Hence, IMHO if you want to merge with mainstream, it would be better to generalize and open your code to every printer.
I don't understand this?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/CR6Community/Marlin/issues/52#issuecomment-733650827, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADD27VUZV3WZQ4J3NBV4HJTSRTTFPANCNFSM4UBUVJFA.
I mean: if you can, please, generalize your code allowing it to be executed also on non-CR6 printers because it is very promising. This one https://github.com/MarlinFirmware/Marlin/tree/2.0.x/Marlin/src/lcd/extui/lib/dgus is worst than yours.
I don't see how that can be worse because the code in this repo is based on that one. I'm happy to help and think along, but what you're asking is very vague and not very actionable 😉
It is worst because have too few features. For instance, it doesn’t provide on-screen ABL. Yours yes. That was only an example refered to one specified feature, but of course it can be applied to the others.
Da: Sebastiaan Dammannmailto:notifications@github.com Inviato: mercoledì 25 novembre 2020 12:56 A: CR6Community/Marlinmailto:Marlin@noreply.github.com Cc: mrv96mailto:marione96@live.it; Authormailto:author@noreply.github.com Oggetto: Re: [CR6Community/Marlin] [FR] Undependency from the mainboard (#52)
I mean: if you can, please, generalize your code allowing it to be executed also on non-CR6 printers because it is very promising. This one https://github.com/MarlinFirmware/Marlin/tree/2.0.x/Marlin/src/lcd/extui/lib/dgus is worst than yours.
I don't see how that can be worse because the code in this repo is based on that one. I'm happy to help and think along, but what you're asking is very vague and not very actionable 😉
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/CR6Community/Marlin/issues/52#issuecomment-733662425, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADD27VVIFD5OE4MG6I7AWALSRTWE7ANCNFSM4UBUVJFA.
Okay, but you should be able to compile this for any other printer just fine by changing the default_envs in platformio.ini and the correct changes in Configuration.h.
As you can seen, it is not true:
> Executing task: C:\Users\mario\.platformio\penv\Scripts\pio.exe run <
Processing mega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/megaatmega2560.html
PLATFORM: Atmel AVR (3.0.0) > Arduino Mega or Mega 2560 ATmega2560 (Mega 2560)
HARDWARE: ATMEGA2560 16MHz, 8KB RAM, 248KB Flash
DEBUG: Current (avr-stub) On-board (avr-stub, simavr)
PACKAGES:
- framework-arduino-avr 5.1.0
- toolchain-atmelavr 1.50400.190710 (5.4.0)
Converting Marlin.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 5 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Wire> 1.0
|-- <SPI> 1.0
|-- <EEPROM> 2.0
|-- <SoftwareSerial> 1.0
Building in release mode
Compiling .pio\build\mega2560\src\src\HAL\AVR\HAL.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\AVR\HAL_SPI.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\AVR\MarlinSerial.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\AVR\Servo.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\AVR\eeprom.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\AVR\fast_pwm.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\AVR\fastio.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\AVR\u8g_com_HAL_AVR_sw_spi.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\AVR\watchdog.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\shared\HAL_spi_L6470.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\shared\eeprom_api.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\shared\eeprom_if_i2c.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\shared\eeprom_if_spi.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\shared\esp_wifi.cpp.o
Compiling .pio\build\mega2560\src\src\HAL\shared\servo.cpp.o
Compiling .pio\build\mega2560\src\src\MarlinCore.cpp.o
Compiling .pio\build\mega2560\src\src\core\serial.cpp.o
Compiling .pio\build\mega2560\src\src\core\utility.cpp.o
Compiling .pio\build\mega2560\src\src\feature\babystep.cpp.o
Compiling .pio\build\mega2560\src\src\feature\bedlevel\abl\abl.cpp.o
Compiling .pio\build\mega2560\src\src\feature\bedlevel\bedlevel.cpp.o
Compiling .pio\build\mega2560\src\src\feature\caselight.cpp.o
Compiling .pio\build\mega2560\src\src\feature\e_parser.cpp.o
Compiling .pio\build\mega2560\src\src\feature\host_actions.cpp.o
Compiling .pio\build\mega2560\src\src\feature\pause.cpp.o
Compiling .pio\build\mega2560\src\src\feature\powerloss.cpp.o
Compiling .pio\build\mega2560\src\src\feature\runout.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\bedlevel\G26.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\bedlevel\G42.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\bedlevel\M420.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\bedlevel\abl\G29.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\bedlevel\abl\M421.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\calibrate\G28.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\calibrate\M48.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\config\M200-M205.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\config\M220.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\config\M221.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\config\M301.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\config\M302.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\config\M304.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\config\M43.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\config\M92.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M108_M112_M410.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M111.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M120_M121.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M17_M18_M84.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M211.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M226.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M280.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M350_M351.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M400.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M42.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M80_M81.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M85.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M993_M994.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M997.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\M999.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\control\T.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\eeprom\M500-M504.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\feature\advance\M900.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\feature\caselight\M355.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\feature\digipot\M907-M910.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\feature\pause\G27.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\feature\pause\M600.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\feature\pause\M603.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\feature\powerloss\M1000.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\feature\powerloss\M413.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\feature\runout\M412.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\gcode.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\gcode_d.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\geometry\G92.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\geometry\M206_M428.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\host\M110.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\host\M113.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\host\M114.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\host\M115.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\host\M118.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\host\M119.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\lcd\M0_M1.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\lcd\M117.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\lcd\M145.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\lcd\M300.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\lcd\M73.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\motion\G0_G1.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\motion\G2_G3.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\motion\G4.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\motion\M290.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\parser.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\probe\G30.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\probe\M401_M402.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\probe\M851.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\queue.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M1001.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M20.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M21_M22.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M23.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M24_M25.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M26.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M27.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M28_M29.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M30.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M32.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M33.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M34.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M524.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\sd\M928.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\stats\M31.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\stats\M75-M78.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\temp\M104_M109.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\temp\M105.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\temp\M106_M107.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\temp\M140_M190.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\temp\M141_M191.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\temp\M155.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\temp\M303.cpp.o
Compiling .pio\build\mega2560\src\src\gcode\units\M82_M83.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\extui\dgus_creality_lcd.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\extui\dgus_lcd.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\extui\lib\dgus\DGUSDisplay.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\extui\lib\dgus\DGUSScreenHandler.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\extui\lib\dgus\fysetc\DGUSDisplayDef.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\extui\lib\dgus\hiprecy\DGUSDisplayDef.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\extui\lib\dgus\origin\DGUSDisplayDef.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\extui\lib\dgus_creality\DGUSDisplay.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\extui\lib\dgus_creality\DGUSScreenHandler.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\extui\lib\dgus_creality\creality_touch\DGUSDisplayDef.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\extui\lib\dgus_creality\creality_touch\PageHandlers.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\extui\ui_api.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\fontutils.cpp.o
Compiling .pio\build\mega2560\src\src\lcd\ultralcd.cpp.o
Compiling .pio\build\mega2560\src\src\libs\buzzer.cpp.o
Compiling .pio\build\mega2560\src\src\libs\crc16.cpp.o
Compiling .pio\build\mega2560\src\src\libs\nozzle.cpp.o
Compiling .pio\build\mega2560\src\src\libs\numtostr.cpp.o
Compiling .pio\build\mega2560\src\src\libs\stopwatch.cpp.o
Compiling .pio\build\mega2560\src\src\libs\vector_3.cpp.o
Compiling .pio\build\mega2560\src\src\module\endstops.cpp.o
Compiling .pio\build\mega2560\src\src\module\motion.cpp.o
Compiling .pio\build\mega2560\src\src\module\planner.cpp.o
Marlin\src\lcd\extui\lib\dgus_creality\DGUSDisplay.cpp: In static member function 'static void DGUSDisplay::ReadVariable(uint16_t)':
Marlin\src\lcd\extui\lib\dgus_creality\DGUSDisplay.cpp:94:45: error: 'u_int8_t' was not declared in this scope
WriteHeader(adr, DGUS_CMD_READVAR, sizeof(u_int8_t));
^
Marlin\src\lcd\extui\lib\dgus_creality\DGUSDisplay.cpp:97:32: error: 'u_int8_t' does not name a type
dgusserial.write(static_cast<u_int8_t>(1));
^
At global scope:
cc1plus.exe: warning: unrecognized command line option '-Wno-register'
*** [.pio\build\mega2560\src\src\lcd\extui\lib\dgus_creality\DGUSDisplay.cpp.o] Error 1
In file included from Marlin\src\module\../inc/../core/boards.h:24:0,
from Marlin\src\module\../inc/MarlinConfigPre.h:37,
from Marlin\src\module\../inc/MarlinConfig.h:28,
from Marlin\src\module\motion.h:31,
from Marlin\src\module\motion.cpp:27:
Marlin\src\module\motion.cpp: In function 'void do_homing_move(AxisEnum, float, feedRate_t)':
Marlin\src\module\../inc/../HAL/./AVR/fastio.h:69:36: error: 'DIOOPTO_SWITCH_PIN_RPORT' was not declared in this scope
#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)
^
Marlin\src\module\../inc/../core/macros.h:89:24: note: in definition of macro 'TEST'
#define TEST(n,b) (!!((n)&_BV(b)))
^
Marlin\src\module\../inc/../HAL/./AVR/fastio.h:101:31: note: in expansion of macro '_READ'
#define READ(IO) _READ(IO)
^
Marlin\src\module\motion.cpp:1294:34: note: in expansion of macro 'READ'
bool is_in_probing_zone = READ(OPTO_SWITCH_PIN) == 0;
^
In file included from Marlin\src\module\../inc/../HAL/./AVR/HAL.h:22:0,
from Marlin\src\module\../inc/../HAL/HAL.h:26,
from Marlin\src\module\../inc/MarlinConfig.h:31,
from Marlin\src\module\motion.h:31,
from Marlin\src\module\motion.cpp:27:
Marlin\src\module\../inc/../HAL/./AVR/fastio.h:69:57: error: 'DIOOPTO_SWITCH_PIN_PIN' was not declared in this scope
#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)
^
Marlin\src\module\../inc/../HAL/./AVR/../shared/Marduino.h:42:25: note: in definition of macro '_BV'
#define _BV(b) (1UL << (b))
^
Marlin\src\module\../inc/../HAL/./AVR/fastio.h:69:31: note: in expansion of macro 'TEST'
#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)
^
Marlin\src\module\../inc/../HAL/./AVR/fastio.h:101:31: note: in expansion of macro '_READ'
#define READ(IO) _READ(IO)
^
Marlin\src\module\motion.cpp:1294:34: note: in expansion of macro 'READ'
bool is_in_probing_zone = READ(OPTO_SWITCH_PIN) == 0;
^
In file included from Marlin\src\module\../inc/MarlinConfig.h:55:0,
from Marlin\src\module\motion.h:31,
from Marlin\src\module\motion.cpp:27:
Marlin\src\module\motion.cpp: In function 'void homeaxis(AxisEnum)':
Marlin\src\module\../inc/../HAL/./AVR/fastio.h:69:36: error: 'DIOOPTO_SWITCH_PIN_RPORT' was not declared in this scope
#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)
^
Marlin\src\module\../inc/../core/serial.h:111:57: note: in definition of macro '_SEP_2'
#define _SEP_2(PRE,V) serial_echopair_PGM(PSTR(PRE),V)
^
Marlin\src\module\../inc/../core/serial.h:168:28: note: in expansion of macro '_SELP_3'
#define __SELP_N(N,V...) _SELP_##N(V)
^
Marlin\src\module\../inc/../core/serial.h:169:28: note: in expansion of macro '__SELP_N'
#define _SELP_N(N,V...) __SELP_N(N,V)
^
Marlin\src\module\../inc/../core/serial.h:201:33: note: in expansion of macro '_SELP_N'
#define SERIAL_ECHOLNPAIR(V...) _SELP_N(NUM_ARGS(V),V)
^
Marlin\src\module\../core/debug_out.h:76:35: note: in expansion of macro 'SERIAL_ECHOLNPAIR'
#define DEBUG_ECHOLNPAIR SERIAL_ECHOLNPAIR
^
Marlin\src\module\../inc/../HAL/./AVR/fastio.h:69:31: note: in expansion of macro 'TEST'
#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)
^
Marlin\src\module\../inc/../HAL/./AVR/fastio.h:101:31: note: in expansion of macro '_READ'
#define READ(IO) _READ(IO)
^
Marlin\src\module\motion.cpp:1585:45: note: in expansion of macro 'READ'
DEBUG_ECHOLNPAIR(">>> is_homing_z (", READ(OPTO_SWITCH_PIN), ")");
^
Marlin\src\module\../inc/../HAL/./AVR/fastio.h:69:57: error: 'DIOOPTO_SWITCH_PIN_PIN' was not declared in this scope
#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)
^
Marlin\src\module\../inc/../core/serial.h:111:57: note: in definition of macro '_SEP_2'
#define _SEP_2(PRE,V) serial_echopair_PGM(PSTR(PRE),V)
^
Marlin\src\module\../inc/../core/serial.h:168:28: note: in expansion of macro '_SELP_3'
#define __SELP_N(N,V...) _SELP_##N(V)
^
Marlin\src\module\../inc/../core/serial.h:169:28: note: in expansion of macro '__SELP_N'
#define _SELP_N(N,V...) __SELP_N(N,V)
^
Marlin\src\module\../inc/../core/serial.h:201:33: note: in expansion of macro '_SELP_N'
#define SERIAL_ECHOLNPAIR(V...) _SELP_N(NUM_ARGS(V),V)
^
Marlin\src\module\../core/debug_out.h:76:35: note: in expansion of macro 'SERIAL_ECHOLNPAIR'
#define DEBUG_ECHOLNPAIR SERIAL_ECHOLNPAIR
^
Marlin\src\module\../inc/../core/macros.h:89:27: note: in expansion of macro '_BV'
#define TEST(n,b) (!!((n)&_BV(b)))
^
Marlin\src\module\../inc/../HAL/./AVR/fastio.h:69:31: note: in expansion of macro 'TEST'
#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)
^
Marlin\src\module\../inc/../HAL/./AVR/fastio.h:101:31: note: in expansion of macro '_READ'
#define READ(IO) _READ(IO)
^
Marlin\src\module\motion.cpp:1585:45: note: in expansion of macro 'READ'
DEBUG_ECHOLNPAIR(">>> is_homing_z (", READ(OPTO_SWITCH_PIN), ")");
^
At global scope:
cc1plus.exe: warning: unrecognized command line option '-Wno-register'
*** [.pio\build\mega2560\src\src\module\motion.cpp.o] Error 1
================================================================================= [FAILED] Took 14.92 seconds =================================================================================
Environment Status Duration
------------- -------- ------------
mega2560 FAILED 00:00:14.918
============================================================================ 1 failed, 0 succeeded in 00:00:14.918 ============================================================================The terminal process "C:\Users\mario\.platformio\penv\Scripts\pio.exe 'run'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
Please check #30 for this. Don't build with Arduino - use VSCode + PlatformIO.
This is VSCode + PlatformIO:
I'm not an expert in C, but one of the first errors you get is:
error: 'u_int8_t' was not declared in this scope
Doesn't that means there is an include missing? Try adding #include <stdint.h>
in Marlin\src\lcd\extui\lib\dgus_creality\DGUSDisplay.cpp
, clean and build again.
If DGUSDisplay.cpp
doesn't compile, maybe it explains why other files can't compile.
My apologies, I don't have time to focus on this right now @mrv96. If you do get this working, please submit a pull request to the extui
branch and I will merge it.
Done in https://github.com/CR6Community/Marlin/pull/53. Now the code compile also for atmega2560 boards.
Merged. Thank you!
So, you are using the Creality stock TFT on a different printer?
I would like to try. I tried your repo on a Longer LK4 Pro about two weeks ago and it didn't compile because a problem with serial communication. You used an STM plaform specific command that miss in AVR. I fixed it but the screen was locked on boot screen. Today I hasn't been able to get that error to fix it. I suppose that you have already changed that code.
Now that the firmware compile, I'm going to pysically test it on my printer. I would like to periodically test your repo also for atmega2560 boards
Longer LK4 Pro (aka Alfawise U30 Pro) uses the same display of CR6
There is a flag in DGUSDisplayDef.h
you can use to debug serial communication. You can see the handshakes etc. There are also a few DEBUG_xyz
macro calls you can uncomment for further debugging. Also in the doc/vendor
folder of the touch screen repository you can find all kinds of documentation. Good luck!
Hi, i have a Longer LK4 Pro which has the same LCD of CR6, hence i tried to use your GUI on my printer. I had some trouble to compile your code for the original atmega2560 based board, and finally it compiled well but the screen stayed on initial boot picture.
I know that yout work is about CR6, but since your code is very promising you could think to write your code undependently to the mainboard. In this way your work could be used also on another printers. It would be a shame to close this code limiting it to a single printer