谷动谷力

 找回密码
 立即注册
谷动谷力 首页 嵌入式 查看内容

Windows下通过 Uboot TFTP 方式下载和启动rt-smart 内核

2022-5-3 23:56| 发布者: 鸣涧| 查看: 43| 评论: 1|原作者: 鸣涧

摘要: Windows下通过 UbootTFTP 方式下载和启动rt-smart 内核 i.MX6ULL 系列处理器启动方式多样,启动时会首先执行芯片内部 Boot ROM 中的程序。Boot ROM 会根据 BOOT_MODE 寄存器、eFUSEs、配置管脚等状态来决定启动模式 ...
Windows下通过 Uboot  TFTP 方式下载和启动rt-smart 内核

i.MX6ULL 系列处理器启动方式多样,启动时会首先执行芯片内部 Boot ROM 中的程序。Boot ROM 会根据 BOOT_MODE 寄存器、eFUSEs、配置管脚等状态来决定启动模式以及启动设备。故在启动前,用户可根据自己需要配置 ART-Pi Smart 开发板的启动方式。
目前,ART-Pi Smart 开发板有以下两种启动方式:
  • eMMC 模式(默认启动模式):ART-Pi Smart 上电时,默认从 eMMC 启动,自动运行 U-Boot
  • USB 模式:选择从 USB  启动,通过 USB 接口(上方的 USB-TypeC OTG 接口),串行下载固件
    操作方法:开发板上电之后,先按下 "BOOT 启动按键" 不松开,然后,再按下 “RST 复位键”,即可切换到 USB 固件下载模式。
我选择通过 Uboot  TFTP 方式下载和启动rt-smart 内核

  • 首先下载并安装 Tftpd64 工具 (查看附件有安装包)
  • 在测试电脑上,提前设置好 TFTP 服务器,并配置目录定位到 rtthread.bin 文件所在的目录
    _Tftp_Server_工具参数设置.png
  • 将 ART-Pi Smart 开发板通过有线网口和测试电脑处于同一个局域网(例,将开发板和测试电脑通过网线连接到同一台路由器或交换机)
    ⚠️将网线插到 ART-Pi Smart 开发板的网口,请检查网口上两个 LED 灯(绿色和黄色)是否亮起。
  • 将 USB-TypeC(下面的)连接到电脑给开发板上电,上电时将默认从 eMMC 启动,自动运行 U-Boot
  • 在测试电脑上,打开串口调试终端:115200 波特率、8 位数据位、1 位停止位、无奇偶校验、无流控,启动终端
  • 一般插上串口线,还没那么启动终端,uboot就启动完了,重启一下 输入reboot命令 或按下 ART-Pi Smart 开发板上的 “ RST 复位键” ,让开发板复位并进入到 “uboot 启动” 倒计时

    1. msh />reboot
    2. [96355] E/NO_TAG: resetting ...

    复制代码

  • 在进入 “uboot 启动” 倒计时结束之前,按下键盘任意键,进入到手动模式
    1. U-Boot 2017.03-g002b758ac9-dirty (Nov 24 2021 - 20:08:02 +0800)

    2. CPU:   Freescale i.MX6ULL rev1.1 696 MHz (running at 396 MHz)
    3. CPU:   Industrial temperature grade (-40C to 105C) at 39C
    4. Reset cause: WDOG
    5. Model: Freescale i.MX6 ULL 14x14 EVK Board
    6. Board: MX6ULL 14x14 EVK
    7. DRAM:  512 MiB
    8. MMC:   FSL_SDHC: 0, FSL_SDHC: 1
    9. *** Warning - bad CRC, using default environment

    10. Display: TFT7016 (1024x600)
    11. Video: 1024x600x24
    12. In:    serial
    13. Out:   serial
    14. Err:   serial
    15. switch to partitions #0, OK
    16. mmc1(part 0) is current device
    17. Net:   eth1: ethernet@020b4000, eth0: ethernet@02188000 [PRIME]
    18. Normal Boot
    19. Hit any key to stop autoboot:  0 (#在进入 “uboot 启动” 倒计时结束之前,按下键盘任意键,进入到手动模式)
    20. =>
    复制代码
    这样已经进入u-boot命令模式
    如果没有进入到手动模式,则开发板会自动进入到 i.MX6ULL 核心板自带的嵌入式 rt-smart 系统。
  • 测试是否连通电脑
    1. => ping 192.168.0.26
    2. ethernet@02188000 Waiting for PHY auto negotiation to complete.... done
    3. *** ERROR: `ipaddr' not set
    4. ping failed; host 192.168.0.26 is not alive
    复制代码
    uboot没有DHCP client 不能自动获取IP,用ipaddr命令,按提示手动IP
  • 设置开发板ip
    1. => setenv ipaddr 192.168.0.100
    复制代码

  • 再次测试是否连通电脑
    1. => ping 192.168.0.26
    2. Using ethernet@02188000 device
    3. host 192.168.0.26 is alive
    复制代码
    这回与电脑网络通了
  • 测试下载 rtthread.bin
    1. => tftp rtthread.bin
    2. Using ethernet@02188000 device
    3. TFTP from server 192.168.0.26; our IP address is 192.168.0.100
    4. Filename 'rtthread.bin'.
    5. Load address: 0x80800000
    6. Loading: #################################################################
    7.          #################################################################
    8.          #################################################################
    9.          ###################
    10.          1.2 MiB/s
    11. done
    12. Bytes transferred = 1095360 (10b6c0 hex)
    复制代码
    下载成功,我的网络设置是正确的
  • 输入命令,将 rt-smart 内核固件文件 rtthread.bin,通过网络加载至内存中运行
    命令格式:dhcp  TFTP 服务器 IP(即,测试电脑 IP 地址):固件文件(xx.bin文件);dcache flush;go 固件入口地址

    1. => dhcp 0x80001000 192.168.0.26:rtthread.bin;dcache flush;go 0x80001000
    2. BOOTP broadcast 1
    3. BOOTP broadcast 2
    4. DHCP client bound to address 192.168.0.69 (520 ms)
    5. Using ethernet@02188000 device
    6. TFTP from server 192.168.0.26; our IP address is 192.168.0.69
    7. Filename 'rtthread.bin'.
    8. Load address: 0x80001000
    9. Loading: #################################################################
    10.          #################################################################
    11.          #################################################################
    12.          ###################
    13.          1.4 MiB/s
    14. done
    15. Bytes transferred = 1095360 (10b6c0 hex)
    16. ## Starting application at 0x80001000 ...

    17. \ | /
    18. - RT -     Thread Smart Operating System
    19. / | \     5.0.0 build May  1 2022
    20. 2006 - 2020 Copyright by rt-thread team
    21. lwIP-2.1.2 initialized!
    22. [15] E/drv.enet: emac device init success
    23. [20] I/I2C: I2C bus [i2c3] registered
    24. [24] I/I2C: I2C bus [i2c4] registered
    25. [73] I/SDIO: SD card capacity 7565312 KB.
    26. found part[0], begin: 4194304, size: 7.216GB
    27. [88] E/drv.enet: PHY Link down, please check the cable connection and link partner setting.
    28. [138] I/SDIO: emmc card capacity 3817472 KB.
    29. found part[0], begin: 2098176, size: 500.0MB
    30. found part[1], begin: 526386176, size: 1.0GB
    31. found part[2], begin: 1600128000, size: 10.0MB
    32. found part[3], begin: 1610613760, size: [161] I/touch: rt_touch init success
    33. [165] I/gt911: touch device gt911 init success
    34. [171] I/sal.skt: Socket Abstraction Layer initialize success.
    35. 200.0MB
    36. emmc file system initialization done!
    37. sd0 file system initialization done!
    38. open em failed!
    39. hello rt-smart
    40. msh />[3390] W/app.filesystem: sd card mount to '/mnt' failed!
    41. [5130] D/drv.enet: enet1 link up
    复制代码

    yes 成功了


Tftpd64-4.60-setup.zip

鲜花

握手

雷人

路过

鸡蛋

相关阅读

发表评论

最新评论

谷谷小师妹 2022-12-25 21:58
学习了 赞一下

查看全部评论(1)

最新热点

QQ|Archiver|手机版|深圳市光明谷科技有限公司|光明谷商城|Sunshine Silicon Corpporation ( 粤ICP备14060730号|Sitemap

GMT+8, 2023-12-7 22:24 , Processed in 0.090224 second(s), 37 queries .

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

返回顶部