需要安裝軟件:
1.cygwin 實現make功能
2.GNU Arm Embedded Toolchain Cortex-M編譯工具鏈
3.VS code 編輯代碼。
一、安裝Cygwin
1.下載Cygwin setup-x86_64.exe :https://www.cygwin.com/
2.安裝Cygwin
注意必選工具包:
要新增工具包只要重新運行一下setup-x86_64.exe
裝完後試試make指令,出現下圖表明make能用了
二、安裝GNU Arm Embedded Toolchain
1.下載GNU Arm Embedded Toolchain
2.安裝GNU Arm Embedded Toolchain
運行gcc-arm-none-eabi-9-2019-q4-major-win32.exe即可安裝。
3.添加到系統環境變量
把Cygwin和gcc-arm-none-eabi的bin文件夾路徑都加進去
4.測試arm-none-eabi-gcc -v
三、安裝Visual Studio Code
1.下載Visual Studio Code https://code.visualstudio.com/
2.安裝
3.用Visual Studio Code打開Makefile工程文件夾
4.修改Visual Studio Code 終端爲bash.exe
5.打開終端,這裏的終端已經從cmd.exe或者poweshell.exe變成了bash.exe
6.make, 應該可以編譯了