keyboardio / KeyboardioHID

A HID library for Arduino
MIT License
34 stars 17 forks source link

KeyboardioHID won't build Model100 sketch with Kaleidoscope master branch #80

Closed gedankenexperimenter closed 2 years ago

gedankenexperimenter commented 2 years ago

Several commits ago, the #include for PluggableUSB.h was removed, so Kaleidoscope won't build.

gedankenexperimenter commented 2 years ago

I tried reverting just that commit, but got another error, so it might be more complex to get everything working again than it seems. Getting it fixed is not urgent (for my part, at least).

obra commented 2 years ago

This should now be fixed by 90802ab.

On Mon, Feb 28, 2022 at 4:55 PM Michael Richters @.***> wrote:

I tried reverting just that commit, but got another error, so it might be more complex to get everything working again than it seems. Getting it fixed is not urgent (for my part, at least).

— Reply to this email directly, view it on GitHub https://github.com/keyboardio/KeyboardioHID/issues/80#issuecomment-1054863219, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALC2HAK4SOELK4ML75ARTU5QKRNANCNFSM5PSTAWPA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

gedankenexperimenter commented 2 years ago

That does fix most sketches, but with both master branches, the Model100 example sketch now fails:

$ make -C examples/Devices/Keyboardio/Model100 -f $PWD/etc/makefiles/sketch.mk compile
Building in quiet mode. For a lot more information, add 'VERBOSE=1' to the beginning of your call to /Library/Developer/CommandLineTools/usr/bin/make
In file included from /Users/merlin/src/KeyboardioHID/src/HID.h:24,
                 from /Users/merlin/src/KeyboardioHID/src/MultiReport/AbsoluteMouse.h:30,
                 from /Users/merlin/src/KeyboardioHID/src/KeyboardioHID.h:45,
                 from /Users/merlin/src/Kaleidoscope/src/kaleidoscope/driver/hid/Keyboardio.h:20,
                 from /Users/merlin/src/Kaleidoscope/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/kaleidoscope/device/keyboardio/Model100.h:42,
                 from /Users/merlin/src/Kaleidoscope/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/Kaleidoscope-Hardware-Keyboardio-Model100.h:20,
                 from /Users/merlin/src/Kaleidoscope/src/kaleidoscope/device/device.h:22,
                 from /Users/merlin/src/Kaleidoscope/src/Kaleidoscope.h:40,
                 from /Users/merlin/src/Kaleidoscope/examples/Devices/Keyboardio/Model100/Model100.ino:17:
/Users/merlin/src/KeyboardioHID/src/HID-Settings.h:29:10: fatal error: PluggableUSB.h: No such file or directory
   29 | #include <PluggableUSB.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
obra commented 2 years ago

facepalm Thanks. Will fix.

On Tue, Mar 1, 2022 at 8:54 PM Michael Richters @.***> wrote:

That does fix most sketches, but with both master branches, the Model100 example sketch now fails:

$ make -C examples/Devices/Keyboardio/Model100 -f $PWD/etc/makefiles/sketch.mk compileBuilding in quiet mode. For a lot more information, add 'VERBOSE=1' to the beginning of your call to /Library/Developer/CommandLineTools/usr/bin/makeIn file included from /Users/merlin/src/KeyboardioHID/src/HID.h:24, from /Users/merlin/src/KeyboardioHID/src/MultiReport/AbsoluteMouse.h:30, from /Users/merlin/src/KeyboardioHID/src/KeyboardioHID.h:45, from /Users/merlin/src/Kaleidoscope/src/kaleidoscope/driver/hid/Keyboardio.h:20, from /Users/merlin/src/Kaleidoscope/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/kaleidoscope/device/keyboardio/Model100.h:42, from /Users/merlin/src/Kaleidoscope/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/Kaleidoscope-Hardware-Keyboardio-Model100.h:20, from /Users/merlin/src/Kaleidoscope/src/kaleidoscope/device/device.h:22, from /Users/merlin/src/Kaleidoscope/src/Kaleidoscope.h:40, from /Users/merlin/src/Kaleidoscope/examples/Devices/Keyboardio/Model100/Model100.ino:17:/Users/merlin/src/KeyboardioHID/src/HID-Settings.h:29:10: fatal error: PluggableUSB.h: No such file or directory 29 | #include | ^~~~compilation terminated.

— Reply to this email directly, view it on GitHub https://github.com/keyboardio/KeyboardioHID/issues/80#issuecomment-1056215742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALC2AF3ZKHFD7JFBWMG3LU53X73ANCNFSM5PSTAWPA . You are receiving this because you commented.Message ID: @.***>

obra commented 2 years ago

Hopefully, f69c9a8 should make things start behaving again.

On Tue, Mar 1, 2022 at 9:11 PM Jesse Vincent @.***> wrote:

facepalm Thanks. Will fix.

On Tue, Mar 1, 2022 at 8:54 PM Michael Richters @.***> wrote:

That does fix most sketches, but with both master branches, the Model100 example sketch now fails:

$ make -C examples/Devices/Keyboardio/Model100 -f $PWD/etc/makefiles/sketch.mk compileBuilding in quiet mode. For a lot more information, add 'VERBOSE=1' to the beginning of your call to /Library/Developer/CommandLineTools/usr/bin/makeIn file included from /Users/merlin/src/KeyboardioHID/src/HID.h:24, from /Users/merlin/src/KeyboardioHID/src/MultiReport/AbsoluteMouse.h:30, from /Users/merlin/src/KeyboardioHID/src/KeyboardioHID.h:45, from /Users/merlin/src/Kaleidoscope/src/kaleidoscope/driver/hid/Keyboardio.h:20, from /Users/merlin/src/Kaleidoscope/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/kaleidoscope/device/keyboardio/Model100.h:42, from /Users/merlin/src/Kaleidoscope/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/Kaleidoscope-Hardware-Keyboardio-Model100.h:20, from /Users/merlin/src/Kaleidoscope/src/kaleidoscope/device/device.h:22, from /Users/merlin/src/Kaleidoscope/src/Kaleidoscope.h:40, from /Users/merlin/src/Kaleidoscope/examples/Devices/Keyboardio/Model100/Model100.ino:17:/Users/merlin/src/KeyboardioHID/src/HID-Settings.h:29:10: fatal error: PluggableUSB.h: No such file or directory 29 | #include | ^~~~compilation terminated.

— Reply to this email directly, view it on GitHub https://github.com/keyboardio/KeyboardioHID/issues/80#issuecomment-1056215742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALC2AF3ZKHFD7JFBWMG3LU53X73ANCNFSM5PSTAWPA . You are receiving this because you commented.Message ID: @.***>

gedankenexperimenter commented 2 years ago

Now I'm seeing a problem with EPDesc being undefined. Maybe I've got something misconfigured on my machine?

$ make -C examples/Devices/Keyboardio/Model100 -f $PWD/etc/makefiles/sketch.mk compile
Building in quiet mode. For a lot more information, add 'VERBOSE=1' to the beginning of your call to /Library/Developer/CommandLineTools/usr/bin/make
In file included from /Users/merlin/src/KeyboardioHID/src/HID.h:24,
                 from /Users/merlin/src/KeyboardioHID/src/MultiReport/AbsoluteMouse.h:30,
                 from /Users/merlin/src/KeyboardioHID/src/KeyboardioHID.h:45,
                 from /Users/merlin/src/Kaleidoscope/src/kaleidoscope/driver/hid/Keyboardio.h:20,
                 from /Users/merlin/src/Kaleidoscope/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/kaleidoscope/device/keyboardio/Model100.h:42,
                 from /Users/merlin/src/Kaleidoscope/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/Kaleidoscope-Hardware-Keyboardio-Model100.h:20,
                 from /Users/merlin/src/Kaleidoscope/src/kaleidoscope/device/device.h:22,
                 from /Users/merlin/src/Kaleidoscope/src/Kaleidoscope.h:40,
                 from /Users/merlin/src/Kaleidoscope/examples/Devices/Keyboardio/Model100/Model100.ino:17:
/Users/merlin/src/KeyboardioHID/src/HID-Settings.h: In function 'constexpr uint16_t EP_TYPE_INTERRUPT_IN(uint8_t)':
/Users/merlin/src/KeyboardioHID/src/HID-Settings.h:143:71: error: 'EPDesc' was not declared in this scope
  143 | constexpr uint16_t EP_TYPE_INTERRUPT_IN(uint8_t buffer_size) { return EPDesc(USB_TRX_IN, USB_EP_ATTR_INT, buffer_size).val; }
obra commented 2 years ago

Urgh. That’s super weird. I can’t repro yet, but will try again in the morning.

On Mar 1, 2022, at 10:34 PM, Michael Richters @.***> wrote:

 Now I'm seeing a problem with EPDesc being undefined. Maybe I've got something misconfigured on my machine?

$ make -C examples/Devices/Keyboardio/Model100 -f $PWD/etc/makefiles/sketch.mk compile Building in quiet mode. For a lot more information, add 'VERBOSE=1' to the beginning of your call to /Library/Developer/CommandLineTools/usr/bin/make In file included from /Users/merlin/src/KeyboardioHID/src/HID.h:24, from /Users/merlin/src/KeyboardioHID/src/MultiReport/AbsoluteMouse.h:30, from /Users/merlin/src/KeyboardioHID/src/KeyboardioHID.h:45, from /Users/merlin/src/Kaleidoscope/src/kaleidoscope/driver/hid/Keyboardio.h:20, from /Users/merlin/src/Kaleidoscope/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/kaleidoscope/device/keyboardio/Model100.h:42, from /Users/merlin/src/Kaleidoscope/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/Kaleidoscope-Hardware-Keyboardio-Model100.h:20, from /Users/merlin/src/Kaleidoscope/src/kaleidoscope/device/device.h:22, from /Users/merlin/src/Kaleidoscope/src/Kaleidoscope.h:40, from /Users/merlin/src/Kaleidoscope/examples/Devices/Keyboardio/Model100/Model100.ino:17: /Users/merlin/src/KeyboardioHID/src/HID-Settings.h: In function 'constexpr uint16_t EP_TYPE_INTERRUPT_IN(uint8_t)': /Users/merlin/src/KeyboardioHID/src/HID-Settings.h:143:71: error: 'EPDesc' was not declared in this scope 143 | constexpr uint16_t EP_TYPE_INTERRUPT_IN(uint8_t buffer_size) { return EPDesc(USB_TRX_IN, USB_EP_ATTR_INT, buffer_size).val; } — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

obra commented 2 years ago

Inside Kaleidoscope/.arduino/user/hardware/keyboardio/gd32, what does 'git rev-parse HEAD' give you? It should be '66a9c16eb0247859026df19d2890600b4a9e94b5'

Best, Jesse

On Tue, Mar 1, 2022 at 10:38 PM Jesse Vincent @.***> wrote:

Urgh. That’s super weird. I can’t repro yet, but will try again in the morning.

On Mar 1, 2022, at 10:34 PM, Michael Richters @.***> wrote:



Now I'm seeing a problem with EPDesc being undefined. Maybe I've got something misconfigured on my machine?

$ make -C examples/Devices/Keyboardio/Model100 -f $PWD/etc/makefiles/sketch.mk compileBuilding in quiet mode. For a lot more information, add 'VERBOSE=1' to the beginning of your call to /Library/Developer/CommandLineTools/usr/bin/makeIn file included from /Users/merlin/src/KeyboardioHID/src/HID.h:24, from /Users/merlin/src/KeyboardioHID/src/MultiReport/AbsoluteMouse.h:30, from /Users/merlin/src/KeyboardioHID/src/KeyboardioHID.h:45, from /Users/merlin/src/Kaleidoscope/src/kaleidoscope/driver/hid/Keyboardio.h:20, from /Users/merlin/src/Kaleidoscope/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/kaleidoscope/device/keyboardio/Model100.h:42, from /Users/merlin/src/Kaleidoscope/plugins/Kaleidoscope-Hardware-Keyboardio-Model100/src/Kaleidoscope-Hardware-Keyboardio-Model100.h:20, from /Users/merlin/src/Kaleidoscope/src/kaleidoscope/device/device.h:22, from /Users/merlin/src/Kaleidoscope/src/Kaleidoscope.h:40, from /Users/merlin/src/Kaleidoscope/examples/Devices/Keyboardio/Model100/Model100.ino:17:/Users/merlin/src/KeyboardioHID/src/HID-Settings.h: In function 'constexpr uint16_t EP_TYPE_INTERRUPT_IN(uint8_t)':/Users/merlin/src/KeyboardioHID/src/HID-Settings.h:143:71: error: 'EPDesc' was not declared in this scope 143 | constexpr uint16_t EP_TYPE_INTERRUPT_IN(uint8_t buffer_size) { return EPDesc(USB_TRX_IN, USB_EP_ATTR_INT, buffer_size).val; }

— Reply to this email directly, view it on GitHub https://github.com/keyboardio/KeyboardioHID/issues/80#issuecomment-1056365331, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALC2AKKJGK4HORW3UL7JDU54DW5ANCNFSM5PSTAWPA . You are receiving this because you commented.Message ID: @.***>

gedankenexperimenter commented 2 years ago

It's 40f94b34291f9e15414c092a77b18a3590b711bb. That appears to be the problem. If I clone a separate copy of the Kaleidoscope repo and run make setup I get the revision you referenced, so I should be able to wipe my .arduino directory and run make setup to fix it.

But now I'm very confused. I had checked out KeyboardioHID separately, and I could have sworn I made a symlink to that dir from somewhere in Kaleidoscope/.arduino so that it would use the version I was working on. I did that months ago, so my memory is not very reliable about that, and I can't find the symlink I thought was there, but I'm certain that Kaleidoscope has been using my copy of KeyboardioHID (checked out outside the Kaleidoscope dir), and I have no idea how it's been doing that. What should I be doing if I want to test changes to KeyboardioHID?

gedankenexperimenter commented 2 years ago

Aha! I'm an idiot. The symlink I made goes the other way, and points to .arduino/user/hardware/keyboardio/avr/libraries/KeyboardioHID, which of course isn't what's getting used for the Model100 build. The world makes sense to me again. Sorry about the confusion.

gedankenexperimenter commented 2 years ago

I changed the title, because though the PluggableUSB include is now solved, there's another compilation error with EPDesc that still breaks the build.

obra commented 2 years ago

Can you confirm what rev of the gd32 core you're using? With git head of keyboardiohid, you also need to use git head of the gd32 core.

gedankenexperimenter commented 2 years ago

Oh, that might be the problem. I'm using whatever is downloaded by make setup. The copy under .arduino/user is up to date, but the one that gets used is under .arduino/data/packages, and that one is old. Checking out a copy of ArduinoCore-GD32-Keyboardio in my $KALEIDOSCOPE_LOCAL_LIB_DIR successfully overrides it; thanks.