mathertel / DMXSerial

An Arduino library for sending and receiving DMX packets.
BSD 3-Clause "New" or "Revised" License
320 stars 76 forks source link

multiple definition of __vector_25/26 issue when verifying for Mega 2560 #42

Closed SkyHigh-Tech closed 4 years ago

SkyHigh-Tech commented 4 years ago

Hi there, I am currently working on a project that involves using DMX to control relays. For basic testing purposes i am using your DmxSniff example file, but when I go to verify it is returns the following error:

HardwareSerial0.cpp.o (symbol from plugin): In function 'Serial':

(.text+0x0): multiple definition of __vector_25

C:\Users\Lachl\AppData\Local\Temp\arduino_build_97838\libraries\DMXSerial\DMXSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here

c:/program files/windowsapps/arduinollc.arduinoide_1.8.33.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

HardwareSerial0.cpp.o (symbol from plugin): In function Serial':

(.text+0x0): multiple definition of '__vector_26'

C:\Users\Lachl\AppData\Local\Temp\arduino_build_97838\libraries\DMXSerial\DMXSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

Using library DMXSerial at version 1.5.0 in folder: E:\Docs\Arduino\libraries\DMXSerial exit status 1 Error compiling for board Arduino Mega or Mega 2560.

P.S, I don't have a large amount of programming knowledge in Arduino, I'm a Production Technician for the professional sound and lighting industry and I'm just trying something new.

Cheers!

mathertel commented 4 years ago

see https://github.com/mathertel/DMXSerial/issues/33 for the explanation. The vector numbers differ because you use the Mega board and not the UNO. If you find a library that references to Serial internally then please post it here. If you use Serial yourself then just remove the code.

On Mega you have the option to use the port 1 for DMX and the Serial for printing to the Monitor. see https://github.com/mathertel/DMXSerial/blob/master/src/DMXSerial_avr.h for details to enable DMX_USE_PORT1 and change your wiring.