Windows下通過 UbootTFTP 方式下載和啟動rt-smart 內(nèi)核
i.MX6ULL 系列處理器啟動方式多樣,啟動時會首先執(zhí)行芯片內(nèi)部 Boot ROM 中的程序。Boot ROM 會根據(jù) BOOT_MODE 寄存器、eFUSEs、配置管腳等狀態(tài)來決定啟動模式以及啟動設(shè)備。故在啟動前,用戶可根據(jù)自己需要配置 ART-Pi Smart 開發(fā)板的啟動方式。
目前,ART-Pi Smart 開發(fā)板有以下兩種啟動方式:
- eMMC 模式(默認(rèn)啟動模式):ART-Pi Smart 上電時,默認(rèn)從 eMMC 啟動,自動運(yùn)行 U-Boot
-
USB 模式:選擇從 USB啟動,通過 USB 接口(上方的 USB-TypeC OTG 接口),串行下載固件
操作方法:開發(fā)板上電之后,先按下 "BOOT 啟動按鍵" 不松開,然后,再按下 “RST 復(fù)位鍵”,即可切換到 USB 固件下載模式。
我選擇通過 UbootTFTP 方式下載和啟動rt-smart 內(nèi)核
- 首先下載并安裝 Tftpd64 工具 (查看附件有安裝包)
-
在測試電腦上,提前設(shè)置好 TFTP 服務(wù)器,并配置目錄定位到 rtthread.bin 文件所在的目錄
-
將 ART-Pi Smart 開發(fā)板通過有線網(wǎng)口和測試電腦處于同一個局域網(wǎng)(例,將開發(fā)板和測試電腦通過網(wǎng)線連接到同一臺路由器或交換機(jī))
??將網(wǎng)線插到 ART-Pi Smart 開發(fā)板的網(wǎng)口,請檢查網(wǎng)口上兩個 LED 燈(綠色和黃色)是否亮起。 - 將 USB-TypeC(下面的)連接到電腦給開發(fā)板上電,上電時將默認(rèn)從 eMMC 啟動,自動運(yùn)行 U-Boot
- 在測試電腦上,打開串口調(diào)試終端:115200 波特率、8 位數(shù)據(jù)位、1 位停止位、無奇偶校驗(yàn)、無流控,啟動終端
-
一般插上串口線,還沒那么啟動終端,uboot就啟動完了,重啟一下 輸入reboot命令 或按下 ART-Pi Smart 開發(fā)板上的 “ RST 復(fù)位鍵” ,讓開發(fā)板復(fù)位并進(jìn)入到 “uboot 啟動” 倒計(jì)時
-
在進(jìn)入 “uboot 啟動” 倒計(jì)時結(jié)束之前,按下鍵盤任意鍵,進(jìn)入到手動模式
U-Boot 2017.03-g002b758ac9-dirty (Nov 24 2021 - 20:08:02 +0800)
CPU: Freescale i.MX6ULL rev1.1 696 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 39C
Reset cause: WDOG
Model: Freescale i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM: 512 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment
Display: TFT7016 (1024x600)
Video: 1024x600x24
In: serial
Out: serial
Err: serial
switch to partitions #0, OK
mmc1(part 0) is current device
Net: eth1: ethernet@020b4000, eth0: ethernet@02188000 [PRIME]
Normal Boot
Hit any key to stop autoboot: 0(#在進(jìn)入 “uboot 啟動” 倒計(jì)時結(jié)束之前,按下鍵盤任意鍵,進(jìn)入到手動模式)
=>
-
這樣已經(jīng)進(jìn)入u-boot命令模式
如果沒有進(jìn)入到手動模式,則開發(fā)板會自動進(jìn)入到 i.MX6ULL 核心板自帶的嵌入式 rt-smart 系統(tǒng)。 -
測試是否連通電腦
=> ping 192.168.0.26
ethernet@02188000 Waiting for PHY auto negotiation to complete.... done
*** ERROR: `ipaddr' not set
ping failed; host 192.168.0.26 is not alive
- uboot沒有DHCP client 不能自動獲取IP,用ipaddr命令,按提示手動IP
-
設(shè)置開發(fā)板ip及TFTP服務(wù)器IP
=> setenv ipaddr 192.168.0.100
=> setenv serverip 192.168.0.26
=> saveenv
-
再次測試是否連通電腦
=> ping 192.168.0.26
Using ethernet@02188000 device
host 192.168.0.26 is alive
- 這回與電腦網(wǎng)絡(luò)通了
-
測試下載rtthread.bin
=> dhcp 0x80001000 192.168.0.26:rtthread.bin;dcache flush;go 0x80001000
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.0.69 (520 ms)
Using ethernet@02188000 device
TFTP from server 192.168.0.26; our IP address is 192.168.0.69
Filename 'rtthread.bin'.
Load address: 0x80001000
Loading: #################################################################
#################################################################
#################################################################
###################
1.4 MiB/s
done
Bytes transferred = 1095360 (10b6c0 hex)
## Starting application at 0x80001000 ...
\ | /
- RT - Thread Smart Operating System
/ | \ 5.0.0 build May1 2022
2006 - 2020 Copyright by rt-thread team
lwIP-2.1.2 initialized!
[15] E/drv.enet: emac device init success
[20] I/I2C: I2C bus [i2c3] registered
[24] I/I2C: I2C bus [i2c4] registered
[73] I/SDIO: SD card capacity 7565312 KB.
found part[0], begin: 4194304, size: 7.216GB
[88] E/drv.enet: PHY Link down, please check the cable connection and link partner setting.
[138] I/SDIO: emmc card capacity 3817472 KB.
found part[0], begin: 2098176, size: 500.0MB
found part[1], begin: 526386176, size: 1.0GB
found part[2], begin: 1600128000, size: 10.0MB
found part[3], begin: 1610613760, size: [161] I/touch: rt_touch init success
[165] I/gt911: touch device gt911 init success
[171] I/sal.skt: Socket Abstraction Layer initialize success.
200.0MB
emmc file system initialization done!
sd0 file system initialization done!
open em failed!
hello rt-smart
msh />[3390] W/app.filesystem: sd card mount to '/mnt' failed!
[5130] D/drv.enet: enet1 link up
- 下載成功,我的網(wǎng)絡(luò)設(shè)置是正確的
輸入命令,將 rt-smart 內(nèi)核固件文件 rtthread.bin,通過網(wǎng)絡(luò)加載至內(nèi)存中運(yùn)行
命令格式:dhcpTFTP 服務(wù)器 IP(即,測試電腦 IP 地址):固件文件(xx.bin文件);dcache flush;go 固件入口地址
=> dhcp 0x80001000 192.168.0.26:rtthread.bin;dcache flush;go 0x80001000
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.0.69 (520 ms)
Using ethernet@02188000 device
TFTP from server 192.168.0.26; our IP address is 192.168.0.69
Filename 'rtthread.bin'.
Load address: 0x80001000
Loading: #################################################################
#################################################################
#################################################################
###################
1.4 MiB/s
done
Bytes transferred = 1095360 (10b6c0 hex)
## Starting application at 0x80001000 ...
\ | /
- RT - Thread Smart Operating System
/ | \ 5.0.0 build May1 2022
2006 - 2020 Copyright by rt-thread team
lwIP-2.1.2 initialized!
[15] E/drv.enet: emac device init success
[20] I/I2C: I2C bus [i2c3] registered
[24] I/I2C: I2C bus [i2c4] registered
[73] I/SDIO: SD card capacity 7565312 KB.
found part[0], begin: 4194304, size: 7.216GB
[88] E/drv.enet: PHY Link down, please check the cable connection and link partner setting.
[138] I/SDIO: emmc card capacity 3817472 KB.
found part[0], begin: 2098176, size: 500.0MB
found part[1], begin: 526386176, size: 1.0GB
found part[2], begin: 1600128000, size: 10.0MB
found part[3], begin: 1610613760, size: [161] I/touch: rt_touch init success
[165] I/gt911: touch device gt911 init success
[171] I/sal.skt: Socket Abstraction Layer initialize success.
200.0MB
emmc file system initialization done!
sd0 file system initialization done!
open em failed!
hello rt-smart
msh />[3390] W/app.filesystem: sd card mount to '/mnt' failed!
[5130] D/drv.enet: enet1 link up
yes 成功了
-
內(nèi)核
+關(guān)注
關(guān)注
3文章
1336瀏覽量
40084 -
TFTP
+關(guān)注
關(guān)注
0文章
20瀏覽量
14295 -
Uboot
+關(guān)注
關(guān)注
4文章
124瀏覽量
28056 -
i.MX6
+關(guān)注
關(guān)注
1文章
37瀏覽量
16251 -
RT-Thread
+關(guān)注
關(guān)注
31文章
1239瀏覽量
39438
發(fā)布評論請先 登錄
相關(guān)推薦
評論