Welcome! Log In Create A New Profile

Advanced

Help configuring Marlin 2.0.8.2 on RADDS 1.5

Posted by pieri70 
Help configuring Marlin 2.0.8.2 on RADDS 1.5
June 06, 2021 07:44AM
Hello everybody
I'm trying to migrate from MK4Duo to marlin 2.0.8.2 on my printer with Radds 1.5/Due using Visual Studio Code/PlatformIO and Auto Build Marlin

I modified Configuration.h and Configuration_adv.h with my parameters and in Auto Build Marlin I find 3 environments
DUE, DUE_USB and DUE_DEBUG
I tried DUE_USB and the compiler went to success.
But what is the difference between DUE and DUE_USB?

Thanks
Pietro


COREXY 300x300x320 - Arduino due/RADDS 1.5 con MK4Duo 4.3.8
Re: Help configuring Marlin 2.0.8.2 on RADDS 1.5
June 06, 2021 09:49AM
DUE has two ports
port 1) is via a usb serial chip
port 2) is directly connected to the cpu

if you wish to use port 2 you use DUE_USB

Edited 1 time(s). Last edit at 06/06/2021 10:55AM by Dust.
Re: Help configuring Marlin 2.0.8.2 on RADDS 1.5
June 06, 2021 10:39AM
Thank you Dust
Is there any difference in performance?
Until now I connected Due via programming port, not the chip direct one without any problem.


COREXY 300x300x320 - Arduino due/RADDS 1.5 con MK4Duo 4.3.8
Re: Help configuring Marlin 2.0.8.2 on RADDS 1.5
June 06, 2021 10:58AM
Native usb port running CDC serial actually ignores baud rates and uploads as fast as it can (I think its 12mbs). but it way faster than a standard serial port limited to baudrates
Re: Help configuring Marlin 2.0.8.2 on RADDS 1.5
June 06, 2021 11:16AM
Super! I'll try with native.
Thanks


COREXY 300x300x320 - Arduino due/RADDS 1.5 con MK4Duo 4.3.8
Re: Help configuring Marlin 2.0.8.2 on RADDS 1.5
June 06, 2021 06:19PM
Hello I wasn't able to use native USB port with marlin
If I use DUE_USB then there is no way I can connect with my host (repetier or Octoprint)
With DUE (programming port) all is fine except the touch screen connected to AUX1
I Use a MKS TFT35 connected via serial to AUX1
Before I had a Nextion with MK4Duo (Marlinkimra) working fine

With MKS TFT35 I have problems
With
#define SERIAL_PORT 0
only the HOST connected via usb works

With
#define SERIAL_PORT 1
#define SERIAL_PORT_1 0
Touch display works but USB Host doesn't

with
#define SERIAL_PORT 0
#define SERIAL_PORT_1 1

USB Host works but TFT doesn't

Is there any way I can make both work?

Thanks


COREXY 300x300x320 - Arduino due/RADDS 1.5 con MK4Duo 4.3.8
Re: Help configuring Marlin 2.0.8.2 on RADDS 1.5
June 06, 2021 10:20PM
you need serial_port -1 or serial_port_2 -1
Re: Help configuring Marlin 2.0.8.2 on RADDS 1.5
June 07, 2021 02:28AM
Thanks Dust but I wasn't able to solve my problem

I made different combinations and conection don't work or I get conpile error

For example like this

#define SERIAL_PORT 0
//#define SERIAL_PORT_1 0
#define SERIAL_PORT_2 -1

I get

In file included from Marlin\src\HAL\DUE\../../inc/MarlinConfigPre.h:37:0,
from Marlin\src\HAL\DUE\../../inc/MarlinConfig.h:28,
from Marlin\src\HAL\DUE\MarlinSerialUSB.cpp:30:
Marlin\src\HAL\DUE\MarlinSerialUSB.cpp: In member function 'int MarlinSerialUSB::peek()':
Marlin\src\HAL\DUE\MarlinSerialUSB.cpp:68:79: error: invalid static_cast from type 'MarlinSerialUSB*' to type 'MSerialT1* {aka BaseSerial > >*}'
TERN_(EMERGENCY_PARSER, emergency_parser.update(static_cast(this)->emergency_state, (char)pending_char));
^
Marlin\src\HAL\DUE\../../inc/../core/macros.h:549:26: note: in definition of macro 'THIRD'
#define THIRD(a,b,c,...) c
^
Marlin\src\HAL\DUE\../../inc/../core/macros.h:195:29: note: in expansion of macro '___TERN'
#define __TERN(T,V...) ___TERN(_CAT(_NO,T),V) // Prepend '_NO' to get '_NOT_0' or '_NOT_1'
^~~~~~~
Marlin\src\HAL\DUE\../../inc/../core/macros.h:194:29: note: in expansion of macro '__TERN'
#define _TERN(E,V...) __TERN(_CAT(T_,E),V) // Prepend 'T_' to get 'T_0' or 'T_1'
^~~~~~
Marlin\src\HAL\DUE\../../inc/../core/macros.h:193:29: note: in expansion of macro '_TERN'
#define TERN_(O,A) _TERN(_ENA_1(O),,A) // OPTION ? 'A' : ''
^~~~~
Marlin\src\HAL\DUE\MarlinSerialUSB.cpp:68:3: note: in expansion of macro 'TERN_'
TERN_(EMERGENCY_PARSER, emergency_parser.update(static_cast(this)->emergency_state, (char)pending_char));
^~~~~
Marlin\src\HAL\DUE\MarlinSerialUSB.cpp: In member function 'int MarlinSerialUSB::read()':
Marlin\src\HAL\DUE\MarlinSerialUSB.cpp:90:79: error: invalid static_cast from type 'MarlinSerialUSB*' to type 'MSerialT1* {aka BaseSerial > >*}'
TERN_(EMERGENCY_PARSER, emergency_parser.update(static_cast(this)->emergency_state, (char)c));
^
#define THIRD(a,b,c,...) c
^
Marlin\src\HAL\DUE\../../inc/../core/macros.h:195:29: note: in expansion of macro '___TERN'
#define __TERN(T,V...) ___TERN(_CAT(_NO,T),V) // Prepend '_NO' to get '_NOT_0' or '_NOT_1'
^~~~~~~
Marlin\src\HAL\DUE\../../inc/../core/macros.h:194:29: note: in expansion of macro '__TERN'
#define _TERN(E,V...) __TERN(_CAT(T_,E),V) // Prepend 'T_' to get 'T_0' or 'T_1'
^~~~~~
Marlin\src\HAL\DUE\../../inc/../core/macros.h:193:29: note: in expansion of macro '_TERN'
#define TERN_(O,A) _TERN(_ENA_1(O),,A) // OPTION ? 'A' : ''
^~~~~
Marlin\src\HAL\DUE\MarlinSerialUSB.cpp:90:3: note: in expansion of macro 'TERN_'
TERN_(EMERGENCY_PARSER, emergency_parser.update(static_cast(this)->emergency_state, (char)c));
^~~~~
*** [.pio\build\DUE\src\src\HAL\DUE\MarlinSerialUSB.cpp.o] Error 1


With MK4Duo I had this setup for nextion

/***********************
* Configuration_Basic *
***********************/
#define SERIAL_PORT_1 0
#define BAUDRATE_1 115200
#define SERIAL_PORT_2 -2
#define BAUDRATE_2 250000
#define BLOCK_BUFFER_SIZE 32
#define MAX_CMD_SIZE 96
#define BUFSIZE 8
#define TX_BUFFER_SIZE 32
#define RX_BUFFER_SIZE 1024
#define SERIAL_XON_XOFF


I tried with
//#define SERIAL_PORT 0
#define SERIAL_PORT_1 0
#define SERIAL_PORT_2 -1

And I get a long error...

*** EDIT ***

please avoid mega-long code-inserts!!!

Better as attachment:

Edited 1 time(s). Last edit at 06/07/2021 03:35AM by VDX.


COREXY 300x300x320 - Arduino due/RADDS 1.5 con MK4Duo 4.3.8
Attachments:
open | download - Errors.txt (57.6 KB)
Re: Help configuring Marlin 2.0.8.2 on RADDS 1.5
June 07, 2021 04:11AM
Hello
after many attempts I found this setup to work fine

#define SERIAL_PORT 0
//#define SERIAL_PORT_1 1
#define SERIAL_PORT_2 1

With this USB (Octoprint) and MKS TFT35 hooked on AUX1 are both working


COREXY 300x300x320 - Arduino due/RADDS 1.5 con MK4Duo 4.3.8
Re: Help configuring Marlin 2.0.8.2 on RADDS 1.5
June 07, 2021 05:20AM
There is no such thing as SERIAL_PORT_1 in marlin

you must have SERIAL_PORT before you setup SERIAL_PORT_2
you must have SERIAL_PORT_2 before you setup SERIAL_PORT_3

you do get a error "error: #error "SERIAL_PORT must be defined." but it scrolls past and disappears

Edited 2 time(s). Last edit at 06/07/2021 05:27AM by Dust.
Re: Help configuring Marlin 2.0.8.2 on RADDS 1.5
June 07, 2021 05:30AM
Quote
Dust
There is no such thing as SERIAL_PORT_1 in marlin

So SERIAL_PORT_1 could be a MarlinKimbra feature?

Anyway

#define SERIAL_PORT 0

#define SERIAL_PORT_2 1

in Configuration.h solved my problem..
Thanks
Pietro


COREXY 300x300x320 - Arduino due/RADDS 1.5 con MK4Duo 4.3.8
Re: Help configuring Marlin 2.0.8.2 on RADDS 1.5
June 08, 2021 04:38PM
Reflashed and now all works again.. Don't know why..

Quote
myself
Hello I'm here again
It seemed to be solved my problem but it's not..

With
#define SERIAL_PORT 0
and
#define SERIAL_PORT_2 1

the tft works but in read only mode

If I don't have Octoprint connected to the prithe tft don't report any data
If Octoprint is connected then TFT reports data but can't modify any of them or move anything

If I cut current off from 3d printer with octoprint still connected and tft off then Octoprint disconnect and report this:

SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

RaspberryPi is connected to USB programming port, TFT to AUX1..

Again what happens?

Edited 1 time(s). Last edit at 06/08/2021 05:21PM by pieri70.


COREXY 300x300x320 - Arduino due/RADDS 1.5 con MK4Duo 4.3.8
Sorry, only registered users may post in this forum.

Click here to login