Error Linking CXX executable when compiling with TinyUSB on a separate file.
Posted: Sun Apr 09, 2023 6:08 pm
Im having issues compiling this code as two separate files even tho the same code compiles when its in one file. Mind you im using C++ instead of C because of the ArduinoJSON Library.
This is the error
- /*
- * SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD
- *
- * SPDX-License-Identifier: CC0-1.0
- */
- #include "sdkconfig.h"
- #include "rotary.cpp"
- #include "setUsb.cpp"
- static const char *TAG = "BlackBox";
- #define APP_BUTTON (GPIO_NUM_0) // Use BOOT signal by default
- extern "C" { void app_main(void); }
- void app_main(void)
- {
- // Initialize button that will trigger HID reports
- const gpio_config_t boot_button_config = {
- .pin_bit_mask = BIT64(APP_BUTTON),
- .mode = GPIO_MODE_INPUT,
- .pull_up_en = GPIO_PULLUP_ENABLE,
- .pull_down_en = GPIO_PULLDOWN_DISABLE,
- .intr_type = GPIO_INTR_DISABLE,
- };
- ESP_ERROR_CHECK(gpio_config(&boot_button_config));
- initRot();
- installUSB();
- // Report counter value
- int pulse_count = 0;
- int event_count = 0;
- while (1)
- {
- if (xQueueReceive(queue, &event_count, pdMS_TO_TICKS(1000)))
- {
- ESP_LOGI(TAG, "Watch point event, count: %d", event_count);
- }
- else
- {
- ESP_ERROR_CHECK(pcnt_unit_get_count(pcnt_unit, &pulse_count));
- ESP_LOGI(TAG, "Pulse count: %d", pulse_count);
- }
- if(tud_mounted()) {
- static bool send_hid_data = true;
- if(send_hid_data) {
- app_send_hid_demo();
- }
- // send_hid_data = !gpio_get_level(APP_BUTTON);
- }
- }
- }
- #include <stdlib.h>
- #include "esp_log.h"
- #include "freertos/FreeRTOS.h"
- #include "freertos/task.h"
- #include "tinyusb.h"
- #include "class/hid/hid_device.h"
- #include <driver/gpio.h>
- #include <ArduinoJson.h>
- #include "driver/pulse_cnt.h"
- #include "esp_sleep.h"
- static const char *usbTAG = "BlackBox";
- #define TUSB_DESC_TOTAL_LEN (TUD_CONFIG_DESC_LEN + CFG_TUD_HID * TUD_HID_DESC_LEN)
- /**
- * @brief HID report descriptor
- *
- * In this example we implement Keyboard + Mouse HID device,
- * so we must define both report descriptors
- */
- const uint8_t hid_report_descriptor[] = {
- // TUD_HID_REPORT_DESC_GENERIC_INOUT(NULL), // I dont know if this is a good idea
- TUD_HID_REPORT_DESC_GENERIC_INOUT(100),
- };
- /**
- * @brief String descriptor
- */
- const char *hid_string_descriptor[5] = {
- // array of pointer to string descriptors
- (char[]){0x09, 0x04}, // 0: is supported language is English (0x0409)
- "BlackBox", // 1: Manufacturer
- "BlackBox Device", // 2: Product
- "123456", // 3: Serials, should use chip ID
- "Example HID interface", // 4: HID
- };
- /**
- * @brief Configuration descriptor
- *
- * This is a simple configuration descriptor that defines 1 configuration and 1 HID interface
- */
- static const uint8_t hid_configuration_descriptor[] = {
- // Configuration number, interface count, string index, total length, attribute, power in mA
- TUD_CONFIG_DESCRIPTOR(1, 1, 0, TUSB_DESC_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),
- // Interface number, string index, boot protocol, report descriptor len, EP In address, size & polling interval
- TUD_HID_DESCRIPTOR(0, 4, false, sizeof(hid_report_descriptor), 0x81, 16, 10),
- };
- /********* TinyUSB HID callbacks ***************/
- // Invoked when received GET HID REPORT DESCRIPTOR request
- // Application return pointer to descriptor, whose contents must exist long enough for transfer to complete
- uint8_t const *tud_hid_descriptor_report_cb(uint8_t instance)
- {
- // We use only one interface and one HID report descriptor, so we can ignore parameter 'instance'
- return hid_report_descriptor;
- }
- // Invoked when received GET_REPORT control request
- // Application must fill buffer report's content and return its length.
- // Return zero will cause the stack to STALL request
- uint16_t tud_hid_get_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t *buffer, uint16_t reqlen)
- {
- (void)instance;
- (void)report_id;
- (void)report_type;
- (void)buffer;
- (void)reqlen;
- return 0;
- }
- // Invoked when received SET_REPORT control request or
- // received data on OUT endpoint ( Report ID = 0, Type = 0 )
- void tud_hid_set_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t const *buffer, uint16_t bufsize)
- {
- }
- void installUSB()
- {
- ESP_LOGI(usbTAG, "USB initialization");
- const tinyusb_config_t tusb_cfg = {
- .device_descriptor = NULL,
- .string_descriptor = hid_string_descriptor,
- .string_descriptor_count = sizeof(hid_string_descriptor) / sizeof(hid_string_descriptor[0]),
- .external_phy = false,
- .configuration_descriptor = hid_configuration_descriptor,
- };
- ESP_ERROR_CHECK(tinyusb_driver_install(&tusb_cfg));
- ESP_LOGI(usbTAG, "USB initialization DONE");
- }
- DynamicJsonDocument doc(1024);
- char cmd[256];
- static void app_send_hid_demo(void)
- {
- doc["cmd"] = "sndLvl1";
- serializeJson(doc, cmd);
- ESP_LOGI(usbTAG, "Sending USB Report");
- tud_hid_report(0, cmd, strlen(cmd));
- }
Code: Select all
[1/1] cd /home/edgie/esp/read_rotary/build/bootloader/esp-idf/esptool_py && /home/edgie/.espr...--offset 0x8000 bootloader 0x1000 /home/edgie/esp/read_rotary/build/bootloader/bootloader.binBootloader binary size 0x5440 bytes. 0x1bc0 bytes (25%) free.
[2/4] Linking CXX executable read_rotary.elfFAILED: read_rotary.elf
: && /home/edgie/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-g++ -mlongcalls -g -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32S2=0 -Wl,--Map=/home/edgie/esp/read_rotary/build/read_rotary.map -Wl,--no-warn-rwx-segments -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32s2.peripherals.ld -T esp32s2.rom.ld -T esp32s2.rom.api.ld -T esp32s2.rom.libgcc.ld -T esp32s2.rom.newlib-funcs.ld -T esp32s2.rom.newlib-data.ld -T esp32s2.rom.spiflash.ld -T memory.ld -T sections.ld CMakeFiles/read_rotary.elf.dir/project_elf_src_esp32s2.c.obj -o read_rotary.elf -L/home/edgie/esp/esp-idf/components/soc/esp32s2/ld -L/home/edgie/esp/esp-idf/components/esp_rom/esp32s2/ld -L/home/edgie/esp/read_rotary/build/esp-idf/esp_system/ld -L/home/edgie/esp/esp-idf/components/esp_phy/lib/esp32s2 -L/home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2 esp-idf/xtensa/libxtensa.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/efuse/libefuse.a esp-idf/driver/libdriver.a esp-idf/esp_pm/libesp_pm.a esp-idf/mbedtls/libmbedtls.a esp-idf/esp_app_format/libesp_app_format.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/esp_partition/libesp_partition.a esp-idf/app_update/libapp_update.a esp-idf/esp_mm/libesp_mm.a esp-idf/spi_flash/libspi_flash.a esp-idf/pthread/libpthread.a esp-idf/esp_system/libesp_system.a esp-idf/esp_rom/libesp_rom.a esp-idf/hal/libhal.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/soc/libsoc.a esp-idf/esp_hw_support/libesp_hw_support.a esp-idf/freertos/libfreertos.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/esp_common/libesp_common.a esp-idf/esp_timer/libesp_timer.a esp-idf/app_trace/libapp_trace.a esp-idf/esp_event/libesp_event.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/esp_phy/libesp_phy.a esp-idf/vfs/libvfs.a esp-idf/lwip/liblwip.a esp-idf/esp_netif/libesp_netif.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/esp_coex/libesp_coex.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/unity/libunity.a esp-idf/cmock/libcmock.a esp-idf/console/libconsole.a esp-idf/http_parser/libhttp_parser.a esp-idf/esp-tls/libesp-tls.a esp-idf/esp_adc/libesp_adc.a esp-idf/esp_eth/libesp_eth.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/esp_hid/libesp_hid.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/esp_lcd/libesp_lcd.a esp-idf/protobuf-c/libprotobuf-c.a esp-idf/protocomm/libprotocomm.a esp-idf/esp_local_ctrl/libesp_local_ctrl.a esp-idf/espcoredump/libespcoredump.a esp-idf/wear_levelling/libwear_levelling.a esp-idf/sdmmc/libsdmmc.a esp-idf/fatfs/libfatfs.a esp-idf/json/libjson.a esp-idf/mqtt/libmqtt.a esp-idf/perfmon/libperfmon.a esp-idf/spiffs/libspiffs.a esp-idf/touch_element/libtouch_element.a esp-idf/ulp/libulp.a esp-idf/usb/libusb.a esp-idf/wifi_provisioning/libwifi_provisioning.a esp-idf/espressif__tinyusb/libespressif__tinyusb.a esp-idf/espressif__esp_tinyusb/libespressif__esp_tinyusb.a esp-idf/main/libmain.a esp-idf/app_trace/libapp_trace.a esp-idf/unity/libunity.a esp-idf/protocomm/libprotocomm.a esp-idf/console/libconsole.a esp-idf/protobuf-c/libprotobuf-c.a esp-idf/json/libjson.a esp-idf/espressif__esp_tinyusb/libespressif__esp_tinyusb.a esp-idf/fatfs/libfatfs.a esp-idf/wear_levelling/libwear_levelling.a esp-idf/sdmmc/libsdmmc.a esp-idf/usb/libusb.a esp-idf/espressif__tinyusb/libespressif__tinyusb.a esp-idf/xtensa/libxtensa.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/efuse/libefuse.a esp-idf/driver/libdriver.a esp-idf/esp_pm/libesp_pm.a esp-idf/mbedtls/libmbedtls.a esp-idf/esp_app_format/libesp_app_format.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/esp_partition/libesp_partition.a esp-idf/app_update/libapp_update.a esp-idf/esp_mm/libesp_mm.a esp-idf/spi_flash/libspi_flash.a esp-idf/pthread/libpthread.a esp-idf/esp_system/libesp_system.a esp-idf/esp_rom/libesp_rom.a esp-idf/hal/libhal.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/soc/libsoc.a esp-idf/esp_hw_support/libesp_hw_support.a esp-idf/freertos/libfreertos.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/esp_common/libesp_common.a esp-idf/esp_timer/libesp_timer.a esp-idf/esp_event/libesp_event.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/esp_phy/libesp_phy.a esp-idf/vfs/libvfs.a esp-idf/lwip/liblwip.a esp-idf/esp_netif/libesp_netif.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/esp_coex/libesp_coex.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/http_parser/libhttp_parser.a esp-idf/esp-tls/libesp-tls.a esp-idf/esp_adc/libesp_adc.a esp-idf/esp_eth/libesp_eth.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/ulp/libulp.a esp-idf/mbedtls/mbedtls/library/libmbedtls.a esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a esp-idf/mbedtls/mbedtls/library/libmbedx509.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libcore.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libespnow.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libmesh.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libnet80211.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libpp.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libsmartconfig.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libwapi.a esp-idf/xtensa/libxtensa.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/efuse/libefuse.a esp-idf/driver/libdriver.a esp-idf/esp_pm/libesp_pm.a esp-idf/mbedtls/libmbedtls.a esp-idf/esp_app_format/libesp_app_format.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/esp_partition/libesp_partition.a esp-idf/app_update/libapp_update.a esp-idf/esp_mm/libesp_mm.a esp-idf/spi_flash/libspi_flash.a esp-idf/pthread/libpthread.a esp-idf/esp_system/libesp_system.a esp-idf/esp_rom/libesp_rom.a esp-idf/hal/libhal.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/soc/libsoc.a esp-idf/esp_hw_support/libesp_hw_support.a esp-idf/freertos/libfreertos.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/esp_common/libesp_common.a esp-idf/esp_timer/libesp_timer.a esp-idf/esp_event/libesp_event.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/esp_phy/libesp_phy.a esp-idf/vfs/libvfs.a esp-idf/lwip/liblwip.a esp-idf/esp_netif/libesp_netif.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/esp_coex/libesp_coex.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/http_parser/libhttp_parser.a esp-idf/esp-tls/libesp-tls.a esp-idf/esp_adc/libesp_adc.a esp-idf/esp_eth/libesp_eth.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/ulp/libulp.a esp-idf/mbedtls/mbedtls/library/libmbedtls.a esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a esp-idf/mbedtls/mbedtls/library/libmbedx509.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libcore.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libespnow.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libmesh.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libnet80211.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libpp.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libsmartconfig.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libwapi.a esp-idf/xtensa/libxtensa.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/efuse/libefuse.a esp-idf/driver/libdriver.a esp-idf/esp_pm/libesp_pm.a esp-idf/mbedtls/libmbedtls.a esp-idf/esp_app_format/libesp_app_format.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/esp_partition/libesp_partition.a esp-idf/app_update/libapp_update.a esp-idf/esp_mm/libesp_mm.a esp-idf/spi_flash/libspi_flash.a esp-idf/pthread/libpthread.a esp-idf/esp_system/libesp_system.a esp-idf/esp_rom/libesp_rom.a esp-idf/hal/libhal.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/soc/libsoc.a esp-idf/esp_hw_support/libesp_hw_support.a esp-idf/freertos/libfreertos.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/esp_common/libesp_common.a esp-idf/esp_timer/libesp_timer.a esp-idf/esp_event/libesp_event.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/esp_phy/libesp_phy.a esp-idf/vfs/libvfs.a esp-idf/lwip/liblwip.a esp-idf/esp_netif/libesp_netif.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/esp_coex/libesp_coex.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/http_parser/libhttp_parser.a esp-idf/esp-tls/libesp-tls.a esp-idf/esp_adc/libesp_adc.a esp-idf/esp_eth/libesp_eth.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/ulp/libulp.a esp-idf/mbedtls/mbedtls/library/libmbedtls.a esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a esp-idf/mbedtls/mbedtls/library/libmbedx509.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libcore.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libespnow.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libmesh.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libnet80211.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libpp.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libsmartconfig.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libwapi.a esp-idf/xtensa/libxtensa.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/efuse/libefuse.a esp-idf/driver/libdriver.a esp-idf/esp_pm/libesp_pm.a esp-idf/mbedtls/libmbedtls.a esp-idf/esp_app_format/libesp_app_format.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/esp_partition/libesp_partition.a esp-idf/app_update/libapp_update.a esp-idf/esp_mm/libesp_mm.a esp-idf/spi_flash/libspi_flash.a esp-idf/pthread/libpthread.a esp-idf/esp_system/libesp_system.a esp-idf/esp_rom/libesp_rom.a esp-idf/hal/libhal.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/soc/libsoc.a esp-idf/esp_hw_support/libesp_hw_support.a esp-idf/freertos/libfreertos.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/esp_common/libesp_common.a esp-idf/esp_timer/libesp_timer.a esp-idf/esp_event/libesp_event.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/esp_phy/libesp_phy.a esp-idf/vfs/libvfs.a esp-idf/lwip/liblwip.a esp-idf/esp_netif/libesp_netif.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/esp_coex/libesp_coex.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/http_parser/libhttp_parser.a esp-idf/esp-tls/libesp-tls.a esp-idf/esp_adc/libesp_adc.a esp-idf/esp_eth/libesp_eth.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/ulp/libulp.a esp-idf/mbedtls/mbedtls/library/libmbedtls.a esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a esp-idf/mbedtls/mbedtls/library/libmbedx509.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libcore.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libespnow.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libmesh.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libnet80211.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libpp.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libsmartconfig.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libwapi.a esp-idf/xtensa/libxtensa.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/efuse/libefuse.a esp-idf/driver/libdriver.a esp-idf/esp_pm/libesp_pm.a esp-idf/mbedtls/libmbedtls.a esp-idf/esp_app_format/libesp_app_format.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/esp_partition/libesp_partition.a esp-idf/app_update/libapp_update.a esp-idf/esp_mm/libesp_mm.a esp-idf/spi_flash/libspi_flash.a esp-idf/pthread/libpthread.a esp-idf/esp_system/libesp_system.a esp-idf/esp_rom/libesp_rom.a esp-idf/hal/libhal.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/soc/libsoc.a esp-idf/esp_hw_support/libesp_hw_support.a esp-idf/freertos/libfreertos.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/esp_common/libesp_common.a esp-idf/esp_timer/libesp_timer.a esp-idf/esp_event/libesp_event.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/esp_phy/libesp_phy.a esp-idf/vfs/libvfs.a esp-idf/lwip/liblwip.a esp-idf/esp_netif/libesp_netif.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/esp_coex/libesp_coex.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/http_parser/libhttp_parser.a esp-idf/esp-tls/libesp-tls.a esp-idf/esp_adc/libesp_adc.a esp-idf/esp_eth/libesp_eth.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/ulp/libulp.a esp-idf/mbedtls/mbedtls/library/libmbedtls.a esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a esp-idf/mbedtls/mbedtls/library/libmbedx509.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libcore.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libespnow.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libmesh.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libnet80211.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libpp.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libsmartconfig.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libwapi.a esp-idf/xtensa/libxtensa.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/efuse/libefuse.a esp-idf/driver/libdriver.a esp-idf/esp_pm/libesp_pm.a esp-idf/mbedtls/libmbedtls.a esp-idf/esp_app_format/libesp_app_format.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/esp_partition/libesp_partition.a esp-idf/app_update/libapp_update.a esp-idf/esp_mm/libesp_mm.a esp-idf/spi_flash/libspi_flash.a esp-idf/pthread/libpthread.a esp-idf/esp_system/libesp_system.a esp-idf/esp_rom/libesp_rom.a esp-idf/hal/libhal.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/soc/libsoc.a esp-idf/esp_hw_support/libesp_hw_support.a esp-idf/freertos/libfreertos.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/esp_common/libesp_common.a esp-idf/esp_timer/libesp_timer.a esp-idf/esp_event/libesp_event.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/esp_phy/libesp_phy.a esp-idf/vfs/libvfs.a esp-idf/lwip/liblwip.a esp-idf/esp_netif/libesp_netif.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/esp_coex/libesp_coex.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/http_parser/libhttp_parser.a esp-idf/esp-tls/libesp-tls.a esp-idf/esp_adc/libesp_adc.a esp-idf/esp_eth/libesp_eth.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/ulp/libulp.a esp-idf/mbedtls/mbedtls/library/libmbedtls.a esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a esp-idf/mbedtls/mbedtls/library/libmbedx509.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libcore.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libespnow.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libmesh.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libnet80211.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libpp.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libsmartconfig.a /home/edgie/esp/esp-idf/components/esp_wifi/lib/esp32s2/libwapi.a /home/edgie/esp/esp-idf/components/xtensa/esp32s2/libxt_hal.a -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u pthread_include_pthread_semaphore_impl -u ld_include_highint_hdl -u start_app -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -Wl,--undefined=uxTopUsedPriority -Wl,--undefined=FreeRTOS_openocd_params -u app_main -lc -lm esp-idf/newlib/libnewlib.a -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -Wl,--wrap=_Unwind_SetEnableExceptionFdeSorting -Wl,--wrap=__register_frame_info_bases -Wl,--wrap=__register_frame_info -Wl,--wrap=__register_frame -Wl,--wrap=__register_frame_info_table_bases -Wl,--wrap=__register_frame_info_table -Wl,--wrap=__register_frame_table -Wl,--wrap=__deregister_frame_info_bases -Wl,--wrap=__deregister_frame_info -Wl,--wrap=_Unwind_Find_FDE -Wl,--wrap=_Unwind_GetGR -Wl,--wrap=_Unwind_GetCFA -Wl,--wrap=_Unwind_GetIP -Wl,--wrap=_Unwind_GetIPInfo -Wl,--wrap=_Unwind_GetRegionStart -Wl,--wrap=_Unwind_GetDataRelBase -Wl,--wrap=_Unwind_GetTextRelBase -Wl,--wrap=_Unwind_SetIP -Wl,--wrap=_Unwind_SetGR -Wl,--wrap=_Unwind_GetLanguageSpecificData -Wl,--wrap=_Unwind_FindEnclosingFunction -Wl,--wrap=_Unwind_Resume -Wl,--wrap=_Unwind_RaiseException -Wl,--wrap=_Unwind_DeleteException -Wl,--wrap=_Unwind_ForcedUnwind -Wl,--wrap=_Unwind_Resume_or_Rethrow -Wl,--wrap=_Unwind_Backtrace -Wl,--wrap=__cxa_call_unexpected -Wl,--wrap=__gxx_personality_v0 -u __cxa_guard_dummy -lstdc++ esp-idf/pthread/libpthread.a -lgcc esp-idf/cxx/libcxx.a -u __cxx_fatal_exception -u include_esp_phy_override -lphy esp-idf/esp_phy/libesp_phy.a -lphy esp-idf/esp_phy/libesp_phy.a -lphy -u vfs_include_syscalls_impl && :
/home/edgie/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin/../lib/gcc/xtensa-esp32s2-elf/12.2.0/../../../../xtensa-esp32s2-elf/bin/ld: esp-idf/main/libmain.a(read_rotary.cpp.obj):(.literal._ZL17app_send_hid_demov+0x1c): undefined reference to `tud_hid_n_report'
/home/edgie/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin/../lib/gcc/xtensa-esp32s2-elf/12.2.0/../../../../xtensa-esp32s2-elf/bin/ld: esp-idf/main/libmain.a(read_rotary.cpp.obj): in function `_ZL17app_send_hid_demov':
/home/edgie/esp/read_rotary/main/setUsb.cpp:107: undefined reference to `tud_hid_n_report'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.