之前是使用stlinkv2作為下載工具
現在則是可以免用stlinkv2
1.使用st-flash 安裝bootloader
如何使用st-flash
https://github.com/texane/stlink/blob/master/doc/man/st-flash.md
st-flash write firmware.bin 0x8000000
bin檔所在位置這裡有說明
http://wiki.stm32duino.com/index.php?title=Burning_the_bootloader
裡面會提到如何在f103系列上燒錄bootloader
bootloader是一個名為
generic_boot20_pb12.bin
的檔案
來源自:
https://github.com/rogerclarkmelbourne/STM32duino-bootloader
2.在arduino ide設定新板子
https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json
在板子管理員選擇安裝一個名為STM32 Core的管理員
還在測試,還沒成功
目前無法從arudino ide透過serial上傳
板子管理員有更新,更新後再測試
這裡指出應該是因為在mac的環境造成底層韌體無法設定造成stm32flash報錯
https://sourceforge.net/p/stm32flash/tickets/68/
以下是確定會動的步驟
目前在windows10電腦測試可以,可以用STM32F103的USB當作BOOTLOADER
原來我裝的板子管理員跟我看的stm32duino是兩個不一樣的東西
要這個傢伙的兩個專案 搭配使用
https://github.com/rogerclarkmelbourne
步驟:
1.先在STM32F103板子上安裝BOOTLOADER
位置就是上述的
https://github.com/rogerclarkmelbourne/STM32duino-bootloader
目前無法從arudino ide透過serial上傳
板子管理員有更新,更新後再測試
這裡指出應該是因為在mac的環境造成底層韌體無法設定造成stm32flash報錯
https://sourceforge.net/p/stm32flash/tickets/68/
以下是確定會動的步驟
目前在windows10電腦測試可以,可以用STM32F103的USB當作BOOTLOADER
原來我裝的板子管理員跟我看的stm32duino是兩個不一樣的東西
要這個傢伙的兩個專案 搭配使用
https://github.com/rogerclarkmelbourne
步驟:
1.先在STM32F103板子上安裝BOOTLOADER
位置就是上述的
https://github.com/rogerclarkmelbourne/STM32duino-bootloader
檔名內的接腳編號是指LED所在位置
2.在ARDUINO IDE板子管理員找到並安裝 Arduino SAM Boards By Arduino 包含 Arduino Due
3.安裝bootloader的usb裝置驅動
https://wiki.stm32duino.com/index.php?title=Windows_driver_installation
其實就是註冊個名字,好讓裝置管理員可以辨識
4.關於Arduin IDE的板子管理員新增方法必須手動,詳情看這裡
https://wiki.stm32duino.com/index.php?title=Installation
前面提到新增板子的方法不是stm32duino設計的,結果會造成 上傳方法 裡面沒有 stm32cuino bootloader這個選項,以至於無法上傳
5.接著重新啟動Arudino IDE後就可以選擇正確的板子以及設定stm32duino bootloader上傳方法,進行編譯與上傳了
沒有留言:
張貼留言