[STM32] [Mbed] 開發環境
開啟IDE
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 登錄帳號後,點擊帳戶icon左邊的「Complier」黃色方塊,進入mbed的線上IDE。
選擇要被燒錄的裝置型號
- 點擊IDE右上角的「No Device selected」,
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 點擊「Add Board」
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 搜尋列上打你手上板子的型號NUCLEO-F207ZG,搜尋後點擊搜尋結果的NUCLEO-F207ZG圖示。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 點擊頁面右方的「Add to your Mbed compiler」,匯入到IDE。回到IDE,再次選擇裝置NUCLEO-F207ZG,設定完成。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 另外在第4步驟的頁面,可以查看Board的型號、規格、Pinout等。之後再編程的時候,可在這裡查詢Pin腳的位置與代號。
新增專案(New Program)
新增檔案(New File)
匯入函式庫(Import Library)
- 在你的Program右鍵開啟選單,點選「Import Library」,IDE會幫你切換到搜尋Library的畫面。
- 在搜尋列打上要匯入的Library名稱,搜尋。
- 下方會出現搜尋結果,點選你要的Library。
- 按下「Import」。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 匯入成功後,可以在Program Workspace看到Library了
- 匯入mbed library後,在cpp文件中打上 #include "mbed.h",便能開始撰寫mbed程式了。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
燒錄(Compile and Setup)
#include "mbed.h"
int main()
{
printf("Hello My Darkness Friend");
}
-
程式碼完成後,點擊上方的「Compile」,如果沒有報錯的話,IDE會給你程式轉換後的二進位檔(.bin)的下載連結。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
將下載後的二進位檔,丟入到裝置內(跟你放東西到隨身碟一樣)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
程式燒入過程中,Board的LD4 LED會發彩虹光,等待變綠燈代表燒錄完畢。(板子不同可能就不是LD4)
Tera Term安裝(Mac電腦則安裝Screen coolterm minicom)
-
電腦沒「ST-Link」驅動程式則需要填寫信箱獲得下載連結,下載安裝驅動程式後重新開機。(沒安裝Tera Term無法獲得STM32板子的printf訊息)
-
下載並安裝tera term後,開啟tera term,點選Serial,選擇連接Board的COM。(不清楚哪個COM,可以在"你的作業系統/控制台/裝置管理員/連接阜查看")
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 如果沒安裝ST-Link驅動程式,會看不到COM的名稱
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
成功畫面 (゚∀゚)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →