LoginSignup
2
2

More than 5 years have passed since last update.

Particle Photonにdfu-utilを使ってファームウェアを書き込む方法

Posted at

Arduino互換機のParticle Photonに対してdfu-utilを使い、USBケーブル経由でファームウェアを書き込む方法の覚え書き。

dfu-utilのセットアップ

Mac OSXならHomebrewが便利。

$ brew update
$ brew install dfu-util

デバイスの接続と確認

Particle Photonを「DFUモード」にして、USBケーブルを使ってMacと接続します。
DFUモードにする方法はこちらを参照。
USBケーブルを接続したらdfu-util -lで認識されているかどうか確認します。以下は出力例。

$ dfu-util -l
dfu-util 0.8
...
Found DFU: [2b04:d006] ver=0200, devnum=8, cfg=1, intf=0, alt=1, name="@DCT Flash   /0x00000000/01*016Kg", serial="00000000010C"
Found DFU: [2b04:d006] ver=0200, devnum=8, cfg=1, intf=0, alt=0, name="@Internal Flash   /0x08000000/03*016Ka,01*016Kg,01*064Kg,07*128Kg", serial="00000000010C"

ファームウェアの書き込み

本家のファームウェアリポジトリのリリースページから必要なファームウェアをダウンロードします。
リリースノートに書き込み用のコマンドも記述されています。以下はv0.4.7の場合。

$ dfu-util -d 2b04:d006 -a 0 -s 0x8020000 -D system-part1-0.4.7-photon.bin
...
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x08020000, size = 249740
Download    [=========================] 100%       249740 bytes
Download done.
File downloaded successfully
$ dfu-util -d 2b04:d006 -a 0 -s 0x8060000:leave -D system-part2-0.4.7-photon.bin
...
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x08060000, size = 169832
Download    [=========================] 100%       169832 bytes
Download done.
File downloaded successfully

2ファイルともに書き込めたら成功です。たぶん。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2