📄 coffparse.h
字号:
///////////////////////////////////////////////////////////////////////////////
// coffParse.h
//
// Description:
// Parses any and all COFF files and returns values that can be used to
// download to the DSP. From external function, call ParseCoff.Then, it
// returns the following.
// - DSP address where the code should be loaded
// - Number of words to load
// - Data to load
// - Number of sections to be loaded
//
// Revision History:
// 2001-11-06: mik
// Created.
// 2002-03-06: mik
// Removed UINT8. basetsd.h from MS screws things up!
// 2002-04-17: mik
// Shuffled #define paths to reflect directory changes.
//
///////////////////////////////////////////////////////////////////////////////
#include "../common_ddk/sitypes.h"
////////////////////////////////////////////////////////////////////////////////
#define kCOFF_MaxBufferSize 256000 // 256k is max size for coff file
#define kCOFF_MaxNumberOfSections 1024// maximum of 1024 loadable sections
////////////////////////////////////////////////////////////////////////////////
#define STYP_REG 0x0000 //Regular section (allocated, relocated, loaded)
#define STYP_DSECT 0x0001 //Dummy section (relocated, not allocated, not
// loaded)
#define STYP_NOLOAD 0x0002 //Noload section (allocated, relocated, not
// loaded)
#define STYP_GROUP 0x0004 //Grouped section (formed from several input
// sections)
#define STYP_PAD 0x0008 //Padding section (loaded, not allocated, not
// relocated)
#define STYP_COPY 0x0010 //Copy section (relocated, loaded, but not
// allocated; re-location and line-number
// entries are processed normal-ly)
#define STYP_TEXT 0x0020 //Section that contains executable code
#define STYP_DATA 0x0040 //Section that contains initialized data
#define STYP_BSS 0x0080 //Section that contains uninitialized data
#define STYP_ALIGN 0x0700 //Section that is aligned on a page boundary
////////////////////////////////////////////////////////////////////////////////
int ParseCoff
(
char *filename, char *buffer,
UINT32 dspAddr[], UINT32 size[], UINT32 *data[], UINT32 *loadableSections
);
int COFF_DebugWriteToFile
(
char *coffFile, char *textFile
);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -