前篇您可点击上方的文章合集或文末的“上一篇 · RZ/G2L开发板使用指南(上)”查看相关文章。
首先恭喜你参考‘使用指南-上’方法,已经成功烧写flash_writer到G2L的片上RAM。接下来将介绍如何将bootloader和U-boot烧写到QSPI或EMMC,以及如何制作SD卡镜像并启动系统。
G2L开发板提供了64MB的QSPI NOR FALSH 和64GB的EMMC Memory资源,可以选择其中其一设为启动空间。
接下来从上篇这里继续我们的操作
方式1. 下载到QSPI NOR FLASH
Flash_writer 已经提供“XLS2”指令,支持把二进制文件烧写到FLASH ROM.
步骤1
烧写 bl2_bp-smarc-rzg2l_pmic.srec
串口输入‘XLS2’根据提示,输入对应地址:
>XLS2
===== Qspi writing of RZ/G2 Board Command =============
Load Program to Spiflash
Writes to any of SPI address.
Micron : MT25QU512
Program Top Address & Qspi Save Address
===== Please Input Program Top Address ============
Please Input : H'11E00
===== Please Input Qspi Save Address ===
Please Input : H'00000
Work RAM(H'50000000-H'53FFFFFF) Clear....
please send ! ('.' & CR stop load)
选择"bl2_bp-smarc-rzg2l_pmic.srec"文件,出现如下信息提供,输入’y’
SPI Data Clear(H'FF) Check : H'00000000-0000FFFF,Clear OK?(y/n)
出现以下信息,表示烧写成功
SPI Data Clear(H'FF) Check :H'00000000-0000FFFF Erasing..Erase Completed
SAVE SPI-FLASH.......
======= Qspi Save Information =================
SpiFlashMemory Stat Address : H'00000000
SpiFlashMemory End Address : H'0000CB28
===========================================================
步骤2
烧写fip-smarc-rzg2l_pmic.srec
>XLS2
===== Qspi writing of RZ/G2 Board Command =============
Load Program to Spiflash
Writes to any of SPI address.
Micron : MT25QU512
Program Top Address & Qspi Save Address
===== Please Input Program Top Address ============
Please Input : H'00000
===== Please Input Qspi Save Address ===
Please Input : H'1D200
Work RAM(H'50000000-H'53FFFFFF) Clear....
please send ! ('.' & CR stop load)
选择 fip-smarc-rzg2l_pmic.srec文件,输入y
SPI Data Clear(H'FF) Check : H'00000000-0000FFFF,Clear OK?(y/n)
出现以下信息,表示烧写成功。
SPI Data Clear(H'FF) Check :H'00000000-0000FFFF Erasing..Erase Completed
SAVE SPI-FLASH.......
======= Qspi Save Information =================
SpiFlashMemory Stat Address : H'00000000
SpiFlashMemory End Address : H'0000CB28
===========================================================
至此,bootloader和U-boot已成功烧写到QSPI FLASH。
方式2. 下载到EMMC MEMORY
Flash_writer 已经提供“EXT_CSD、 EM_W”指令,支持把二进制文件烧写到EMMC.
步骤1
烧写 bl2_bp-smarc-rzg2l_pmic.srec
>EM_SECSD
Please Input EXT_CSD Index(H'00 - H'1FF) :b1
EXT_CSD[B1] = 0x00
Please Input Value(H'00 - H'FF) :2
EXT_CSD[B1] = 0x02
>EM_SECSD
Please Input EXT_CSD Index(H'00 - H'1FF) :b3
EXT_CSD[B3] = 0x00
Please Input Value(H'00 - H'FF) :8
EXT_CSD[B3] = 0x08
>EM_W
EM_W Start --------------
---------------------------------------------------------
Please select,eMMC Partition Area.
0:User Partition Area : 62160896 KBytes
eMMC Sector Cnt : H'0 - H'0768FFFF
1:Boot Partition 1 : 32256 KBytes
eMMC Sector Cnt : H'0 - H'0000FBFF
2:Boot Partition 2 : 32256 KBytes
eMMC Sector Cnt : H'0 - H'0000FBFF
---------------------------------------------------------
Select area(0-2)>1
-- Boot Partition 1 Program -----------------------------
Please Input Start Address in sector :1
Please Input Program Start Address : 11e00
Work RAM(H'50000000-H'50FFFFFF) Clear....
please send ! ('.' & CR stop load)
选择 bl2_bp-smarc-rzv2l_pmic.srec
出现以下信息,表示烧写成功
SAVE -FLASH.......
EM_W Complete!
步骤2
烧写fip-smarc-rzg2l_pmic.srec
> EM_W
EM_W Start --------------
---------------------------------------------------------
Please select,eMMC Partition Area.
0:User Partition Area : 62160896 KBytes
eMMC Sector Cnt : H'0 - H'0768FFFF
1:Boot Partition 1 : 32256 KBytes
eMMC Sector Cnt : H'0 - H'0000FBFF
2:Boot Partition 2 : 32256 KBytes
eMMC Sector Cnt : H'0 - H'0000FBFF
---------------------------------------------------------
Select area(0-2)>1
-- Boot Partition 1 Program -----------------------------
Please Input Start Address in sector :100
Please Input Program Start Address : 0
Work RAM(H'50000000-H'50FFFFFF) Clear....
please send ! ('.' & CR stop load)
选择 fip-smarc-rzg2l_pmic.srec文件
出现以下信息,表示烧写成功。
SAVE -FLASH.......
EM_W Complete!
至此,bootloader和U-boot已成功烧写到EMMC。长按SW9 按键关机。
制作SD文件系统
可以在windows电脑上通过工具制作,如https://rufus.ie/en/
如下选择对应的SD卡和镜像文件,开始制作,等一段时间制作完成。
最后如下安装SD卡到开发板,SW11选择QSPI引导模式
长按SW9开机,3秒事件内按下电脑任意按键,进入如下界面:
U-Boot 2021.10 (Mar 31 2022 - 03:57:20 +0000)
CPU: Renesas Electronics K rev 14.15
Model: smarc-rzg2l
DRAM: 1.9 GiB
MMC: sd@11c00000: 0, sd@11c10000: 1
Loading Environment from MMC... OK
In: serial@1004b800
Out: serial@1004b800
Err: serial@1004b800
Net: eth0: ethernet@11c20000
Hit any key to stop autoboot: 0
=>
设置环境变量:
=> env default -a
## Resetting to default environment
=> setenv bootargs 'root=/dev/mmcblk1p2 rootwait'
=> setenv bootcmd 'mmc dev 1;fatload mmc 1:1 0x48080000 Image-smarc-rzg2l.bin; fatload mmc 1:1 0x48000000 Image-r9a07g044l2-smarc.dtb; booti 0x48080000 - 0x48000000'
=> saveenv
Saving Environment to MMC... Writing to MMC(0)….OK
输入boot启动系统
=> boot
到下面界面,输入Root账户登录,至此,系统已成功启动,开启G2L的世界之旅吧!
Version: 3.0.3
smarc-rzg2l login: root
Last login: Sun Sep 20 10:44:03 UTC 2020
root@smarc-rzg2l:~
root@smarc-rzg2l:~# uname -r
5.10.158-cip22-yocto-standard
后续文章会介绍EMMC文件系统制作、开发环境创建、如何编译相关镜像和文件系统。
如需了解更详细的使用方法请参考如下网站
1
瑞萨官网
https://www.renesas.cn/cn/zh/products/microcontrollers-microprocessors/rz-mpus/rzg2l-getting-started
1
RZ产品WIKI网站
https://renesas.info/wiki/Main_Page
更多内容,您可复制下方网址到浏览器中打开进入瑞萨中文论坛查看:
https://community-ja.renesas.com/zh/forums-groups/mcu-mpu/
1
END
1
推荐阅读
开启人工智能应用的最佳解决方案——RZ/V AI SDK
RZ/V2L实现2D条形码扫描应用
RZ/G2L开发板EMMC启动