ESP32-S2 USB Host CDC问题
Posted: Thu Jul 08, 2021 1:31 am
请问有ESP32-S2作为USB host来驱动CDC类型设备或者RNDIS设备的例程吗?急需,万分感谢!
收到,非常非常感谢。qljz1993 wrote: ↑Fri Jul 09, 2021 12:54 pmUSB Host CDC 驱动 4G Cat.1 示例代码下周会同步到:https://github.com/espressif/esp-iot-so ... onents/usb
收到,非常非常感谢!
Code: Select all
pare -ggdb -Og -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.3\" -DESP_PLATFORM -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -MF esp-idf\main\CMakeFiles\__idf_main.dir\main.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -c ../main/main.c
../main/main.c:19:10: fatal error: hal/usbh_ll.h: No such file or directory
#include "hal/usbh_ll.h"
^~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
请问什么时候可以同步代码,谢谢qljz1993 wrote: ↑Fri Jul 09, 2021 12:54 pmUSB Host CDC 驱动 4G Cat.1 示例代码下周会同步到:https://github.com/espressif/esp-iot-so ... onents/usb
Update esp-idf with submodules to latest master.lightsaltsign wrote: ↑Fri Jul 16, 2021 12:40 pmbuild error when I put project esp32-s2-usb-host-cdc into "\Users\admin\Desktop\esp-idf-2\examples\peripherals\usb\", esp-idf 4.3 with Windows 10
can you help me , thanksCode: Select all
pare -ggdb -Og -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.3\" -DESP_PLATFORM -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -MF esp-idf\main\CMakeFiles\__idf_main.dir\main.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -c ../main/main.c ../main/main.c:19:10: fatal error: hal/usbh_ll.h: No such file or directory #include "hal/usbh_ll.h" ^~~~~~~~~~~~~~~ compilation terminated. ninja: build stopped: subcommand failed. ninja failed with exit code 1
chegewara wrote: ↑Fri Jul 16, 2021 4:51 pmUpdate esp-idf with submodules to latest master.lightsaltsign wrote: ↑Fri Jul 16, 2021 12:40 pmbuild error when I put project esp32-s2-usb-host-cdc into "\Users\admin\Desktop\esp-idf-2\examples\peripherals\usb\", esp-idf 4.3 with Windows 10
can you help me , thanksCode: Select all
pare -ggdb -Og -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.3\" -DESP_PLATFORM -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -MF esp-idf\main\CMakeFiles\__idf_main.dir\main.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -c ../main/main.c ../main/main.c:19:10: fatal error: hal/usbh_ll.h: No such file or directory #include "hal/usbh_ll.h" ^~~~~~~~~~~~~~~ compilation terminated. ninja: build stopped: subcommand failed. ninja failed with exit code 1
Code: Select all
admin@DESKTOP-4HNA0MD MINGW64 ~/Desktop/esp-idf-2 (master)
$ git branch -v
* master f45b60b28 Merge branch 'bugfix/esp_prov_default_pop' into 'master'
Code: Select all
../components/usb/hcd.c: In function '_intr_hdlr_chan':
../components/usb/hcd.c:637:14: error: 'USBH_HAL_CHAN_EVENT_SLOT_DONE' undeclared (first use in this function); did you mean 'USBH_HAL_CHAN_EVENT_NONE'?
case USBH_HAL_CHAN_EVENT_SLOT_DONE: {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
USBH_HAL_CHAN_EVENT_NONE
../components/usb/hcd.c:637:14: note: each undeclared identifier is reported only once for each function it appears in
../components/usb/hcd.c:662:17: error: too few arguments to function 'usbh_hal_chan_activate'
usbh_hal_chan_activate(chan_obj, 0); //Start with the first descriptor
^~~~~~~~~~~~~~~~~~~~~~
In file included from ../components/usb/hcd.c:25:
C:/Users/admin/Desktop/esp-idf-2/components/hal/include/hal/usbh_hal.h:660:6: note: declared here
void usbh_hal_chan_activate(usbh_hal_chan_t *chan_obj, void *xfer_desc_list, int desc_list_len, int start_idx);
lightsaltsign wrote: ↑Mon Jul 19, 2021 6:36 amchegewara wrote: ↑Fri Jul 16, 2021 4:51 pmUpdate esp-idf with submodules to latest master.lightsaltsign wrote: ↑Fri Jul 16, 2021 12:40 pmbuild error when I put project esp32-s2-usb-host-cdc into "\Users\admin\Desktop\esp-idf-2\examples\peripherals\usb\", esp-idf 4.3 with Windows 10
can you help me , thanksCode: Select all
pare -ggdb -Og -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.3\" -DESP_PLATFORM -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -MF esp-idf\main\CMakeFiles\__idf_main.dir\main.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -c ../main/main.c ../main/main.c:19:10: fatal error: hal/usbh_ll.h: No such file or directory #include "hal/usbh_ll.h" ^~~~~~~~~~~~~~~ compilation terminated. ninja: build stopped: subcommand failed. ninja failed with exit code 1
Hi chegewara,
I have update esp-idf with submodules to latest master,
steps as below:
1. git checkmaster, git submodule update --init --recursive
2. put project esp32-s2-usb-host-cdc into "\Users\admin\Desktop\esp-idf-2\examples\peripherals\usb\
3. idf.py set-target esp32s2
4. idf.py build
a new build error comes up,Code: Select all
admin@DESKTOP-4HNA0MD MINGW64 ~/Desktop/esp-idf-2 (master) $ git branch -v * master f45b60b28 Merge branch 'bugfix/esp_prov_default_pop' into 'master'
Code: Select all
../components/usb/hcd.c: In function '_intr_hdlr_chan': ../components/usb/hcd.c:637:14: error: 'USBH_HAL_CHAN_EVENT_SLOT_DONE' undeclared (first use in this function); did you mean 'USBH_HAL_CHAN_EVENT_NONE'? case USBH_HAL_CHAN_EVENT_SLOT_DONE: { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ USBH_HAL_CHAN_EVENT_NONE ../components/usb/hcd.c:637:14: note: each undeclared identifier is reported only once for each function it appears in ../components/usb/hcd.c:662:17: error: too few arguments to function 'usbh_hal_chan_activate' usbh_hal_chan_activate(chan_obj, 0); //Start with the first descriptor ^~~~~~~~~~~~~~~~~~~~~~ In file included from ../components/usb/hcd.c:25: C:/Users/admin/Desktop/esp-idf-2/components/hal/include/hal/usbh_hal.h:660:6: note: declared here void usbh_hal_chan_activate(usbh_hal_chan_t *chan_obj, void *xfer_desc_list, int desc_list_len, int start_idx);
Code: Select all
obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/cdc_class.c.obj -c ../main/cdc_class.c
In file included from ../components/usb/private_include/hcd.h:25,
from ../main/common.h:15,
from ../main/cdc_class.c:3:
../components/usb/private_include/usb.h:45:5: error: redeclaration of enumerator 'USB_SPEED_LOW'
USB_SPEED_LOW = 0, /**< USB Low Speed (1.5 Mbit/s) */
^~~~~~~~~~~~~
In file included from ../../../../../components/hal/esp32s2/include/hal/usbh_ll.h:25,
from ../main/common.h:14,
from ../main/cdc_class.c:3:
../../../../../components/hal/include/hal/usb_types.h:55:5: note: previous definition of 'USB_SPEED_LOW' was here
USB_SPEED_LOW = 0, /**< USB Low Speed (1.5 Mbit/s) */
^~~~~~~~~~~~~
In file included from ../components/usb/private_include/hcd.h:25,
from ../main/common.h:15,
from ../main/cdc_class.c:3:
../components/usb/private_include/usb.h:46:5: error: redeclaration of enumerator 'USB_SPEED_FULL'
USB_SPEED_FULL, /**< USB Full Speed (12 Mbit/s) */