{"id":166,"date":"2024-11-04T19:30:17","date_gmt":"2024-11-04T11:30:17","guid":{"rendered":"https:\/\/aimc.skyate.com\/?p=166"},"modified":"2024-11-04T19:30:17","modified_gmt":"2024-11-04T11:30:17","slug":"esp32-s3-%e4%bd%bf%e7%94%a8usb-cdc%e4%b8%8b%e8%bd%bd%e7%a8%8b%e5%ba%8f%e3%80%81%e8%b0%83%e8%af%95","status":"publish","type":"post","link":"https:\/\/aimc.skyate.com\/index.php\/2024\/11\/04\/esp32-s3-%e4%bd%bf%e7%94%a8usb-cdc%e4%b8%8b%e8%bd%bd%e7%a8%8b%e5%ba%8f%e3%80%81%e8%b0%83%e8%af%95\/","title":{"rendered":"ESP32-S3 \u4f7f\u7528USB CDC\u4e0b\u8f7d\u7a0b\u5e8f\u3001\u8c03\u8bd5"},"content":{"rendered":"\n<p>\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5728Windows10\u73af\u5883\u4e0b\u4e3aESP32-S3\u5b89\u88c5USB\u9a71\u52a8\uff0c\u5305\u62ec\u4f7f\u7528Zadig\u5de5\u5177\u914d\u7f6eUSBCDC\u548clibusbK\u9a71\u52a8\uff0c\u4ee5\u53ca\u5982\u4f55\u5728Platformio\u5de5\u7a0b\u4e2d\u542f\u7528USBCDC\u4e0b\u8f7d\u548c\u8c03\u8bd5\u529f\u80fd\u3002\u4f5c\u8005\u8fd8\u5206\u4eab\u4e86\u76f8\u5173\u53c2\u8003\u8d44\u6599\u94fe\u63a5\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>esp32-s3\u6709\u4e00\u4e2abuilt-in\u7684usb-jtag\uff0c\u53ef\u4ee5\u7528\u6765\u4e0b\u8f7d\u3001\u8c03\u8bd5\u3001\u6253\u5370\u65e5\u5fd7\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\uff08\u4e00\uff09\u4e3a\u7535\u8111\u5b89\u88c5USB\u9a71\u52a8<\/h1>\n\n\n\n<p>\uff081\uff09\u9700\u8981\u7528\u4e00\u4e2a\u8f6f\u4ef6\uff1a<a href=\"https:\/\/zadig.akeo.ie\/\">Zadig<\/a>\uff0c\u6765\u4e3a\u7535\u8111\u5b89\u88c5\u9a71\u52a8\uff0c\u4f5c\u7528\u5c31\u662f\u70e7\u5f55\u65f6\uff0c\u8f6f\u4ef6\u80fd\u591f\u8bc6\u522b\u5230\u3002\u5b89\u88c5\u5b8c\u6210\u540e\u53cc\u51fb\u6253\u5f00\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"447\" src=\"https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-1024x447.png\" alt=\"\" class=\"wp-image-167\" srcset=\"https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-1024x447.png 1024w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-300x131.png 300w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-768x335.png 768w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image.png 1151w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\uff082\uff09\u5728\u3010Options\u3011\u83dc\u5355\u4e2d\u52fe\u9009\u3010List All Devices\u3011<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"454\" src=\"https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-1-1024x454.png\" alt=\"\" class=\"wp-image-168\" srcset=\"https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-1-1024x454.png 1024w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-1-300x133.png 300w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-1-768x340.png 768w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-1.png 1178w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u6b64\u65f6\u4e3b\u4e0b\u62c9\u83dc\u5355\u4e2d\u4f1a\u51fa\u73b0\u6240\u6709USB\u8bbe\u5907\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"478\" src=\"https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-2-1024x478.png\" alt=\"\" class=\"wp-image-169\" srcset=\"https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-2-1024x478.png 1024w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-2-300x140.png 300w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-2-768x358.png 768w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-2.png 1189w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\uff083\uff09\u5982\u679c\u548c\u6211\u7684\u622a\u56fe\u4e00\u6837\u662f<strong>USB JTAG\/serial debug unit (Interface 0)<\/strong>\uff0c\u8bf7\u8df3\u8f6c\u81f3\uff08\uff09\u6b65\uff0c\u5982\u679c\u53ea\u663e\u793a <\/p>\n\n\n\n<p>\u3010Espressif XXX USB CDC xxx\u3011\uff0c\u5148\u9009\u4e2d\u8be5\u8bbe\u5907\u3002\u6309\u4e0b\u56fe\u8bbe\u7f6eUSB \u7c7b\u578b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"454\" src=\"https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-3-1024x454.png\" alt=\"\" class=\"wp-image-170\" srcset=\"https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-3-1024x454.png 1024w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-3-300x133.png 300w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-3-768x340.png 768w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-3.png 1178w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\uff084\uff09\u70b9\u51fb\u3010Upgrade Driver\u3011\uff0c\u7b49\u5f85\u51e0\u5206\u949f\uff0c\u663e\u793a\u5b8c\u6210\u3002<\/p>\n\n\n\n<p>\uff085\uff09\u62d4\u6389\u8bbe\u5907\u540e\uff0c\u91cd\u65b0\u8fde\u63a5\u3002\u7136\u540e\u56de\u5230Zadig\u91cc\u9762\uff0c\u4e0b\u62c9\u9009\u62e9\u3010<strong>USB JTAG\/serial debug unit (Interface 0)<\/strong>\u3011\uff0c\u5e76\u4e14\u9009\u62e9\u65b0\u7684\u9a71\u52a8\u4e3a<strong>USB Serial\uff08CDC\uff09<\/strong>\u2014\uff08Communication Device Class)\uff0c\u70b9\u51fb\u66f4\u65b0\/\u5b89\u88c5\u9a71\u52a8\uff0c\u7b49\u5f85\u7ed3\u675f<\/p>\n\n\n\n<p>\uff086\uff09\u7136\u540e\uff0c\u518d\u9009\u62e9<strong>USB JTAG\/serial debug unit (Interface 2)<\/strong>\uff0c\u65b0\u9a71\u52a8\u9009\u62e9\u4e3a<strong>libusbK<\/strong>\uff0c\u7136\u540e\u70b9\u66f4\u65b0\uff0c\u7b49\u5f85\u7ed3\u675f\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\uff08\u4e8c\uff09Platformio\u5de5\u7a0b<\/h1>\n\n\n\n<p>\u65b0\u5efa\u597d\u5de5\u7a0b\u540e\uff0c\u5728\u3010platformio.ini\u3011\u6587\u4ef6\u91cc\u9762\uff0c\u8fd9\u91cc\u6211\u9996\u5148\u9009\u62e9\u4e32\u53e3monitor\u7684\u901f\u5ea6\u4e3a115200\uff08\u81ea\u5b9a\uff09\uff1b<strong>\uff08\u6ce8\u610f\uff1a\u5728ESP32-S3\u4f7f\u7528Arduino\u7684api\u65f6\uff0c\u5982\u679c\u4f7f\u7528\u7684\u662f\u6b63\u5e38\u4e32\u53e3\u6253\u5370\uff0c\u4e5f\u5c31\u662fTXD&amp;RXD\u7684\u8bdd\uff0c\u8981\u7528Serial0.print\u624d\u80fd\u6b63\u5e38\u6253\u5370\uff1b\u800c\u4f7f\u7528USB CDC\u65f6\uff0c\u8981\u4f7f\u7528Serial.print\u624d\u80fd\u6253\u5370\uff09<\/strong><\/p>\n\n\n\n<p>\u7136\u540e\uff0c\u4e3a\u4e86\u4f7f\u80fdUSB CDC\u4e0b\u8f7d\uff0c\u9700\u8981\u5728platformio.ini\u6587\u4ef6\u91cc\u6dfb\u52a0\u7f16\u8bd1\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>build_flags = -DARDUINO_USB_CDC_ON_BOOT=1   ; Enable USB CDC\n              -DCORE_DEBUG_LEVEL=1  ; Set debug level<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"511\" src=\"https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-4-1024x511.png\" alt=\"\" class=\"wp-image-171\" srcset=\"https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-4-1024x511.png 1024w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-4-300x150.png 300w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-4-768x383.png 768w, https:\/\/aimc.skyate.com\/wp-content\/uploads\/2024\/11\/image-4.png 1262w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u6700\u540e\u5c31\u53ef\u4ee5\u76f4\u63a5\u7f16\u8bd1\u4e0b\u8f7d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5728Windows10\u73af\u5883\u4e0b\u4e3aESP32-S3\u5b89\u88c5USB\u9a71\u52a8\uff0c\u5305\u62ec\u4f7f\u7528Zadig\u5de5\u5177\u914d\u7f6eUSBCD [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":171,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[55,46,53,52,54],"class_list":["post-166","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp32_arduino","tag-arduino","tag-esp32","tag-esp32-s3","tag-usb-cdc","tag-54"],"_links":{"self":[{"href":"https:\/\/aimc.skyate.com\/index.php\/wp-json\/wp\/v2\/posts\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aimc.skyate.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aimc.skyate.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aimc.skyate.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aimc.skyate.com\/index.php\/wp-json\/wp\/v2\/comments?post=166"}],"version-history":[{"count":1,"href":"https:\/\/aimc.skyate.com\/index.php\/wp-json\/wp\/v2\/posts\/166\/revisions"}],"predecessor-version":[{"id":172,"href":"https:\/\/aimc.skyate.com\/index.php\/wp-json\/wp\/v2\/posts\/166\/revisions\/172"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aimc.skyate.com\/index.php\/wp-json\/wp\/v2\/media\/171"}],"wp:attachment":[{"href":"https:\/\/aimc.skyate.com\/index.php\/wp-json\/wp\/v2\/media?parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aimc.skyate.com\/index.php\/wp-json\/wp\/v2\/categories?post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aimc.skyate.com\/index.php\/wp-json\/wp\/v2\/tags?post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}