Closed djayor closed 4 years ago
Well it work anyway without the lines that I remove. But now I have another problem, when I add "DigiKeyboard.h" library in the same program that have:
OR
I get errors. If I compile this individual libraries isolated (different programs and folders) I can compile.
Error while detecting libraries included by /Users/melo/Library/Arduino15/packages/digistump/hardware/avr/1.6.7/libraries/DigisparkKeyboard/usbdrvasm.S
/var/folders/tm/k68l_3wn5p18wh624ky_rzpc0000gn/T/arduino_build_906347/libraries/DigisparkKeyboard/usbdrvasm.S.o: In function `__vector_2':
/Users/melo/Library/Arduino15/packages/digistump/hardware/avr/1.6.7/libraries/DigisparkKeyboard/usbdrvasm165.inc:41: multiple definition of `__vector_2'
/var/folders/tm/k68l_3wn5p18wh624ky_rzpc0000gn/T/arduino_build_906347/libraries/DigisparkTinyPinChange/TinyPinChange.cpp.o:/Users/melo/Library/Arduino15/packages/digistump/hardware/avr/1.6.7/libraries/DigisparkTinyPinChange/TinyPinChange.cpp:57: first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Digispark (Default - 16.5mhz).
You know what multiple definition of
__vector_2'` means?
I don't know, but if I just add these 3 libraries to the program, I get that error. I believe that one of the variables mentioned in this libraries is repeated.
In short vector2 is for Pin Change Interrupt Request 0
.
So multiple libraries try to use the same hardware resource the vector2.
This is a common problem with libraries using limited hardware resources and cannot be solved.
Oh thanks, this makes sense. I solve the problem using this library, instead of "SoftSerial.h": https://github.com/J-Rios/Digispark_SoftSerial-INT0 And instead of "DigiKeyboard.h" I used: https://github.com/adafruit/Adafruit-Trinket-USB/tree/master/TrinketHidCombo
Works fine this way.
Environment: macOS 10.15.6; Arduino IDE 1.8.12; Digistump AVR Boards v1.6.7 Board: Digispark (Default - 16.5mhz) - Programmer: micronucleus
Hi, when I'm trying to compile the example: DigisparkSoftSerial - TwoPortReceive, I receive a error:
The only way to compile is removing the lines: