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

Undefined reference to tinyusb callback funcs #359

Closed
fangpenlin opened this issue Jan 2, 2025 · 14 comments
Closed

Undefined reference to tinyusb callback funcs #359

fangpenlin opened this issue Jan 2, 2025 · 14 comments
Labels
bug Something isn't working

Comments

@fangpenlin
Copy link

Bug description

Build extra esp_tinyusb component with CONFIG_TINYUSB_MSC_ENABLED set to y, somehow encounter the cakkback functions symbols missing issue:

error: linking with `ldproxy` failed: exit code: 1
  |
  = note: "ldproxy" "C:\\Users\\Fang-Pen\\AppData\\Local\\Temp\\rustcrQegWk\\symbols.o" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\esp32_playground-7d9086eaad0faf9f.2qoaz9wb7ep67z0qujfglu4yk.rcgu.o" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\esp32_playground-7d9086eaad0faf9f.4hds22qrruv73nrr9ljitkaw4.rcgu.o" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\esp32_playground-7d9086eaad0faf9f.ewjildy4dmea1mjhk07gswjqy.rcgu.o" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\esp32_playground-7d9086eaad0faf9f.ek3ed1swuuj50eabg05hzfn0u.rcgu.o" "-Wl,--as-needed" "-Wl,-Bstatic" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libesp_idf_svc-d89e248162f947f6.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembassy_futures-4dd7b98316da210e.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembassy_time_driver-8dad0d94c7b130f4.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libuncased-547947eb7e70b8f5.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libesp_idf_hal-02bb17ab7df2cca7.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_hal_async-e249d9e88b9180c5.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_can-919c04c9dd4a291c.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_hal-0da04245d18b2996.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libvoid-51cdb84cc35af7b3.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libnb-ed5b4bdf15f68b0e.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_hal_nb-ed5400dd423b5a44.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libnb-368281c0e611fbde.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libatomic_waker-8913311add159285.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembassy_sync-530069ec2ceaec36.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libfutures_util-d85c4e7fd26340f9.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libpin_project_lite-f0f5e50b49278681.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libfutures_task-ab077b771ac35733.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libpin_utils-b968344e217e695b.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libfutures_core-ea4b9ef6f4dcfee3.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libfutures_sink-75605a48403481da.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libcritical_section-4b666c255fceed72.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_hal-3d98d483e5d2907d.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libnum_enum-a233899e4d4d5925.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_svc-4783f60b49e30172.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libheapless-49b35f173bb6f03d.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libhash32-ab66924fc8ff433b.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libbyteorder-eefff2ac3abd8c9d.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libenumset-bdb60452e560eeb7.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_io_async-6e5224c4d6bc03db.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_io-ef685ca30757134c.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\liblog-cf2e205841b09931.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libesp_idf_sys-ab956bf0aa48d8ad.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\liblibc-105a914b80963923.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libconst_format-bfbe81f5d480c771.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libstd-4c468461821b8e42.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libpanic_abort-40b5e4816c6d2d03.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libobject-e2337356ce84003f.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libmemchr-7e638e6cd9a8bf3e.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libaddr2line-09108638b704a856.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libgimli-91179c1d341704e4.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\librustc_demangle-0df14b1482c9f94c.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libstd_detect-16421a88257927e7.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libhashbrown-f9fd6930d3df5877.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\librustc_std_workspace_alloc-225fd769b3c83fc9.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libminiz_oxide-68ad5c51c4d1a6a5.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libadler-1575b6ba46a624b7.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libunwind-b1e93e67cfecf252.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libcfg_if-bd93b87847037323.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\liblibc-696191a4e9a3bc43.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\liballoc-865a6e17b8f2eff0.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\librustc_std_workspace_core-851f43160a9ce72a.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libcore-372d31482e278cd7.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libcompiler_builtins-52671fef70583e56.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-o" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\esp32_playground-7d9086eaad0faf9f" "-Wl,--gc-sections" "-no-pie" "-nodefaultlibs" "--ldproxy-linker" "C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc.exe" "--ldproxy-cwd" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\build\\esp-idf-sys-d285e4edb12cb7fa\\out\\build" "@C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\build\\esp-idf-sys-d285e4edb12cb7fa\\out\\linker_args.txt"
  = note: [ldproxy] Running ldproxy
          Error: Linker C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc.exe failed: exit code: 1
          STDERR OUTPUT:
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj):(.literal.proc_read10_cmd$constprop$0+0x8): undefined reference to `tud_msc_read10_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj):(.literal.mscd_xfer_cb+0x2c): undefined reference to `tud_msc_scsi_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj):(.literal.mscd_xfer_cb+0x30): undefined reference to `tud_msc_test_unit_ready_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj):(.literal.mscd_xfer_cb+0x34): undefined reference to `tud_msc_capacity_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj):(.literal.mscd_xfer_cb+0x38): undefined reference to `tud_msc_inquiry_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj):(.literal.mscd_xfer_cb+0x3c): undefined reference to `tud_msc_write10_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj): in function `proc_read10_cmd':␍
          C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:768:(.text.proc_read10_cmd$constprop$0+0x4d): undefined reference to `tud_msc_read10_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj): in function `mscd_xfer_cb':␍
          C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:414:(.text.mscd_xfer_cb+0x16e): undefined reference to `tud_msc_scsi_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj): in function `proc_builtin_scsi':␍
          C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:604:(.text.mscd_xfer_cb+0x1f3): undefined reference to `tud_msc_test_unit_ready_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:587:(.text.mscd_xfer_cb+0x22f): undefined reference to `tud_msc_capacity_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:647:(.text.mscd_xfer_cb+0x2ab): undefined reference to `tud_msc_capacity_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:691:(.text.mscd_xfer_cb+0x346): undefined reference to `tud_msc_inquiry_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj): in function `rdwr10_get_lba':␍
          C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:133:(.text.mscd_xfer_cb+0x422): undefined reference to `tud_msc_write10_cb'␍
          C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj): in function `is_data_in':␍
          C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:91:(.text.mscd_xfer_cb+0x4ae): undefined reference to `tud_msc_scsi_cb'␍
          collect2.exe: error: ld returned 1 exit status
  • Would you like to work on a fix? [y/n]

To Reproduce

Have esp_tinyusb in Cargo.toml extra components like this:

# ...

[dependencies]
esp-idf-sys = "0.35.0"

[[package.metadata.esp-idf-sys.extra_components]]
remote_component = { name = "espressif/esp_tinyusb", version = "1.5.0" }
bindings_header = "src/include/tinyusb_bindings.h"
bindings_module = "esp_tinyusb"

Have a binding header file like this

#if defined(ESP_IDF_COMP_ESPRESSIF__ESP_TINYUSB_ENABLED)
#include "tinyusb.h"
#endif

Add

CONFIG_TINYUSB_MSC_ENABLED=y

in sdkconfig.defaults file

The repository for reproduction is here:

https://github.com/LaunchPlatform/esp-idf-sys-esp-tinyusb-build-erro-reproduce

Please note that to make the reproduction repo works, you need to downgrade espup to 11 with older clang runtime and also put the folder in a shorter path to avoid path too long problem under windows

Expected behavior

It should build

Environment

  • Crate (esp-idf-sys) version: 0.35.0
  • ESP-IDF branch or tag: release/v5.2
  • Target device (MCU): esp32s3
  • OS: Windows11
@fangpenlin fangpenlin added the bug Something isn't working label Jan 2, 2025
@github-project-automation github-project-automation bot moved this to Todo in esp-rs Jan 2, 2025
@fangpenlin
Copy link
Author

fangpenlin commented Jan 2, 2025

I tried to understand why the build fail. It seems like that the esp-idf-sys build system is building tinyusb as a static lib? But the callback functions are defined in esp_tinyusb. May need to dig deeper to understand what's going on here.

@ivmarkov
Copy link
Collaborator

ivmarkov commented Jan 2, 2025

I tried to understand why the build fail. It seems like that the esp-idf-sys build system is building tinyusb as a static lib? But the callback functions are defined in esp_tinyusb. May need to dig deeper to understand what's going on here.

The callbacks are not really referenced from your program so the linker is pruning them. What happens if you call this function in your program?

@fangpenlin
Copy link
Author

@ivmarkov I think you're right. Indeed it seems like it's linker is pruning them.

I just call a random one from them tud_msc_test_unit_ready_cb:

unsafe { tud_msc_test_unit_ready_cb(0) };

And now it builds. Any idea how to make esp/rust build system to keep those functions without making a call? I can make a always false if condition to fix this problem as a workaround, but there must be a better solution than this.

@ivmarkov
Copy link
Collaborator

ivmarkov commented Jan 2, 2025

@ivmarkov I think you're right. Indeed it seems like it's linker is pruning them.

I just call a random one from them tud_msc_test_unit_ready_cb:

unsafe { tud_msc_test_unit_ready_cb(0) };

And now it builds. Any idea how to make esp/rust build system to keep those functions without making a call? I can make a always false if condition to fix this problem as a workaround, but there must be a better solution than this.

My point is that if you are trying to implement a mass-storage device, you have to place a call to this function anyway in your code (right? or else how would your mass-storage device connect to the SD card?), and then if you do that, this function is anyway calling the callbacks, so they would be preserved?

@fangpenlin
Copy link
Author

@ivmarkov yep, I see, you're right. Looks like I will need to call that function anyway. So the header for tusb_msc_storage was missing in my code:

#include "tusb_msc_storage.h"

After that, if I call tinyusb_msc_storage_mount then the linker stop from removing the section.

Thank you so much for the help. Silly problem as it turns out 😅

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Jan 2, 2025
@ivmarkov
Copy link
Collaborator

ivmarkov commented Jan 2, 2025

BTW, I've now directly included all TinyUSB headers in the about-to-be-released next esp-idf-sys here.

What this means is that while you still have to refer to the TinyUSB custom component from your binary crate, you no longer need to define your own "bindings_header" header. The moment you include the tinyusb component, the bindings will be generated for you.

Would you like to try this out? I really don't have time to try if it works correctly myself. You need to patch the esp-idf-* crates to their GIT versions in your Cargo.toml as follows:

[patch.crates-io]
embuild = { git = "https://github.com/esp-rs/embuild" }
esp-idf-svc = { git = "https://github.com/esp-rs/esp-idf-svc" }
esp-idf-hal = { git = "https://github.com/esp-rs/esp-idf-hal" }
esp-idf-sys = { git = "https://github.com/esp-rs/esp-idf-sys" }

Also note that you have to remove the bindings_module thing then, as these bindings are generated in the main esp-idf-sys namespace.

@fangpenlin
Copy link
Author

I just tried it out in my reproducing repo here:
LaunchPlatform/esp-idf-sys-esp-tinyusb-build-erro-reproduce@0018f96

And here's the error I got

  Error: failed to generate bindings in file 'C:\ws\e3\target\xtensa-esp32s3-espidf\debug\build\esp-idf-sys-35fce39328b4dadc\out\bindings.rs'
  Caused by:
      clang diagnosed error: C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-35fce39328b4dadc/out/managed_components/espressif__esp_tinyusb/include/tusb_cdc_acm.h:21:2: error: "TinyUSB CDC driver must be enabled in menuconfig"
  Stack backtrace:

Probably because in my reproducing repo, I only have CONFIG_TINYUSB_MSC_ENABLED=y instead of the flag for CDC

I guess you need to put tusb_cdc_acm.h header under CONFIG_TINYUSB_CDC_ENABLED flag

https://github.com/espressif/esp-usb/blob/e013116f2f6f1a71cda676f6438fed6d9d145b51/device/esp_tinyusb/CMakeLists.txt#L11C4-L11C30

probably the same for all the conditional stuff and their corresponding headers such as:

  • CONFIG_TINYUSB_CDC_ENABLED
  • CONFIG_TINYUSB_MSC_ENABLED
  • CONFIG_TINYUSB_NET_MODE_NCM

@ivmarkov
Copy link
Collaborator

ivmarkov commented Jan 2, 2025

I just tried it out in my reproducing repo here: LaunchPlatform/esp-idf-sys-esp-tinyusb-build-erro-reproduce@0018f96

And here's the error I got

  Error: failed to generate bindings in file 'C:\ws\e3\target\xtensa-esp32s3-espidf\debug\build\esp-idf-sys-35fce39328b4dadc\out\bindings.rs'
  Caused by:
      clang diagnosed error: C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-35fce39328b4dadc/out/managed_components/espressif__esp_tinyusb/include/tusb_cdc_acm.h:21:2: error: "TinyUSB CDC driver must be enabled in menuconfig"
  Stack backtrace:

Probably because in my reproducing repo, I only have CONFIG_TINYUSB_MSC_ENABLED=y instead of the flag for CDC

I guess you need to put tusb_cdc_acm.h header under CONFIG_TINYUSB_CDC_ENABLED flag

https://github.com/espressif/esp-usb/blob/e013116f2f6f1a71cda676f6438fed6d9d145b51/device/esp_tinyusb/CMakeLists.txt#L11C4-L11C30

probably the same for all the conditional stuff and their corresponding headers such as:

  • CONFIG_TINYUSB_CDC_ENABLED
  • CONFIG_TINYUSB_MSC_ENABLED
  • CONFIG_TINYUSB_NET_MODE_NCM

Thank you for your feedback! Can you try again (do cargo update before re-building)
I think we only need to check for CONFIG_TINYUSB_CDC_ENABLED:

  • The MSC header does not have any CONFIG_* checks
  • The NET header does have a CONFIG_* check, but it is of a different style (no compile-time error) and better (IMO) than what they did for the CDC header (?). Go figure! :-)

@fangpenlin
Copy link
Author

Hmmm

That's odd. I tried your new commit

LaunchPlatform/esp-idf-sys-esp-tinyusb-build-erro-reproduce@edc25d7

Still encountering the same error

error: failed to run custom build command for `esp-idf-sys v0.35.0 (https://github.com/esp-rs/esp-idf-sys?rev=0bbcaab65ca1c199d21182a659184ae055cdd03d#0bbcaab6)`
Caused by:
  process didn't exit successfully: `C:\ws\e3\target\debug\build\esp-idf-sys-0feedbffd95c0f6e\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=ESP_IDF_TOOLS_INSTALL_DIR
  cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG
  cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG_DEFAULTS
  cargo:rerun-if-env-changed=MCU
  cargo:rerun-if-env-changed=ESP_IDF_SYS_ROOT_CRATE
  cargo:rerun-if-env-changed=ESP_IDF_VERSION
  cargo:rerun-if-env-changed=ESP_IDF_REPOSITORY
  cargo:rerun-if-env-changed=ESP_IDF_CMAKE_GENERATOR
  cargo:rerun-if-env-changed=IDF_PATH
  cargo:rerun-if-env-changed=EXTRA-COMPONENTS
  cargo:rerun-if-env-changed=ESP_IDF_COMPONENTS
  cargo:rerun-if-env-changed=ESP_IDF_COMPONENT_MANAGER
  Python 3.11.2
  pip 24.3.1 from C:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\Lib\site-packages\pip (python 3.11)
  Requirement already satisfied: pip in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (24.3.1)
  Requirement already satisfied: setuptools in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (71.0.0)
  Collecting setuptools
    Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB)
  Using cached setuptools-75.6.0-py3-none-any.whl (1.2 MB)
  Installing collected packages: setuptools
    Attempting uninstall: setuptools
      Found existing installation: setuptools 71.0.0
      Uninstalling setuptools-71.0.0:
        Successfully uninstalled setuptools-71.0.0
  Successfully installed setuptools-75.6.0
  Looking in indexes: https://pypi.org/simple, https://dl.espressif.com/pypi
  Ignoring importlib_metadata: markers 'python_version < "3.8"' don't match your environment
  Collecting setuptools (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 3))
    Using cached https://dl.espressif.com/pypi/setuptools/setuptools-71.0.0-py3-none-any.whl (908 kB)
  Requirement already satisfied: packaging in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 4)) (24.2)
  Requirement already satisfied: click in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 7)) (8.1.8)
  Requirement already satisfied: pyserial in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 8)) (3.5)
  Requirement already satisfied: cryptography in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 9)) (41.0.7)
  Requirement already satisfied: pyparsing in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 10)) (3.2.1)
  Requirement already satisfied: pyelftools in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 11)) (0.31)
  Requirement already satisfied: idf-component-manager in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (2.1.1)
  Requirement already satisfied: esp-coredump in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 13)) (1.12.0)
  Requirement already satisfied: esptool in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 14)) (4.8.1)
  Requirement already satisfied: esp-idf-kconfig in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 15)) (1.5.0)
  Requirement already satisfied: esp-idf-monitor in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 16)) (1.5.0)
  Requirement already satisfied: esp-idf-size in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 17)) (1.6.1)
  Requirement already satisfied: esp-idf-panic-decoder in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 18)) (1.2.1)
  Requirement already satisfied: pyclang in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 19)) (0.6.0)
  Requirement already satisfied: construct in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 20)) (2.10.70)
  Requirement already satisfied: freertos_gdb in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from -r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 23)) (1.0.3)
  Requirement already satisfied: colorama in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from click->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 7)) (0.4.6)
  Requirement already satisfied: cffi>=1.12 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from cryptography->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 9)) (1.17.1)
  Requirement already satisfied: pyyaml in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (6.0.2)
  Requirement already satisfied: ruamel.yaml in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (0.18.7)
  Requirement already satisfied: requests in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (2.32.3)
  Requirement already satisfied: requests-file in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (2.1.0)
  Requirement already satisfied: requests-toolbelt in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (1.0.0)
  Requirement already satisfied: tqdm in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (4.67.1)
  Requirement already satisfied: jsonref in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (1.1.0)
  Requirement already satisfied: pydantic in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (2.10.4)
  Requirement already satisfied: pydantic-core in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (2.27.2)
  Requirement already satisfied: pydantic-settings in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (2.7.1)
  Requirement already satisfied: typing-extensions in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (4.12.2)
  Requirement already satisfied: pygdbmi>=0.9.0.2 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from esp-coredump->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 13)) (0.11.0.0)
  Requirement already satisfied: bitstring!=4.2.0,>=3.1.6 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from esptool->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 14)) (4.3.0)
  Requirement already satisfied: ecdsa>=0.16.0 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from esptool->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 14)) (0.19.0)
  Requirement already satisfied: reedsolo<1.8,>=1.5.3 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from esptool->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 14)) (1.7.0)
  Requirement already satisfied: intelhex in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from esptool->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 14)) (2.3.0)
  Requirement already satisfied: kconfiglib>=13.7.1 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from esp-idf-kconfig->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 15)) (14.1.0)
  Requirement already satisfied: windows-curses in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from esp-idf-kconfig->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 15)) (2.4.0)
  Requirement already satisfied: rich in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from esp-idf-size->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 17)) (13.9.4)
  Requirement already satisfied: bitarray<3.1,>=3.0.0 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from bitstring!=4.2.0,>=3.1.6->esptool->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 14)) (3.0.0)
  Requirement already satisfied: pycparser in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from cffi>=1.12->cryptography->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 9)) (2.22)
  Requirement already satisfied: six>=1.9.0 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from ecdsa>=0.16.0->esptool->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 14)) (1.17.0)
  Requirement already satisfied: annotated-types>=0.6.0 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from pydantic->idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (0.7.0)
  Requirement already satisfied: python-dotenv>=0.21.0 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from pydantic-settings->idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (1.0.1)
  Requirement already satisfied: charset-normalizer<4,>=2 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from requests->idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (3.4.1)
  Requirement already satisfied: idna<4,>=2.5 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from requests->idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (3.10)
  Requirement already satisfied: urllib3<3,>=1.21.1 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from requests->idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (1.26.20)
  Requirement already satisfied: certifi>=2017.4.17 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from requests->idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (2024.12.14)
  Requirement already satisfied: markdown-it-py>=2.2.0 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from rich->esp-idf-size->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 17)) (3.0.0)
  Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from rich->esp-idf-size->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 17)) (2.18.0)
  Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from ruamel.yaml->idf-component-manager->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 12)) (0.2.12)
  Requirement already satisfied: mdurl~=0.1 in c:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\lib\site-packages (from markdown-it-py>=2.2.0->rich->esp-idf-size->-r C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt (line 17)) (0.1.2)
  Installing collected packages: setuptools
    Attempting uninstall: setuptools
      Found existing installation: setuptools 75.6.0
      Uninstalling setuptools-75.6.0:
        Successfully uninstalled setuptools-75.6.0
  Successfully installed setuptools-71.0.0
  Upgrading pip and setuptools...
  Skipping the download of C:\ws\e3\.embuild\espressif\espidf.constraints.v5.2.txt because it was downloaded recently.
  Installing Python packages
   Constraint file: C:\ws\e3\.embuild\espressif\espidf.constraints.v5.2.txt
   Requirement files:
    - C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt
  cargo:rerun-if-changed=C:\ws\e3\sdkconfig.defaults
  cargo:warning=Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `cc` installed? (see https://docs.rs/cc/latest/cc/#compile-time-requirements for help)
  cargo:warning=Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `c++` installed? (see https://docs.rs/cc/latest/cc/#compile-time-requirements for help)
  cargo:warning=Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `cc` installed? (see https://docs.rs/cc/latest/cc/#compile-time-requirements for help)
  CMAKE_PREFIX_PATH_xtensa-esp32s3-espidf = None
  CMAKE_PREFIX_PATH_xtensa_esp32s3_espidf = None
  TARGET_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_xtensa-esp32s3-espidf = None
  CMAKE_xtensa_esp32s3_espidf = None
  TARGET_CMAKE = None
  CMAKE = None
  running: "cmake" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\build\\esp-idf-sys-de24d9a5b435f328\\out" "-G" "Ninja" "-DCMAKE_TOOLCHAIN_FILE=C:\\ws\\e3\\.embuild\\espressif\\esp-idf\\v5.2.2\\tools\\cmake\\toolchain-esp32s3.cmake" "-DCMAKE_BUILD_TYPE=" "-DPYTHON=C:/ws/e3/.embuild/espressif/python_env/idf5.2_py3.11_env/Scripts/python" "-DCMAKE_INSTALL_PREFIX=C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\build\\esp-idf-sys-de24d9a5b435f328\\out" "-DCMAKE_C_FLAGS= -mlongcalls -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy" "-DCMAKE_CXX_FLAGS= -mlongcalls -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy" "-DCMAKE_ASM_FLAGS= -mlongcalls"
  -- Building ESP-IDF components for target esp32s3
  -- Checking Python dependencies...
  Python requirements are satisfied.
  Constraint file: C:\ws\e3\.embuild\espressif\espidf.constraints.v5.2.txt
  Requirement files:
   - C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2\tools\requirements\requirements.core.txt
  Python being checked: C:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\Scripts\python.exe
  NOTICE: Processing 3 dependencies:
  NOTICE: [1/3] espressif/esp_tinyusb (1.5.0)
  NOTICE: [2/3] espressif/tinyusb (0.17.0~2)
  NOTICE: [3/3] idf (5.2.2)
  -- Project sdkconfig file C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/sdkconfig
  Loading defaults file C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/gen-sdkconfig.defaults...
  C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/gen-sdkconfig.defaults:2 CONFIG_COMPILER_OPTIMIZATION_DEFAULT was replaced with CONFIG_COMPILER_OPTIMIZATION_DEBUG
  Loading defaults file C:/ws/e3/sdkconfig.defaults...
  -- Compiler supported targets: xtensa-esp-elf
  -- App "libespidf" version: edc25d7
  -- Adding linker script C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/build/esp-idf/esp_system/ld/memory.ld
  -- Adding linker script C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/build/esp-idf/esp_system/ld/sections.ld.in
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.ld
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/soc/esp32s3/ld/esp32s3.peripherals.ld
  -- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_bootloader_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump espressif__esp_tinyusb espressif__tinyusb esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash nvs_sec_provider openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport touch_element ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
  -- Component paths: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/app_trace C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/app_update C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/bootloader C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/bootloader_support C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/bt C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/cmock C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/console C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/cxx C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/efuse C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp-tls C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_adc C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_app_format C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_bootloader_format C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_coex C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_common C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_eth C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_event C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_gdbstub C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_hid C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_http_client C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_http_server C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_https_ota C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_https_server C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_hw_support C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_lcd C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_local_ctrl C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_mm C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_netif C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_netif_stack C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_partition C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_phy C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_pm C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_psram C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_ringbuf C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_rom C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_system C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_timer C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_wifi C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/espcoredump C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/managed_components/espressif__esp_tinyusb C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/managed_components/espressif__tinyusb C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esptool_py C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/fatfs C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/freertos C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/hal C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/heap C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/http_parser C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/idf_test C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/ieee802154 C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/json C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/log C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/lwip C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/main C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/mbedtls C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/mqtt C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/newlib C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/nvs_flash C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/nvs_sec_provider C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/openthread C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/partition_table C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/perfmon C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/protobuf-c C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/protocomm C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/pthread C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/sdmmc C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/soc C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/spi_flash C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/spiffs C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/tcp_transport C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/touch_element C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/ulp C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/unity C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/usb C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/vfs C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/wear_levelling C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/wifi_provisioning C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/wpa_supplicant C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/xtensa
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/build
  running: "cmake" "--build" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\build\\esp-idf-sys-de24d9a5b435f328\\out\\build" "--config" "MinSizeRel" "--parallel" "32"
  [1/9] Building C object esp-idf/esp_app_format/CMakeFiles/__idf_esp_app_format.dir/esp_app_desc.c.obj
  [2/9] Linking C static library esp-idf\esp_app_format\libesp_app_format.a
  [3/9] Performing build step for 'bootloader'
  -- Building ESP-IDF components for target esp32s3
  -- Project sdkconfig file C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/sdkconfig
  -- Compiler supported targets: xtensa-esp-elf
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/soc/esp32s3/ld/esp32s3.peripherals.ld
  -- Bootloader project name: "bootloader" version: 1
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.ld
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/bootloader/subproject/main/ld/esp32s3/bootloader.ld
  -- Adding linker script C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/bootloader/subproject/main/ld/esp32s3/bootloader.rom.ld
  -- Components: bootloader bootloader_support efuse esp_app_format esp_bootloader_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa
  -- Component paths: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/bootloader C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/bootloader_support C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/efuse C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_app_format C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_bootloader_format C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_common C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_hw_support C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_rom C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_system C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esptool_py C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/freertos C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/hal C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/log C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/bootloader/subproject/main C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/bootloader/subproject/components/micro-ecc C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/newlib C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/partition_table C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/soc C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/spi_flash C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/xtensa
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/build/bootloader
  [0/1] Re-running CMake...
  [1/1] cmd.exe /C "cd /D C:\ws\e3\target\xtensa-esp32s3-espidf\debug\build\esp-idf-sys-de24d9a5b435f328\out\build\bootloader\esp-idf\esptool_py && C:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\Scripts\python C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0 C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/build/bootloader/bootloader.bin"
  Bootloader binary size 0x5250 bytes. 0x2db0 bytes (36%) free.
  [4/7] Generating ld/sections.ld
  [5/7] Linking CXX executable libespidf.elf
  [6/7] Generating binary image from built executable
  esptool.py v4.8.1
  Creating esp32s3 image...
  Merged 2 ELF sections
  Successfully created esp32s3 image.
  Generated C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/build/libespidf.bin
  [7/7] cmd.exe /C "cd /D C:\ws\e3\target\xtensa-esp32s3-espidf\debug\build\esp-idf-sys-de24d9a5b435f328\out\build\esp-idf\esptool_py && C:\ws\e3\.embuild\espressif\python_env\idf5.2_py3.11_env\Scripts\python C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/build/partition_table/partition-table.bin C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/build/libespidf.bin"
  libespidf.bin binary size 0x32900 bytes. Smallest app partition is 0x100000 bytes. 0xcd700 bytes (80%) free.
  cargo:root=C:\ws\e3\target\xtensa-esp32s3-espidf\debug\build\esp-idf-sys-de24d9a5b435f328\out
  cargo:rerun-if-changed=C:\Users\Fang-Pen\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\0bbcaab\src\include\esp-idf\bindings.h
  cargo:rustc-env=EMBUILD_GENERATED_BINDINGS_FILE=C:\ws\e3\target\xtensa-esp32s3-espidf\debug\build\esp-idf-sys-de24d9a5b435f328\out\bindings.rs
  --- stderr
  Build configuration: BuildConfig {
      esp_idf_tools_install_dir: None,
      esp_idf_sdkconfig: None,
      esp_idf_sdkconfig_defaults: None,
      mcu: None,
      native: NativeConfig {
          esp_idf_version: Some(
              Tag(
                  "v5.2.2",
              ),
          ),
          esp_idf_repository: None,
          esp_idf_cmake_generator: None,
          idf_path: None,
          extra_components: [
              ExtraComponent {
                  component_dirs: [],
                  remote_component: Some(
                      RemoteComponent {
                          name: "espressif/esp_tinyusb",
                          version: "1.5.0",
                          git: None,
                          path: None,
                          service_url: None,
                      },
                  ),
                  bindings_header: None,
                  bindings_module: None,
                  manifest_dir: "C:\\ws\\e3",
              },
          ],
          esp_idf_components: None,
          esp_idf_component_manager: None,
      },
      esp_idf_sys_root_crate: None,
  }
  Using managed esp-idf repository: RemoteSdk { repo_url: None, git_ref: Tag("v5.2.2") }
  Using esp-idf v5.2.2 at 'C:\ws\e3\.embuild\espressif\esp-idf\v5.2.2'
  Built components: xtensa, esp_ringbuf, efuse, esp_mm, driver, esp_pm, mbedtls, esp_bootloader_format, esp_app_format, bootloader_support, bootloader, esptool_py, partition_table, esp_partition, app_update, spi_flash, pthread, esp_system, esp_rom, hal, log, heap, soc, esp_hw_support, freertos, newlib, cxx, esp_common, esp_timer, app_trace, esp_event, nvs_flash, esp_phy, vfs, lwip, esp_netif_stack, esp_netif, wpa_supplicant, esp_coex, esp_wifi, bt, unity, cmock, console, http_parser, esp-tls, esp_adc, esp_eth, esp_gdbstub, esp_hid, tcp_transport, esp_http_client, esp_http_server, esp_https_ota, esp_https_server, esp_psram, esp_lcd, protobuf-c, protocomm, esp_local_ctrl, espcoredump, wear_levelling, sdmmc, fatfs, idf_test, ieee802154, json, mqtt, nvs_sec_provider, openthread, perfmon, spiffs, touch_element, ulp, usb, wifi_provisioning, espressif__tinyusb, espressif__esp_tinyusb, main
  C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/freertos/esp_additions/include/freertos/task_snapshot.h:8:2: warning: freertos/task_snapshot.h header is no longer used, and will be removed in future versions. [-W#warnings]
  C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/spi_flash/include/esp_spi_flash.h:6:2: warning: esp_spi_flash.h is deprecated, please use spi_flash_mmap.h instead [-W#warnings]
  C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_adc/deprecated/include/esp_adc_cal.h:17:2: warning: "legacy adc calibration driver is deprecated, please migrate to use esp_adc/adc_cali.h and esp_adc/adc_cali_scheme.h" [-W#warnings]
  C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/wpa_supplicant/esp_supplicant/include/esp_wpa2.h:10:9: warning: esp_wpa2.h is deprecated. Use esp_eap_client.h instead. [-W#pragma-messages]
  C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/adc.h:19:2: warning: "legacy adc driver is deprecated, please migrate to use esp_adc/adc_oneshot.h and esp_adc/adc_continuous.h for oneshot mode and continuous mode drivers respectively" [-W#warnings]
  C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/i2s.h:27:2: warning: "This set of I2S APIs has been deprecated, please include 'driver/i2s_std.h', 'driver/i2s_pdm.h' or 'driver/i2s_tdm.h' instead. if you want to keep using the old APIs and ignore this warning, you can enable 'Suppress leagcy driver deprecated warning' option under 'I2S Configuration' menu in Kconfig" [-W#warnings]
  C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/pcnt.h:15:2: warning: "legacy pcnt driver is deprecated, please migrate to use driver/pulse_cnt.h" [-W#warnings]
  C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/periph_ctrl.h:7:2: warning: driver/periph_ctrl.h header is no longer used, and will be removed in future versions. [-W#warnings]
  C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/rmt.h:18:2: warning: "The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h" [-W#warnings]
  C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/rtc_cntl.h:7:2: warning: driver/rtc_cntl.h header is no longer used, and will be removed in future versions. [-W#warnings]
  C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/sigmadelta.h:15:2: warning: "The legacy sigma-delta driver is deprecated, please use driver/sdm.h" [-W#warnings]
  C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/timer.h:16:2: warning: "legacy timer group driver is deprecated, please migrate to driver/gptimer.h" [-W#warnings]
  C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/managed_components/espressif__esp_tinyusb/include/tusb_cdc_acm.h:21:2: error: "TinyUSB CDC driver must be enabled in menuconfig"
  clang diag: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/freertos/esp_additions/include/freertos/task_snapshot.h:8:2: warning: freertos/task_snapshot.h header is no longer used, and will be removed in future versions. [-W#warnings]
  clang diag: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/spi_flash/include/esp_spi_flash.h:6:2: warning: esp_spi_flash.h is deprecated, please use spi_flash_mmap.h instead [-W#warnings]
  clang diag: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/esp_adc/deprecated/include/esp_adc_cal.h:17:2: warning: "legacy adc calibration driver is deprecated, please migrate to use esp_adc/adc_cali.h and esp_adc/adc_cali_scheme.h" [-W#warnings]
  clang diag: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/wpa_supplicant/esp_supplicant/include/esp_wpa2.h:10:9: warning: esp_wpa2.h is deprecated. Use esp_eap_client.h instead. [-W#pragma-messages]
  clang diag: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/adc.h:19:2: warning: "legacy adc driver is deprecated, please migrate to use esp_adc/adc_oneshot.h and esp_adc/adc_continuous.h for oneshot mode and continuous mode drivers respectively" [-W#warnings]
  clang diag: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/i2s.h:27:2: warning: "This set of I2S APIs has been deprecated, please include 'driver/i2s_std.h', 'driver/i2s_pdm.h' or 'driver/i2s_tdm.h' instead. if you want to keep using the old APIs and ignore this warning, you can enable 'Suppress leagcy driver deprecated warning' option under 'I2S Configuration' menu in Kconfig" [-W#warnings]
  clang diag: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/pcnt.h:15:2: warning: "legacy pcnt driver is deprecated, please migrate to use driver/pulse_cnt.h" [-W#warnings]
  clang diag: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/periph_ctrl.h:7:2: warning: driver/periph_ctrl.h header is no longer used, and will be removed in future versions. [-W#warnings]
  clang diag: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/rmt.h:18:2: warning: "The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h" [-W#warnings]
  clang diag: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/rtc_cntl.h:7:2: warning: driver/rtc_cntl.h header is no longer used, and will be removed in future versions. [-W#warnings]
  clang diag: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/sigmadelta.h:15:2: warning: "The legacy sigma-delta driver is deprecated, please use driver/sdm.h" [-W#warnings]
  clang diag: C:/ws/e3/.embuild/espressif/esp-idf/v5.2.2/components/driver/deprecated/driver/timer.h:16:2: warning: "legacy timer group driver is deprecated, please migrate to driver/gptimer.h" [-W#warnings]
  Error: failed to generate bindings in file 'C:\ws\e3\target\xtensa-esp32s3-espidf\debug\build\esp-idf-sys-de24d9a5b435f328\out\bindings.rs'
  Caused by:
      clang diagnosed error: C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-de24d9a5b435f328/out/managed_components/espressif__esp_tinyusb/include/tusb_cdc_acm.h:21:2: error: "TinyUSB CDC driver must be enabled in menuconfig"
  Stack backtrace:
     0: std::backtrace_rs::backtrace::trace_unsynchronized
     1: std::backtrace::Backtrace::capture
     2: std::backtrace::Backtrace::capture
     3: anyhow::context::ext::impl$0::ext_context<enum2$<bindgen::BindgenError>,anyhow::Error>
               at C:\Users\Fang-Pen\.cargo\registry\src\index.crates.io-6f17d22bba15001f\anyhow-1.0.95\src\backtrace.rs:27
     4: anyhow::context::impl$0::with_context<bindgen::Bindings,enum2$<bindgen::BindgenError>,anyhow::Error,build_script_build::main::closure_env$4>
               at C:\Users\Fang-Pen\.cargo\registry\src\index.crates.io-6f17d22bba15001f\anyhow-1.0.95\src\context.rs:65
     5: build_script_build::main
               at .\build\build.rs:150
     6: core::ops::function::FnOnce::call_once<enum2$<core::result::Result<tuple$<>,anyhow::Error> > (*)(),tuple$<> >
               at C:\actions-runner\_work\rust-build\rust-build\rust\library\core\src\ops\function.rs:250
     7: std::sys::backtrace::__rust_begin_short_backtrace<enum2$<core::result::Result<tuple$<>,anyhow::Error> > (*)(),enum2$<core::result::Result<tuple$<>,anyhow::Error> > >
               at C:\actions-runner\_work\rust-build\rust-build\rust\library\std\src\sys\backtrace.rs:154
     8: std::rt::lang_start::closure$0<enum2$<core::result::Result<tuple$<>,anyhow::Error> > >
               at C:\actions-runner\_work\rust-build\rust-build\rust\library\std\src\rt.rs:164
     9: std::rt::lang_start_internal
    10: std::rt::lang_start<enum2$<core::result::Result<tuple$<>,anyhow::Error> > >
               at C:\actions-runner\_work\rust-build\rust-build\rust\library\std\src\rt.rs:163
    11: main
    12: invoke_main
               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
    13: __scrt_common_main_seh
               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    14: BaseThreadInitThunk
    15: RtlUserThreadStart
Process finished with exit code 101

@ivmarkov
Copy link
Collaborator

ivmarkov commented Jan 2, 2025

OK, let me try myself, though weird - as if you did not pick up the latest commit.

@ivmarkov
Copy link
Collaborator

ivmarkov commented Jan 2, 2025

Don't do rev = , you are this way actually not applying the esp-idf-sys crate as a patch:

warning: Patch `esp-idf-hal v0.44.1 (https://github.com/esp-rs/esp-idf-hal#77f9c75e)` was not used in the crate graph.
Patch `esp-idf-svc v0.49.1 (https://github.com/esp-rs/esp-idf-svc#3f99f1d1)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.

@ivmarkov
Copy link
Collaborator

ivmarkov commented Jan 2, 2025

@fangpenlin Now fixed for real & tested. :-)

@fangpenlin
Copy link
Author

Yep, I got it wrong. Didn't notice that the patch actually was not applied. Sorry still pretty new to rust 😅

And yes, I tested it locally now it builds. 👍

Thanks for the help! 🙌

@ivmarkov
Copy link
Collaborator

ivmarkov commented Jan 2, 2025

Yep, I got it wrong. Didn't notice that the patch actually was not applied. Sorry still pretty new to rust 😅

And yes, I tested it locally now it builds. 👍

Thanks for the help! 🙌

Thank you for the help and no you did not get it wrong (that's why I did strikethrough my original message).

It wasn't working because the tiny usb config settings (for whatever reason) are always present, but are either equal to 0 or to 1, so I had to fix the #idfef to just #if.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants