Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing keyboard.h with hid or even Adafruit TinyUSB wont work... #5061

Open
1 task
GabiBrawl opened this issue Jan 8, 2025 · 0 comments
Open
1 task

Comments

@GabiBrawl
Copy link

GabiBrawl commented Jan 8, 2025

What kind of issue is this?

  • PlatformIO Core.
    If you’ve found a bug, please provide an information below.

You can erase any parts of this template not applicable to your Issue.


Configuration

Operating system: Ubuntu 24.10

PlatformIO Version (platformio --version): PlatformIO Core, version 6.1.16

Description of problem

So I'm trying to build a keyboard with an ESP32 S3, I've got some stuff working but sending the keystrokes to the computer.

I've tried using Keyboard.h, which requires HID.h so I add it in platformio.ini. In its turn, HID.h requires usb_hid_keys and this cycle goes on and on. I feel like I'm not supposed to keep pulling every single dependency manually, which is the same saying of many people in various forums.

After triying with Keyboard.h, I decided to try TinyUSB. If I import it without including it in the include libs part of platformio.ini, it says the library is missing and I should include it. If I include it in platformio.ini, while compiling the proicess will error out saying thatb there are multiple definitions of some stuff within the library. I've tried different versions of the libraries and I couldn't get it working in anyway... The error part of the compiling logs with TinyUSB is available here

Steps to Reproduce

  1. Clone the repository I'm working on
  2. Try compiling it while changing the libraries I mentioned above.

Actual Results

Expected Results

successful compilation

If problems with PlatformIO Build System:

The content of platformio.ini:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200
board_build.arduino.usb_mode = cdc_hid
build_flags = 
    -I${PROJECT_DIR}/src
    -I${PROJECT_DIR}/src/tasks
    -D ARDUINO_USB_CDC_ON_BOOT=1
    -D ARDUINO_TINYUSB_ENABLED=0
    -D CONFIG_TINYUSB=0
    -D USE_TINYUSB=0
    ;-DUSE_TINYUSB
    ;-DCFG_TUSB_CONFIG_FILE=\"custom_tusb_config.h\"
    ;-Iinclude/
build_unflags = -D ARDUINO_USB_MODE
lib_deps =
    arduino-libraries/ArduinoBLE@^1.3.7
    adafruit/Adafruit TinyUSB Library

[platformio]
description = PsychOS Keyboard OS Firmware

Source file to reproduce issue:
You'll require to pull the repository to get all the code.

Additional info

none i guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant