0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

FLIRCのBlackMagic Probe互換機にファームウェアを焼く

Posted at

概要

FLIRCが販売しているOpenSourceなJTAG Probe、まぁ要はBlackMagic Probe互換機にファームウェアを焼く手順。自分のメモ的な要素が強い。

ref. https://flirc.tv/products/flirc-jeffprobe?variant=42687976866020

前提

公式で述べられているような手順は使えない。

ref. https://github.com/blackmagic-debug/blackmagic/wiki/Upgrading-Firmware

$ scripts/stm32_mem.py blackmagic.bin

正確には以下のように書き込めはする。けど文鎮化する。そもそも書き込みアドレスが根本的に違ったりする。
ちなみに死んでしまっても、後述の正しい手順で書き込み直せば良いだけなのであまり気にしなくて良い。

$ python3 scripts/stm32_mem.py blackmagic-native-v1_8_0.bin 
-
USB Device Firmware Upgrade - Host Utility -- version 1.2
Copyright (C) 2011  Black Sphere Technologies
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
-
Device ID:	 1d50:6018
Manufacturer:	 Black Sphere Technologies
Product:	 Black Magic Probe (SAMD), (Firmware v1.6.2)
Serial:		 D724B5B1
Failed to read device state! Assuming APP_IDLE
Invoking DFU Device
Device ID:	 1d50:6017
Manufacturer:	 Black Sphere Technologies
Product:	 DFU Demo
Serial:		 DEMO
Programming memory at 0x0801B400
-
All operations complete!

手順

まずFLIRCのリポジトリにあるファームウェアをありがたく頂戴する。

次にFLIRC BlackMagic Probeのボード上のプッシュスイッチを押しながらUSB接続を行う。これでDFUモードで立ち上げられる。うまくいっていないなら次の手順でエラー吐くのですぐわかる。

dfu-utilを使って書き込む。公式のwikiに書かれているdfu-utilの手順は参考にしてはいけない。
オリジナルBlackMagicProbeの0x08002000とは異なるアドレスであることに注意。

$ dfu-util -d 1d50:6018,:6017 -s 0x2000:leave -D blackmagic.bin

e.g.

$ sudo dfu-util -d 1d50:6018,:6017 -s 0x2000:leave -D blackmagic_fw/blackmagic.bin
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 1d50:6017
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash   "
Downloading element to address = 0x00002000, size = 105308
Erase   	[=========================] 100%       105308 bytes
Erase    done.
Download	[=========================] 100%       105308 bytes
Download done.
File downloaded successfully
Submitting leave request...
Transitioning to dfuMANIFEST state

参考

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?