Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Openocd0.10 installation configuration-for Baiwen openjtag

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Reference:

[1] http://www.eefocus.com/fhq1989312/blog/12-04/247353_1c4c2.html

The reference article explains how to determine the type of emulator (whether it is ft2232 or not) and the installation of drivers and libusb libraries, as well as the parameters that need to be added at compile time. / configure.

The following is the reprinted content:

From the above information, we can see that the core chip of the openjtag should be the FT2232C provided by FTDI, as well as some related information.

To see more detailed information about this USB openjtag, we can execute the following command $lsusb to view brief information about the device

My computer got the following information

Bus 006 Device 002: ID 1457 First International Computer, Inc. OpenMoko Neo1973 Debug board (V2 +)

To get more detailed information, we can use the following command

$sudo lsusb-v-D / dev/bus/006/002 (explanation: sudo is necessary, because some operations to access usb require superuser permissions, and the use of lsusb can be viewed using man lsusb. 006 corresponds to bus 006,002 corresponds to Device 002)

For more information, I will only intercept some key information as follows

IdVendor 0x1457 First International Computer, Inc.

IdProduct 0x5118 OpenMoko Neo1973 Debug board (V2 +)

IManufacturer 1 www.100ask.net

IProduct 2 USBJTAG&RS232

IInterface 2 USBJTAG&RS232

Now that we know that this openjtag tool uses a chip from ftdi, of course, we need to add some relevant configuration options to support ftdi tools when configuring the configuration script.

First of all, you need to get the drivers related to the chip, which can be downloaded from the following websites.

Http://www.ftdichip.com/Drivers/D2XX.htm

Http://www.intra2net.com/en/developer/libftdi/download.php

The way to get a stable version by direct apt-get (not the official driver of ftdi)

Sudo apt-get install libftdi-dev libftdi1 libtool git-core asciidoc

If the libftdi driver is obtained by direct apt-get acquisition, the configuration options of the configurator are as follows (for more information, please refer to the following website to implement http://fun-tech.se/stm32/OpenOCD/index.php)

About how to use the configurator, you can directly run the following command $. / configure-- help

. / configure-- enable-maintainer-mode\

-- enable-ft2232_libftdi

-- enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer adopts the most comfortable configuration

-- enable-ft2232_libftdi Enable building support for FT2232 based devices using the libftdi driver, opensource alternate of FTD2XX adopts FTD2XX open source driver solution

If you use the official FTDI driver, you can take the following ways (official driver)

Download the URL http://www.ftdichip.com/Drivers/D2XX.htm

After downloading the above driver, it will be named libftd2xx1.0.4.tar.gz

After decompression, copy both ftd2xx.h and WinTypes.h to the / usr/local/include/ directory, and establish soft links in the / usr/include/ directory (superuser permission is required), mainly because these header files are needed for make compilation.

First, enter the extracted directory of libftd2xx1.0.4.tar.gz and assume it is libftd2xx1.0.4.

Execute the following command

$sudo cp. / ftd2xxx.h / usr/local/include/ftd2xxx.h

$sudo cp. / WinTypes.h / usr/local/include/WinTypes.h

$sudo ln-s / usr/local/include/ftd2xx.h / usr/include/ftd2xx.h

$sudo ln-s / usr/local/include/WinTypes.h / usr/include/WinTypes.h

After execution, you can execute the following command (before entering the openocd source directory, assume that the folder of the ftdi driver file is located in the openocd source directory and the file name is libftd2xx1.0.4)

$. / configure-- enable-maintainer-mode\

-- enable-ft2232_ftd2xx\

-- with-ft2xx-linux-tardir=./libftd2xx1.0.4

-- enable-ft2232_ftd2xx Enable building support for FT2232 based devices the FTD2XX driver from ftdichip.com uses driver files provided by ftdichip

-- with-ft2xx-linux-tardir is followed by the driver file directory provided by ftdichip Company.

+ + +

My content

Note:

1. / configure-enable-maintainer-mode-enable-ft2232_libftdi-enable-maintainer-mode-enable-ftdi

-- enable-ftdi needs to be added to increase support for ftdi. The openocd0.10 version seems to be a native cfg file that does not have an ft2232 interface. When running openocd with a cfg file provided on the Internet, it will indicate that the ft2232 interface is not supported.

2.make will report an error: get_usb_busses related, actually caused by assignment type conversion, edit the Makefile generated by configure, delete-Werror and ok.

3. After the compilation and installation is complete, you can find the OPENOCD_DIR/tcl/interface/ask100.cfg configuration file and use it to launch:

Openocd-f OPENOCD_DIR/tcl/interface/ask100.cfg

Two errors are reported:

One is to prompt that the clock rate is not set, and add: jtag_rclk 500in the configuration file.

Second, the prompt did not set a what interface, do not remember clearly, prompted to choose jtag and swi two, follow the prompt to add settings for jtag in the configuration file

Execute openocd-f OPENOCD_DIR/tcl/interface/ask100.cfg again

Success.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report