■
GR-Peachへu-boot書き込み(QSPI)
概要
gr-peachにopenocdを使用してu-bootを書き込む手順のメモ
環境
1.u-bootビルド
rom用にビルドしたu-bootとram実行用にビルドしたu-boot(u-boot-ram)を用意
(ubuntuでビルド)
2.openOCDスクリプト用意
https://github.com/fifteenhex/gr-peach-linux
からrenesas_rza1h_swd.cfgをダウンロードして
openocdのscript/boardにコピー
3.GR-Peach とPCをUSB接続
4.openOCDを実行
コマンドプロンプトで次のコマンドを実行
>openocd -f ./board/renesas_rza1h_swd.cfg
5.u-boot通信用のteratermを起動
serial
115200bps
6.arm-none-eabi-gdbを起動
>target remote localhost:3333
>load c:/XXX/u-boot-ram
>c
u-bootが起動してteratermにログが表示
7.tftpサーバーの起動
TFTPD64を起動
rom用のu-bootをTFTPD64のCurrent Directory下に移動
gr-peachとPCをLANケーブルで接続
7.u-bootコマンドの実行
>tftp u-boot
>sf update 0x20000000 0x0 0x40000
gr-peachのリセットボタンを押すとteratermにログが表示される。
0x20000000:コピー元
0x0:QSPIのオフセット
0x40000:サイズ
(u-boot)
参考
https://renesasrulz.com/rz/m/files_linux/3262
https://github.com/fifteenhex/gr-peach-linux
その他
arm-none-eabi-gdb(7 2018q2)で
>target remote localhost:3333
が通らなかった。
u-bootコマンド
>run writeuboot
はLoading: T T T T T T T T T Tが繰り返してNG
GR-peachとUSBデバッグポートでシリアル通信をする為には
mbed Windows serial port driverが必要
https://os.mbed.com/handbook/Windows-serial-configuration
試す際は自己責任でお願いします。