资源简介
使用uniflash烧写am335x目前还没有一个详细的的教程,不少网友在使用uniflash烧写am335x时遇到了不少的问题,作者最近在自己的板子移植了使用uniflash通过网口和usb口烧写程序程序的功能,特出此教程。详细介绍了使用uniflash通过网口和usb口烧写程序的流程。包括uboot移植详细教程、烧写指导和整个烧写过程中用到的所有源码。
代码片段和文件信息
/*
* Module: flash_cat_util.c
*
* Description: This program is used to demostrate concatenate binary
* images.
*
* Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* “AS IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT
* LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL
* SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT
* LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE
* DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include
#include
#include
#include
#include
#include
#define BLOCK_SIZE 2048
//
// ofile - output file expecting concatenate the input file
// expecting the file to be open and ready to write
// when function exits the file will be aligned on
// a boundary defined by block size
//
// info_file - contain offsets of files written to ofile
//
// infile_name - name of the file to read and concatenate
// on the of ofile.
//
//
void cat_file(FILE *ofile FILE *info_file char *infile_nameunsigned long *offset)
{
char ch;
FILE *ifile;
struct stat sinfo;
unsigned long iloadaddr len;
int cntleftoverpadding;
unsigned char info_string[256];
printf(“\n Opening Input File %s \n“infile_name);
// Open the MLO input file.
ifile = fopen(infile_name “rb“);
if (ifile == NULL) {
printf(“Cannot open %s\n“ infile_name);
exit(0);
}
// Get file length.
stat(infile_name &sinfo);
len = sinfo.st_size;
printf(“\n len of %s is %ld \n“infile_namelen);
for (i=0; i fread(&ch 1 1 ifile);
fwrite(&ch 1 1 ofile);
}
leftover = len % (int)BLOCK_SIZE;
padding = (int)BLOCK_SIZE
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-04-20 16:23 uniflash烧写am335x详细教程\
文件 535304 2019-04-20 16:10 uniflash烧写am335x详细教程\am335x uniflash烧写功能移植教程.pdf
文件 2083814 2019-04-20 16:11 uniflash烧写am335x详细教程\am335x uniflash烧写指导.pdf
文件 8591 2019-04-20 15:12 uniflash烧写am335x详细教程\debrick.txt
文件 5009 2019-04-13 12:30 uniflash烧写am335x详细教程\flash_cat_util.c
文件 994 2019-04-20 15:12 uniflash烧写am335x详细教程\mk.sh
文件 87751 2019-01-13 23:35 uniflash烧写am335x详细教程\Sitara Uniflash Flash Programming with U-Boot.pdf
文件 1040983 2019-01-27 14:09 uniflash烧写am335x详细教程\Sitara Uniflash Quick Start Guide.pdf
相关资源
- Manfredo Do Carmo - Differential geometry of c
- 基于ARM嵌入式系统的通用Bootloader的设
-
Setup_Jli
nkARM_V440+keygen - 《轻松玩转ARM Cortex-M0+微控制器基于飞
- libopencore-amrnb.a和libopencore-amrwb.a文件
- STM32F407ADC采集信号通过DMA发送给内存
- 基于ARM的银行排队系统的设计实现
- ARM9嵌入式系统硬件设计指南(上)
- 《ARMv7-M体系结构应用级参考手册》
- 基于S3C2440的keil For ARM程序
- 基于QT开发的ARM/windows平台下的视频播
-
arm平台下的mpla
yer视频播放工具 - arm9内核手册
- arm平台可用的RTOS_Nucleus操作系统源码
- libopencore-amrnb.alibopencore-amrwb.aarm64位支
- ARM.RealView.Development.Suite.v4.0
- 《ARM嵌入式系统教程》-课件张石
- 淘宝数据挖掘和数据分析
- ARM 总线资料官网
- ARM Architecture Reference Manual
- libmp3lame(3.100)_iOS静态库支持arm64v
-
J-li
nk ARM-V4.34.exe -
J-li
nk驱动程序arm v4.24 - ARM Cortex-M3系统设计与实现——STM32基
- arm版opencv-2.4.9
- ARM SoC体系结构(中文版).pdf
- arm架构下的boost库文件
- RealView Debugger v4.0中文手册
- ARM常用工具-ftp、烧写工具、串口工具
- hi3798mv100-安卓-Linux双启动.zip
评论
共有 条评论