anklimov / lighthub

Flexible, Arduino Mega/Due/ESP8266/ESP32/STM32 based SmartHome controller with DMX-512 in/out, 1-Wire, Modbus, MQTT interfaces. OpenHab/HomeAssistant/ioBroker compatible.
https://lazyhome.ru
Apache License 2.0
97 stars 23 forks source link

library DmxDue USART0_Handler redefinition #4

Closed livello closed 6 years ago

livello commented 6 years ago

Example compilation problem. Please, look at https://github.com/livello/lighthub/tree/due-dmx-test

.pioenvs/due/lib3d5/libDmxDue.a(DmxDue.o): In function USART0_Handler': DmxDue.cpp:(.text.USART0_Handler+0x0): multiple definition ofUSART0_Handler' .pioenvs/due/libFrameworkArduinoVariant.a(variant.o):variant.cpp:(.text.USART0_Handler+0x0): first defined here

error.log

anklimov commented 6 years ago

Unfortunately, I didn't find other way to avoid conflict between embedded Serial handler and DMX Serial libs, but comment handler in variant.cpp

Patched variant.cpp in https://github.com/anklimov/lighthub/tree/master/DUE_to_replace_sysfile

livello commented 6 years ago

Is USART0_Handler used only for Serial.print routine? Can we leave it for Arduino regular needs?

anklimov commented 6 years ago

in Arduino DUE USART0 (used by DMX) mapped to Serial1 Serial class (normally used for regular Serial.print) is mapped to UART

livello commented 6 years ago

https://github.com/arduino/ArduinoCore-sam/pull/1/commits/d4609665a280b74b44a0c72a5452b544a0527dd9

Here is the patch solves this issue. Hope, someday it will be in upstream.