Back
DVMEGA(ラズパイ・ラジオ,BlueStack共通 UHF版)を入手以来、折角ラズベリーパイとドッキングして使用するので,そのファームウェアアップデートもラズベリーパイで行いたいと思い、左記のサイトを参考にWheezy、Jessie、Stretchと作業手順も更新しながら、記述してきましたが、最近(2018年夏)、最新バージョンの DVMEGA_RH_V326_XXX_JAPAN.hex がリリースされました。そこで Stretchの最新版 4.14.76+ #1150 で検証した内容へ全面的に書き換えました。
- ハードウェアのジャンパー半田付け
- Rasberry Piへ関連ソフトをインストール
- その他のソフトが/dev/ttyAMA0を使用していないことを確認
- ファームウェアアップデートの実行
ATMEGA328のリセットピン(C45下部)とGPIOコネクタの7番ピンの間にジャンパケーブルを半田付けします。
デュアルバンドのDVMEGAの場合は上記サイトに写真があります。
まず,OSを最新の状態にします。
$ sudo apt update && sudo apt upgrade -y
●avrdudeのインストール
$ sudo apt install avrdude
●その他関連ソフトのインストールと環境設定
$ sudo apt install git python-dev python-rpi.gpio $ git clone https://github.com/openenergymonitor/avrdude-rpi.git $ cd avrdude-rpi $ sudo cp autoreset /usr/bin $ sudo cp avrdude-autoreset /usr/bin $ sudo mv /usr/bin/avrdude /usr/bin/avrdude-original $ sudo ln -s /usr/bin/avrdude-autoreset /usr/bin/avrdudeこのまま一行ずつコピーして実行してください。
G4KLXアプリケーションや ser2netのようなシリアルポートを使用するソフトウェアは停止してください。
また次のようにすると、ttyAMA0を占有しているプロセスが判明するので kill します。
$ ps -ef | grep ttyAMA0
opendv 807 425 0 15:25 pts/0 00:00:00 grep --color=auto ttyAMA0
$ sudo kill 425
まず、DV MEGA のダウンロードページ を開き、日本版最新のリンクを右クリックして、 リンクアドレスをコピーします。
$ wget http://www.dvmega.nl/wp-content/uploads/2018/11/DVMEGA_RH_V326_JAPAN.zip $ unzip DVMEGA_RH_V326_JAPAN.zip $ cd DVMEGA_RH_V326_JAPANダウンロード後、解凍すると同名のフォルダが出来るので、その中で次の作業をします。
$ sudo /usr/bin/avrdude -p m328p -c arduino -P /dev/ttyAMA0 -b 115200 -F -U flash:w:DVMEGA_RH_V326_RPI_JAPAN.hex -vDVMEGA_RH_V326_RPI_JAPAN.hex は日本版ファームウェアです。
avrdude-original: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/root/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyAMA0
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude-original: Using autoreset DTR on GPIO Pin 7
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude-original: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude-original: Device signature = 0x1e950f (probably m328p)
avrdude-original: safemode: lfuse reads as 0
avrdude-original: safemode: hfuse reads as 0
avrdude-original: safemode: efuse reads as 0
avrdude-original: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude-original: erasing chip
avrdude-original: reading input file "DVMEGA_RH_V326_RPI_JAPAN.hex"
avrdude-original: input file DVMEGA_RH_V326_RPI_JAPAN.hex auto detected as Intel Hex
avrdude-original: writing flash (30066 bytes):
Writing | ################################################## | 100% 4.54s
avrdude-original: 30066 bytes of flash written
avrdude-original: verifying flash memory against DVMEGA_RH_V326_RPI_JAPAN.hex:
avrdude-original: load data flash data from input file DVMEGA_RH_V326_RPI_JAPAN.hex:
avrdude-original: input file DVMEGA_RH_V326_RPI_JAPAN.hex auto detected as Intel Hex
avrdude-original: input file DVMEGA_RH_V326_RPI_JAPAN.hex contains 30066 bytes
avrdude-original: reading on-chip flash data:
Reading | ################################################## | 100% 3.49s
avrdude-original: verifying ...
avrdude-original: 30066 bytes of flash verified
avrdude-original: safemode: lfuse reads as 0
avrdude-original: safemode: hfuse reads as 0
avrdude-original: safemode: efuse reads as 0
avrdude-original: safemode: Fuses OK (E:00, H:00, L:00)
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
avrdude-original done. Thank you.
strace: |autoreset: Broken pipe
Back
73
J E 3 H C Z / Y. Todo at XLX047 B


0 件のコメント:
コメントを投稿