New uart nodes give error during deployment

Hi Victor,

First of all : Thank you so mutch for making this program.
this makes programming look easy:))

When i use the new uart-example nodes I get an error during Deployment.
I dont know if I did somthing wrong, but here is wat I did:
I copy/pasted the uart-example nodes into the main patch of a new project, and clicked ‘upload to Arduino’ (an Arduino uno), and got this error message:

· Transpiling…
· Project was successfully transpiled. Searching for device…
· Port with connected Arduino was found. Installing toolchains…
· Toolchain is installed. Uploading…
Upload failed. ChildProcessError: Command failed: “C:\Users\Jeffrey\AppData\Local\Programs\XOD IDE\resources\arduino-builder\arduino-builder.exe” -hardware=“C:\Users\Jeffrey\AppData\Local\Programs\XOD IDE\resources\arduino-builder\hardware” -hardware=“C:\Users\Jeffrey\AppData\Roaming\xod-client-electron\packages” -libraries=“C:\Users\Jeffrey\AppData\Local\Programs\XOD IDE\resources\arduino-libraries” -tools=“C:\Users\Jeffrey\AppData\Local\Programs\XOD IDE\resources\arduino-builder\tools” -tools=“C:\Users\Jeffrey\AppData\Roaming\xod-client-electron\packages” -fqbn=“arduino:avr:uno” -build-path=“C:\Users\Jeffrey\AppData\Roaming\xod-client-electron\upload-temp\build” “C:\Users\Jeffrey\AppData\Roaming\xod-client-electron\upload-temp\xod-arduino-sketch.cpp”
C:\Users\Jeffrey\AppData\Roaming\xod-client-electron\upload-temp\xod-arduino-sketch.cpp: In function ‘void xod::xod__uart__uart::evaluate(xod::xod__uart__uart::Context)’:
C:\Users\Jeffrey\AppData\Roaming\xod-client-electron\upload-temp\xod-arduino-sketch.cpp:895:49: error: ‘SERIAL_PORT_HARDWARE_OPEN’ was not declared in this scope
state->uart = new (state->mem) HardwareUart(SERIAL_PORT_HARDWARE_OPEN, (uint32_t)getValue<input_BAUD>(ctx));
^
exit status 1
“C:\Users\Jeffrey\AppData\Local\Programs\XOD IDE\resources\arduino-builder\arduino-builder.exe” -hardware=“C:\Users\Jeffrey\AppData\Local\Programs\XOD IDE\resources\arduino-builder\hardware” -hardware=“C:\Users\Jeffrey\AppData\Roaming\xod-client-electron\packages” -libraries=“C:\Users\Jeffrey\AppData\Local\Programs\XOD IDE\resources\arduino-libraries” -tools=“C:\Users\Jeffrey\AppData\Local\Programs\XOD IDE\resources\arduino-builder\tools” -tools=“C:\Users\Jeffrey\AppData\Roaming\xod-client-electron\packages” -fqbn=“arduino:avr:uno” -build-path=“C:\Users\Jeffrey\AppData\Roaming\xod-client-electron\upload-temp\build” “C:\Users\Jeffrey\AppData\Roaming\xod-client-electron\upload-temp\xod-arduino-sketch.cpp” (exited with error code 1)

I tried replacing the uart input node with the other ones (uart-0, uart-1, uart-2, uart-3 and uart-usb) but i get the same result.

I hope this is enough info

Greetings,
Jeffrey

Have you tried uploading a simple patch (like a single led node)? It looks like the toolchain upload may be failing. You need internet access the 1st time you upload a program to Arduino to get toolchain. Instructions for manually installing are included in a previous thread: Can I manualy install the toolchain?

I uploaded a blink patch (a square wave node and a led node) and that worked ok.

Confirm, that’s a bug appearing on Uno, but not on Mega or Leonardo. See #1370. Will release a hotfix very soon.

Meanwhile, as a hack, drill inside the xod/uart/uart C++ implementation and replace SERIAL_PORT_HARDWARE_OPEN with SERIAL_PORT_HARDWARE

This worked geat. Thanx alot :smile: