uboot常用命令的一些学习总结

本文详细介绍了U-Boot环境下的各种实用命令,包括环境变量的管理和操作、网络测试方法、TFTP文件传输流程以及对SD卡和Nand Flash的操作等。通过这些命令,可以帮助开发者更好地进行嵌入式系统的开发和调试。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >



1.打印环境变量

        print/printenv

2.设置环境变量

        set name value

        若不保存,重启不会更新环境变量值

3.保存环境变量

        save

4.网络测试

        ping ip地址

        ping 主机方式
                 1.插上网线
                 2.设置windows的本地连接IPv4de的IP地址
                 3.设置uboot环境变量
                    ipaddr:开发板的IP地址,gatewayip,必须和主机的IP在同一个网段
                    eg:ip 192.168.0.1 子网掩码 255.255.255.0网段为192.168.0
                 4.指令:ping 主机ip

         ping虚拟机方式
                 1.插上网线
                 2.设置虚拟机ipv4地址
                 3.设置虚拟机桥接方式,设置虚拟机网络配置:编辑->虚拟网络
                    编辑器->虚拟网络连接到有线网卡
                 4.设置uboot环境变量到同一个网段
                 5.指令:ping 虚拟机ip

5.tftp指令
         1.搭建环境,在虚拟机装tftp服务器
         2.设置从机的tftp的serverip为虚拟机的ip
         3.指令:tftp 内存地址 文件名

6.SD卡/iNand操作命令

          movi
7.NandFlash操作命令

          nand

8.内存操作命令:
          显示内存
                 md[.b|.w|.l] {address} [size]
                 .b:字节读 .w:字读 .l:双字读
                 address 内存地址
                 size 读取长度
                 eg: mm.b 30000000 字节读内存开始地址为0x30000000的内容
           连续读内存
                 

                  mm[.b|.w|.l] {address}
           一次写内存
                  mw[.b|.w|.l] {address} value [count]
                  value 值,默认十六进制
                  count 写value的个数


=> help ? - alias for 'help' autoscr - run script from memory base - print or set address offset bdinfo - print Board Info structure boot - boot default, i.e., run 'bootcmd' bootd - boot default, i.e., run 'bootcmd' bootm - boot application image from memory bootp - boot image via network using BootP/TFTP protocol cmp - memory compare coninfo - print console devices and information cp - memory copy crc32 - checksum calculation dhcp - invoke DHCP client to obtain IP/boot params echo - echo args to console erase - erase FLASH memory flinfo - print FLASH memory information go - start application at address 'addr' help - print online help iminfo - print header information for application image imls - list all images found in flash itest - return true/false on integer compare loadb - load binary file over serial line (kermit mode) loads - load S-Record file over serial line loop - infinite loop on address range md - memory display mm - memory modify (auto-incrementing) mtest - simple RAM test mw - memory write (fill) nfs - boot image via network using NFS protocol nm - memory modify (constant address) printenv - print environment variables protect - enable or disable FLASH write protection rarpboot - boot image via network using RARP/TFTP protocol reset - Perform RESET of the CPU run - run commands in an environment variable saveenv - save environment variables to persistent storage setenv - set environment variables sleep - delay execution for some time tftpboot - boot image via network using TFTP protocol version - print monitor version
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值