![]() ![]() The Ps2Keyboard library is using an Arduino library to define its use of whatever pin you assign to it (by the "attachInterrupt" function.) The trouble is that the Arduino library assumes that if you're using it for one interrupt, you'll surely want it for both, so it creates the compile-time constructs for both of the interrupt vectors, and that leads to the "multiple definition of _vector_1" error. That's what's happening here.įor this case, v-usb is natively defining its interaction with the interrupt associated with pin2 on the Uno. At the application level, you can generally be confident that libraries can be brought into your app without a thought that they will mess with another library. First off, as somebody who's used to working at the application level and not at the device level, you really need to change how you think of "library". I'll post my solution in case it helps anybody else down the road. ![]() The undefined references seem like they should be easier to solve, but I haven't managed it yet. There is no _vector_1 anywhere and I don't see how creative macro's could make it either. UsbKeyboard.h:146: undefined reference to usbSetInterrupt(unsigned char*, unsigned char)Ĭollect2.exe*: error: ld returned 1 exit status UsbKeyboard.h:139: undefined reference to usbInit() WInterrupts.c:309: multiple definition of _vector_1Ĭ*: In function _base_ctor Usbdrvasm.S.o*: C:\Program Files (x86)\Arduino\libraries\UsbKeyboard\usbdrvasm16.inc:34: first defined hereĬ*: In function _vector_1 (.text 0x0)*: multiple definition of _vector_1 WInterrupts.c.o (symbol from plugin)*: In function attachInterrupt That left a compile error that was pretty easy to sort, but I'm getting this link-time error now, and it's mystifying: Compiling debug version of 'Sketch1' for 'Arduino/Genuino Uno'Įrror compiling for board Arduino/Genuino Uno That replaced most of the files in the UsbKeyboard folder. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |