seeed-studio / seeed_arduino_daplink Goto Github PK
View Code? Open in Web Editor NEWAn open-source DAPLink Arduino Library supports Keil MDK, IAR Embedded Workbench, OpenOCD, and other commonly used IDE.
License: MIT License
An open-source DAPLink Arduino Library supports Keil MDK, IAR Embedded Workbench, OpenOCD, and other commonly used IDE.
License: MIT License
Describe the bug
Seeed_Arduino_DAPLink sketch fails to locate Adafruit_USBD_CDC
To Reproduce
Steps to reproduce the behavior:
As per https://wiki.seeedstudio.com/Arduino-DAPLink/#get-started,
simple_daplink.ino
exampleExpected behavior
Successful build.
Screenshots
FQBN: Seeeduino:samd:seeed_XIAO_m0:usbstack=tinyusb
Using board 'seeed_XIAO_m0' from platform in folder: /home/user/.arduino15/packages/Seeeduino/hardware/samd/1.8.4
Using core 'arduino' from platform in folder: /home/user/.arduino15/packages/Seeeduino/hardware/samd/1.8.4
Detecting libraries used...
/home/user/.arduino15/packages/Seeeduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions "-D__SKETCH_NAME__=\"\"\"simple_daplink.ino\"\"\"" -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SEEED_XIAO_M0 -DARDUINO_ARCH_SAMD -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed\"" "-DUSB_PRODUCT=\"Seeed XIAO M0\"" -DUSE_TINYUSB -I/home/user/.arduino15/packages/Seeeduino/hardware/samd/1.8.4/libraries/Adafruit_TinyUSB_Arduino/src/arduino -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed\"" "-DUSB_PRODUCT=\"Seeed XIAO M0\"" -DUSE_TINYUSB -I/home/user/.arduino15/packages/Seeeduino/hardware/samd/1.8.4/libraries/Adafruit_TinyUSB_Arduino/src/arduino -I/home/user/.arduino15/packages/Seeeduino/tools/CMSIS/5.7.0/CMSIS/Core/Include/ -I/home/user/.arduino15/packages/Seeeduino/tools/CMSIS/5.7.0/CMSIS/DSP/Include/ -I/home/user/.arduino15/packages/Seeeduino/tools/CMSIS-Atmel/1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/ -I/home/user/.arduino15/packages/Seeeduino/hardware/samd/1.8.4/cores/arduino -I/home/user/.arduino15/packages/Seeeduino/hardware/samd/1.8.4/variants/XIAO_m0 /tmp/arduino/sketches/8C3F227C6F91D139372E1DBBF6830BE9/sketch/simple_daplink.ino.cpp -o /dev/null
In file included from /tmp/arduino/sketches/8C3F227C6F91D139372E1DBBF6830BE9/sketch/simple_daplink.ino.cpp:1:0:
/home/user/.arduino15/packages/Seeeduino/hardware/samd/1.8.4/cores/arduino/Arduino.h:173:10: fatal error: Adafruit_USBD_CDC.h: No such file or directory
#include "Adafruit_USBD_CDC.h"
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Alternatives for Adafruit_USBD_CDC.h: []
ResolveLibrary(Adafruit_USBD_CDC.h)
-> candidates: []
exit status 1
Compilation error: exit status 1
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
I’m trying to compile “simple_daplink” refer to "How to use Arduino Boards as DAPLink Device", but I’m having trouble getting the following compilation error. The library I’m using are “Adafruit_TinyUSB_Arduino-1.7.1” and “Seeed_Arduino_DAPLink-1.0.2”.
Can anyone help me?
........
........
Error while detecting libraries included by C:\Users\username\Documents\Arduino\libraries\Adafruit_TinyUSB_Arduino-1.7.1\src\class\msc\msc_device.c
........
........
Error while detecting libraries included by C:\Users\username\Documents\Arduino\libraries\Adafruit_TinyUSB_Arduino-1.7.1\src\device\usbd_control.c
........
........
exit status 1
cannot declare variable 'usb_hid' to be of abstract type 'Adafruit_USBD_HID'
How to use the Xiao M0 programmed as DAP-Link probe to debug against the Xiao nRF52840?
Thank you!
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Follow this guide.
https://wiki.seeedstudio.com/Arduino-DAPLink/#2-installing-the-adafruit_tinyusb_arduino-library
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
在arduino ide1.8.15上面安装好最新的seeed开发板库,然后添加tinyusb库和这个库,然后按照seeed里面如何制作daplink的文章配置IDE结果编译完成后报错,如下:
simple_daplink:58:19: error: cannot declare variable 'usb_hid' to be of abstract type 'Adafruit_USBD_HID'
Adafruit_USBD_HID usb_hid;
^~~~~~~
In file included from C:\Users\cheng\Documents\Arduino\libraries\Adafruit_TinyUSB_Arduino-master\src/Adafruit_TinyUSB.h:40:0,
from C:\Users\cheng\AppData\Local\Temp\arduino_modified_sketch_479677\simple_daplink.ino:46:
C:\Users\cheng\Documents\Arduino\libraries\Adafruit_TinyUSB_Arduino-master\src/arduino/hid/Adafruit_USBD_HID.h:30:7: note: because the following virtual functions are pure within 'Adafruit_USBD_HID':
class Adafruit_USBD_HID : public Adafruit_USBD_Interface {
^~~~~~~~~~~~~~~~~
In file included from C:\Users\cheng\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/Adafruit_TinyUSB_Core.h:35:0,
from C:\Users\cheng\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/Arduino.h:171,
from C:\Users\cheng\AppData\Local\Temp\arduino_build_309041\sketch\simple_daplink.ino.cpp:1:
C:\Users\cheng\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/Adafruit_USBD_Device.h:38:22: note: virtual uint16_t Adafruit_USBD_Interface::getDescriptor(uint8_t, uint8_t*, uint16_t)
virtual uint16_t getDescriptor(uint8_t itfnum, uint8_t* buf, uint16_t bufsize) = 0;
^~~~~~~~~~~~~
使用 1.0.3 版本的库 Adafruit_TinyUSB_Arduino-master 在文件夹: C:\Users\cheng\Documents\Arduino\libraries\Adafruit_TinyUSB_Arduino-master
使用 1.0.2 版本的库 Seeed_Arduino_DAPLink-master 在文件夹: C:\Users\cheng\Documents\Arduino\libraries\Seeed_Arduino_DAPLink-master
exit status 1
cannot declare variable 'usb_hid' to be of abstract type 'Adafruit_USBD_HID'
请帮忙看下这个是什么原因造成的,谢谢啦。
When running the daplink_v2.ino example, Windows 10 does not find a driver to use with the adapter. See my screenshot below. My understanding is that DAPLink V2 should use WinUSB driver, however it doesn't seem like the WCID for WinUSB is included in the USB descriptors to facilitate the automatic association with the driver.
Furthermore, when I force WinUSB driver (v6.1.7600.16385) to be associated with the device using Zadig, it still cannot be discovered by pyOCD or other tools.
Can you either provide additional details necessary to getting the daplink_v2.ino firmware to work with Windows or help to identify what might be causing this? I've spent a bit of time debugging myself but haven't been able to find the source of the problem.
Note that the simple_daplink.ino example is working fine, no driver issues, and can easily be discovered by pyOCD and used within my toolchains.
Screenshots
Windows Device Manager upon device plug-in:
Zadig doesn't see the WCID descriptor or driver either:
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.