资源简介
dsp hex文件转bin文件
可以把f28335等dsp的hex文件转换成bin文件
代码片段和文件信息
// FileIOShell.cpp : Defines the entry point for the console application.
//
#include “stdafx.h“
#include “FileIOShell.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// Global Structure for storing command line arguments
typedef struct tCommandLineArgs
{
CString sInFileName ;
CString sOutFileName ;
CString sInCMDFileName ;
int nMaxFileSize ;
char cData[MAXFILESIZE] ;
long nBlockAddr[MAXBLOCKNUM];
int nBlockCount;
} sCommandLineArgs ;
void InitializeCommandLineArgs(sCommandLineArgs *sContext) ;
BOOL ParseCommandLine(int argc TCHAR* argv[] sCommandLineArgs *sContext) ;
// The one and only application object
CWinApp theApp;
using namespace std;
int _tmain(int argc TCHAR* argv[] TCHAR* envp[])
{
int nRetCode = 0;
sCommandLineArgs sContext ;
// initialize MFC and print and error on failure
if (!AfxWinInit(::GetModuleHandle(NULL) NULL ::GetCommandLine() 0))
{
// TODO: change error code to suit your needs
_tprintf(_T(“Fatal Error: MFC initialization failed\n“));
nRetCode = 1;
}
else
{
// TODO: code your application‘s behavior here.
// Initialize Command Line Argument structure
InitializeCommandLineArgs(&sContext) ;
// Parse the command line arguments
if (ParseCommandLine(argc argv &sContext) == FALSE)
return nRetCode ;
// Read an ASCII text file into an array to be manipulated
bReadFileToArray2(sContext.sInFileName &sContext.nMaxFileSize &sContext.cData[0]) ;
// bReadFileToArray(sContext.sInCMDFileName &sContext.nMaxFileSize &sContext.cData[0]) ;
HEXtoBinary(&sContext.nMaxFileSize &sContext.cData[0]);
// SwapEndian(&sContext.nMaxFileSize &sContext.cData[0]);
// MotHEXtoBinary(&sContext.nMaxFileSize &sContext.cData[0]);
// IntelHEXtoBinary(&sContext.nMaxFileSize &sContext.cData[0]);
// BuildBlockAddrArray(&sContext.nMaxFileSize &sContext.cData[0] &sContext.nBlockAddr[0] &sContext.nBlockCount);
// SortBlockAddrArray(&sContext.nBlockAddr[0] &sContext.nBlockCount);
// SortBlockDataRecords(&sContext.nMaxFileSize &sContext.cData[0] &sContext.nBlockAddr[0] &sContext.nBlockCount);
// RemoveExtraInfo(&sContext.nMaxFileSize &sContext.cData[0] &sContext.nBlockAddr[0] &sContext.nBlockCount);
bWriteArrayToFile(sContext.sOutFileName &sContext.nMaxFileSize &sContext.cData[0]) ;
}
return nRetCode;
}
/* **********************************************************************
// Subroutines used for supporting the main function. These routines are
// used to initialize the structure that holds the Command Line Arguments.
// There is additional support for Parsing the Command Line Arguments.
// **********************************************************************
*/
void InitializeCommandLineArgs(sCommandLineArgs *sContext)
{
int i ;
// (*sContext).sInFileName = “C:\\Projects\\FileIOShell\\Debug\\IPM.hex“ ;
// (*sContext).sOutFileName = “C:\\Projects\\FileIO
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 17708 2007-04-19 00:53 FileIOShell\FileIOShell.aps
文件 5351 2007-07-13 22:00 FileIOShell\FileIOShell.cpp
文件 63 2007-01-20 20:23 FileIOShell\FileIOShell.h
文件 1371 2007-01-20 18:28 FileIOShell\FileIOShell.rc
文件 911 2007-03-13 09:24 FileIOShell\FileIOShell.sln
..A..H. 14848 2007-07-12 13:13 FileIOShell\FileIOShell.suo
..A..H. 14848 2007-07-12 13:13 FileIOShell\FileIOShell.v11.suo
文件 4202 2007-01-20 20:24 FileIOShell\FileIOShell.vcproj
文件 20111 2007-07-13 21:53 FileIOShell\FileLibrary.cpp
文件 2432 2007-07-13 21:53 FileIOShell\FileLibrary.h
文件 1863 2007-01-20 18:28 FileIOShell\ReadMe.txt
文件 24576 2007-07-13 22:00 FileIOShell\Release\FileIOShell.exe
文件 410 2007-01-20 18:28 FileIOShell\Resource.h
文件 298 2007-01-20 18:28 FileIOShell\stdafx.cpp
文件 833 2007-01-20 18:28 FileIOShell\stdafx.h
目录 0 2007-07-25 01:01 FileIOShell\Release
目录 0 2015-08-19 14:07 FileIOShell
----------- --------- ---------- ----- ----
109825 17
- 上一篇:电力负荷预测
- 下一篇:STM32F107原理图封装库
相关资源
- Hex-Editor64.zip
- 完整版CentOS-6.6-i386-bin-DVD1.iso,linux镜
- CentOS-6.6-i386-bin-DVD1.iso,linux镜像文件
- subinacl.exe
- tiny210-uboot.bin
- EXE文件捆绑机FileBinder
- hadoop2.7.2windows10编译后的bin目录文件
- 64位以内Rabin-Miller 强伪素数测试和P
- 斑马ZEBRA ZPL指令打印所需SMT.ZEBRA.dll以
- BIN文件编辑器(地球人都知道
- TXT文本转成BIN文件
- C51智能反编译器将HEX 文件反编译成
- 调用bing搜索api 本地网站实现搜索功能
- 51hex或bin反汇编.rar
- bin与xls互转工具
- CAPL编写的基于UDS的bootloader
- 二进制文件合并工具 V1.1 (超好用)
- u-boot.bin_tekkaman_2009.11.bz2
- hex和bin文件互转
- vfp 动态添加控件的事件绑定处理
- PantechToolsV0.1
- A Wetting-Depth Model for Explanation of Wall-
- NHibernate-2.1.2.GA-bin.zip
- apache-maven-3.5.0-bin 64位安装包
- CentOS-5.5-x86_64-bin-DVD-1of2 ISO镜像
- 51Hex_Bin与51Bin_HEX
- HEX文件和BIN文件相互转换工具
- 51单片机bit、sbin、sfr、sfr_16有什么区
-
Atomic-la
yer and Crystal-Orientation Resolv - Dissipation of carbendazim and chloramphenicol
评论
共有 条评论