前言
之前一直在windows上開發STM32的單片機,用的工具是IAR,調試工具是J-link。但是之前用過一段linux,不想荒廢linux的使用,所以在開發上轉到Ubuntu試試。
問題
首先是參照前人的帖子進行環境搭建帖子如下:《Ubuntu+Stm32cubeMX+vscode+stlink開發》
https://blog.csdn.net/lanqilovezs/article/details/80657911
但是在安裝過程第二步安裝openocd時出現了問題 git://git.code.sf.net/p/openocd/code 無法從git 倉庫下載,便從github上將openocd-master的包下載下來。
將軟件包解壓后,進入openocd-master目錄, 執行:./bootstrap
結果出現了stopping at filesystem boundary...
我沒去理會它,繼續下一步:./configure
結果出現了configure:error:jimtcl not found...
jimtcl目錄下是空的。
解決
在readme文檔中,我看到了:
You can download the current GIT version with a GIT client of your
choice from the main repository:
git://git.code.sf.net/p/openocd/code
You may prefer to use a mirror:
http://repo.or.cz/r/openocd.git
git://repo.or.cz/openocd.git
所以我執行:git clong git://repo.or.cz/openocd.git
這樣就把openocd的包git下來了。
然后執行:make & sudo make install
安裝完成。
編輯日期:2019.4.28 在ubuntu18.04。