2024年2月7日水曜日

Arduino Uno R4 MINIMAをArduino.cc純正アプリで使用しようとしただけなのにプチ嵌る

動作が高速になったりハードが大幅進化したUno R4 MINIMAを購入してくる。
ま、パルス周波数コンバーターやらAD変換で取り込んだ値を液晶に表示させたりするものを作ったりするぐらいで、Uno R3の性能すら使い切っていないのだけれども・・・・・・。

USB-CケーブルでPCに接続。とりあえず最初なのでTools→Boardの中にあるボードマネージャーからArduino Uno Miniを選んで、File→Example→01.BasicsのBlink(Lチカ)のdelay時間を変えた程度の変更コンパイルして書き込みしてみる

接続ポートは、COM4(Arduino UNO R4 Minima)が自動認識されたのでCOM4を選択

コンパイルの後で進まないな~と思っていたら接続エラーの嵐

最大32256バイトのフラッシュメモリのうち、スケッチが932バイト(2%)を使っています。
最大2048バイトのRAMのうち、グローバル変数が9バイト(0%)を使っていて、ローカル変数で2039バイト使うことができます。
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xa2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xa2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xa2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xa2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xa2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xa2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xa2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xa2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xa2
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xa2
Failed uploading: uploading error: exit status 1


なぜ?

COMポートのドライバーにワーニングでも有るのか?と、デバイスマネージャーを確認するもCOMポートのエラーはなく、DFU-RT Portという見たことがないデバイスにエラー
Arduinoを外すと消えるのでArduino絡みのようだ
DFU-RT Portエラー

M5 Stackみたいにボードマネージャージャーから設定をインストールしないといけないのかも?と、R4と検索してみたところボード設定のインストーラーがあり追加でインストール作業が必要なようだ
ドライバーインストールでエラーになると面倒なことになりかねないのでArduino R4をPCから外してからインストールに作業に入る

Arduinoを再接続すると、デバイスマネージャーのDFU-RT Portのエラーも消える

Arduino UNO R4 Boardsという項目が追加されたのでそこでMINIMAを選択してやる

無事書き込みできるようになる
Arduino.cc純正ソフトの最新版(Ver.2.2.3)そのままで動かないとは?
M5 Stackとか下手の横好きでいじっているから自力でなんとかなったけれども、これ初心者には優しくないよな~

内容を見てみると
 Opening DFU capable USB device...
という項目があり、R3までのComポート経由の書き込みではなく、DFUというプロトコルを使用して書き込むように変わったようで、DFU-RT Portのエラーがプログラムを書き込めなかった原因で間違いないようだ

でも、ハードの入っっていた箱にも特にソフト側で追加設定が必要なようなことが書いているものは無かったと思うし、公式ハードなのだから自動でインストールしてくれてもいいような?

0 件のコメント:

コメントを投稿