资源简介
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原理图封装库
相关资源
- 清翔电子MCS51开发板资料_新版 01_开发
- HEX到Bin文件源代码
- 51多机通信(内附Proteus及.hex文件)
- 十六进制与字符串互转
- CentOS-6.7-x86_64-bin-DVD1to2
- Winhex 15 官方中文语言包
-
Hollow fibre ba
sed Liquid-liquid-liquid mic - Cluster Ensembles – A Knowledge Reuse fr
- Coordination-resolved 4f binding energy shift
- CC Decoding: Multi-level Sentence Compression-
- PMW-HEX2.4破解版
- S19转BIN文件工具
- mstar-bin-tool-master.rar
- tp路由器管理员密码config.bin解密
- wdr6500v2.bin
- Genome doubling and chromosome elimination wit
- patchedcode.bin
- Discovery of Reversible and Persistent Electri
- CentOS-6.5-i386-bin-DVD1
- Synthesis of Cyclohexanone-formaldehyde Resi
- The binding and unwinding properties of the Bl
- 支持倍速播放的TV视频播放器源码
- 好用winhex16进制编辑器
- 图数据库第二版 作者[美] 伊恩·罗宾
- 冰河木马程序以及教程
- HS8145V_V300 R019v0122.bin
- BinaryFormatter
- winhex exfat DBR模板
- WinHex 17.2 官方简体中文版 + 注册机
- winhex破解版,永久授权,亲测可以使
评论
共有 条评论