mini6410移植全攻略(7)--uboot移植之支持串口xmodem协议

    在嵌入式中串口传送数据会经常用到,在这里我们也做一下移植。

    本文有muge0913编写转载请注明出处:http://blog.csdn.net/muge0913/article/details/7182218

    在文件common/cmd_load.c文件中

U_BOOT_CMD(
	loadx, 3, 0,	do_load_serial_bin,
	"load binary file over serial line (xmodem mode)",
	"[ off ] [ baud ]\n"
	" - load binary file over serial line"
	" with offset 'off' and baudrate 'baud'"
);

    在do_load_serial_bin函数中增加对loadx命令的处理

else if(strcmp(argv[0],"loadx")==0) {
		printf ("## Ready for binary (xmodem) download "
			"to 0x%08lX at %d bps...\n",
			offset,
			load_baudrate);
		addr = load_serial_xmodem (offset);
	}



你可能感兴趣的:(cmd,File,嵌入式,download)