栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Ubuntu OpenOCD communicating with FT2232H

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Ubuntu OpenOCD communicating with FT2232H

Ubuntu OpenOCD communicating with FT2232H
    • dependencies
    • Installing OpenOCD on Ubuntu
    • Communicating with FT2232H

dependencies
  1. ubuntu 系统 + 安装openocd
  2. OpenOCD User’s Guide
Installing OpenOCD on Ubuntu

注: 本次实验中使用的系统为ubuntu 20.04

  • ubuntu 20.04 安装 openocd version 0.10.0 (偷懒式安装) , 最新版本为version 0.11
$ sudo apt-get install openocd
  • 查看openocd安装版本以及安装路径
$ openocd -v
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.org/doc/doxygen/bugs.html

$ dpkg -S openocd
openocd: /usr/share/openocd/scripts/chip/st/stm32/stm32_rcc.tcl
openocd: /usr/share/openocd/scripts/target/test_syntax_error.cfg
openocd: /usr/share/doc/openocd/loaders/flash/fm4/Makefile
openocd: /usr/share/doc/openocd/loaders/flash/xmc1xxx/xmc1xxx.S
openocd: /usr/share/openocd/scripts/board/keil_mcb1700.cfg
openocd: /usr/share/openocd/scripts/target/lpc2148.cfg
openocd: /usr/share/openocd/scripts/target/kl25z_hla.cfg
openocd: /usr/share/openocd/scripts/target/fm4_s6e2cc.cfg
openocd: /usr/share/doc/openocd/loaders/watchdog/armv7m_kinetis_wdog.inc
openocd: /usr/share/openocd/scripts/target/at91sam3nXX.cfg
openocd: /usr/share/doc/openocd/loaders/flash/xmc1xxx/erase.inc
openocd: /usr/share/openocd/scripts/interface/ftdi/luminary-lm3s811.cfg
openocd: /usr/share/openocd/scripts/target/lpc4370.cfg
openocd: /usr/share/info/openocd.info-1.gz
openocd: /usr/share/openocd/scripts/board/ek-lm3s9b9x.cfg
openocd: /usr/share/openocd/scripts/cpu/arm/arm7tdmi.tcl
....
  • 连接FT2232H适配器,输入lsusb看到 ****Ltd FT2232C/D/H ****
$ lsusb 
Bus 001 Device 009: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC
  • 或连接FT2232H适配器,输入dmesg
$ dmesg
......
[82466.144555] usb 1-1: Detected FT2232H
[82466.164331] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0
[82466.186438] ftdi_sio 1-1:1.1: FTDI USB Serial Device converter detected
[82466.186538] usb 1-1: Detected FT2232H
[82466.204076] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB1
[82974.227511] ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1
Communicating with FT2232H

注: OpenOCD v0.11.0 与 OpenOCD v0.10.0由些许命令不一样会报错!!!!!!

标准冒烟测试——点灯:通过OpenOCD的配置文件点亮,FT2232H硬件板上的led灯。

在ubuntu终端输入,openocd -f openocd.cfg,即可点亮两颗LED(原理图见FT2232H入门)。

# openocd.cfg

interface ftdi
ftdi_vid_pid 0x0403 0x6010

# ftdi_channel 0 is port ADBUS, ftdi_channel 1 is port BDBUS.
ftdi_channel 1

# transport select transport_name
# Select which of the supported transports to use in this OpenOCD session
transport select jtag
adapter_khz 1000

# ftdi_layout_init data direction
# Specifies the initial values of the FTDI GPIO data and direction registers
ftdi_layout_init 0x00F8 0x00fb


ftdi_layout_signal nSRST -oe 0x0040
ftdi_layout_signal ntRST -oe 0x0010
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/890480.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号