OpenOCD のビルド : Windows 編
Windows 上で mingw64 版のビルドについてのみ記します
環境の準備
Msys2 のインストール
適宜インストールします。(省略)
当然 64bit 版を使います。
MSYS2 MSYS
MSYS2 MinGW 32-bit
MSYS2 MinGW 64-bit
の3種類がスタートメニューに追加されますが MinGW 64-bit を選択して下さい。

パッケージの追加
OpenOCD のビルドに必要なライブラリ等を追加します。
その前にアップデート
pacman -Syu

pacman -S git
git は git for windows 等の配布を利用した方がいいかもしれません。
pacman -S autoconf autoconf2.13 automake-wrapper
pacman -S libtool make pkg-config
pacman -S mingw-w64-x86_64-gcc
pacman -S mingw-w64-x86_64-hidapi mingw-w64-x86_64-libftdi mingw-w64-x86_64-libusb-compat-git
ソースの取得
対象のデバイスに合わせて取得元は変わって来る場合があります。アーカイブファイルとして提供されているものを使う必要があるかもしれません。
risc-v の場合 https://github.com/riscv/riscv-openocd.git
など
git clone --recurse-submodules https://git.code.sf.net/p/openocd/code OpenOCD-SourceForge
ビルド
bootstrap && configure
cd OpenOCD-SourceForge
./bootstrap
./configure
make
make -j
src の下に openocd.exe が作成されます。
最終更新
役に立ちましたか?