虚拟机Ubuntu编译,windows环境下下载,主要是插拔sd卡插来插去,容易费sd卡
2. 使用野火的download-tool,这里我们需要复制一份mkimage.sh文件重命名为mk_emmc.sh,在mk_emmc.sh钟删除sd卡的选择,修改完的内容:
#!/bin/bash function usage() { echo "Usage: $0 file" echo " file : the image which you want to burn " echo "Example: $0 helloworld.bin" } cur_user=`env | grep USER | cut -d "=" -f 2` echo $cur_user if [ $cur_user == "root" ]; then echo -e "\033[31mThe cur_user is $cur_user. Please run the script with a normal user.\033[0m" exit 1 fi if [ "$#" -ne 1 ]; then usage $0 exit 1 fi SYSTEM=`uname -s` if [ $SYSTEM == "Linux" ]; then DCD_BUILDER=dcdgen.bin IMG_BUILDER=imgutil.bin else exit 1 fi ./$DCD_BUILDER dcd.config dcd.bin ./$IMG_BUILDER --combine base_addr=0x80000000 ivt_offset=0x400 app_offset=0x2000 dcd_file=dcd.bin app_file=$1 ofile=sdk20-app.img image_entry_point=0x80002000 #sudo dd if=sdk20-app.img of=/dev/$sd_idnex bs=512 conv=fsync 使用./mk_emmc.sh ../../button_adj/base.bin生成镜像文件sdk20-app.img 3. 使用野火的mfgtools-release下载镜像,需要修改cfg.ini: #my_uboot=u-boot-mmc.imx my_uboot=sdk20-app.img 替换mfgtools-release\Profiles\Linux\OS Firmware\ucl2.xml文件,见附件; 复制之前编译好的sdk20-app.img到mfgtools-release\Profiles\Linux\OS Firmware\release目录下,运行MfgTool2.exe,连接板子typec接线,按下板子mode键和复位键,先松开复位键再松开mode键:
点击start下载,等待下载完成:
点击stop后,可以直接复位板子,看到按下按键时led灯亮灭
|