这篇文章介绍了如何使用USB串口来调试嵌入式设备。
1)查看USB串口信息
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
$ lsusb
2019-11-05 14:40:32.745 system_profiler[93235:18494963] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
USB:
USB 3.0 Bus:
Host Controller Driver: AppleUSBXHCILPTH
PCI Device ID: 0x8c31
PCI Revision ID: 0x0005
PCI Vendor ID: 0x8086
CP2102 USB to UART Bridge Controller:
Product ID: 0xea60
Vendor ID: 0x10c4 (Silicon Laboratories, Inc.)
Version: 1.00
Serial Number: 0001
Speed: Up to 12 Mb/sec
Manufacturer: Silicon Labs
Location ID: 0x14200000 / 22
Current Available (mA): 500
Current Required (mA): 100
Extra Operating Current (mA): 0
|
2)安装串口驱动
驱动下载:https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers#mac
具体链接:https://www.silabs.com/documents/public/software/Mac_OSX_VCP_Driver.zip
1
2
3
|
$ ls /dev/tty.*
# ... 将看到
/dev/tty.SLAB_USBtoUART
|
3)安装串口工具
可以选择minicom和coolterm,熟悉命令行操作的可以使用minicom,这里使用coolterm有界面的
1
|
brew cask install coolterm
|
PS: 我这里的情况是只需接入RX、TX和GND即可。
PS:根据自己的需求设定好串口参数。
记得勾选**“Connect”**
顺利接入: