參考文獻 [https://beta.hackfoldr.org/arm/https%253A%252F%252Fdocs.google.com%252Fdocument%252Fd%252F1Ygl6cEGPXUffhTJE0K6B8zEtGmIuIdCjlZBkFlijUaE%252Fedit](https://) [https://launchpad.net/~team-gcc-arm-embedded/+archive/ubuntu/ppa](https://) [https://blog.csdn.net/qq_40839071/article/details/114700646](https://) [https://installati.one/install-openocd-ubuntu-20-04/](https://) [https://blog.csdn.net/wxh0000mm/article/details/108583496](https://) ## 安裝編譯器 ``` sudo apt-get install gcc-arm-none-eabi arm-none-eabi-gcc -v ``` ## 安裝工具 ``` mkdir ~/temp/stm32/ -p cd ~/temp/stm32/ sudo apt-get install build-essential pkg-config autoconf automake libtool libusb-1.0-0 libusb-1.0-0-dev libhiapi-dev texinfo sudo apt-get install libtool libsysfs-dev ``` ## 安裝OpenOCD ``` mkdir -p ~/temp/stm32/stm32-tools cd ~/temp/stm32/stm32-tools git clone git://git.code.sf.net/p/openocd/code OpenOCD cd OpenOCD ./bootstrap ./configure --enable-ftdi make sudo make install which openocd openocd -v ```