使用tiobj2bin.bat和mkhex4bin.exe命令生成的.BIN文件超大,通过生成的bin文件发现里面是从RAML2 : origin = 0x008200这个位置开始的,直到begin那个位置,前部大约接近8兆全部是0x00,后面100k左右是正确的数据,对比了下hex文件,按理说前面那部分不应该有,有什么办法能去掉吗,或者官方有hex转bin的工具吗
附上cmd文件:
MEMORY
{
PAGE 0 : /* Program Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
RAML0 : origin = 0x008000, length = 0x000200 /* on-chip RAM block L0 */
OTP : origin = 0x3D7800, length = 0x000400 /* on-chip OTP */
FLASHH_D : origin = 0x3E8002, length = 0x009FFE /* on-chip FLASH */
FLASHC : origin = 0x3F2000, length = 0x002000 /* on-chip FLASH */
CSM_RSVD : origin = 0x3F7F80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
BEGIN : origin = 0x3F5FFE, length = 0x000002
CSM_PWL_P0 : origin = 0x3F7FF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
FPUTABLES : origin = 0x3FD860, length = 0x0006A0 /* FPU Tables in Boot ROM */
IQTABLES : origin = 0x3FDF00, length = 0x000B50 /* IQ Math Tables in Boot ROM */
IQTABLES2 : origin = 0x3FEA50, length = 0x00008C /* IQ Math Tables in Boot ROM */
IQTABLES3 : origin = 0x3FEADC, length = 0x0000AA /* IQ Math Tables in Boot ROM */
ROM : origin = 0x3FF3B0, length = 0x000C10 /* Boot ROM */
RESET : origin = 0x3FFFC0, length = 0x000002 /* part of boot ROM */
VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM */
PAGE 1 : /* Data Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
/* Registers remain on PAGE1 */
BOOT_RSVD : origin = 0x000000, length = 0x000050 /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x000050, length = 0x0007B0 /* on-chip RAM block M0 */
/* RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML2 : origin = 0x008200, length = 0x000E00 /* on-chip RAM block L2 */
RAML3 : origin = 0x009000, length = 0x001000 /* on-chip RAM block L3 */
RAML4 : origin = 0x00A000, length = 0x002000 /* on-chip RAM block L4 */
RAML5 : origin = 0x00C000, length = 0x001FFF /* on-chip RAM block L5 */
IAPFLAG : origin = 0x00DFFF, length = 0x000001 /* 用于存储一个变量通知bootloader不用跳回单锭程序了, */
USB_RAM : origin = 0x040000, length = 0x000800 /* USB RAM */
FLASHB : origin = 0x3F4000, length = 0x002000 /* on-chip FLASH */
}
/* Allocate sections to memory blocks.
Note:
codestart user defined section in DSP28_CodeStartBranch.asm used to redirect code
execution when booting to flash
ramfuncs user defined section to store functions that will be copied from Flash into RAM
*/
SECTIONS
{
/* Allocate program areas: */
.cinit : > FLASHH_D, PAGE = 0
.pinit : > FLASHH_D, PAGE = 0
.text : > FLASHH_D, PAGE = 0
codestart : > BEGIN, PAGE = 0
ramfuncs : LOAD = FLASHC,
RUN = RAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
csmpasswds : > CSM_PWL_P0, PAGE = 0
csm_rsvd : > CSM_RSVD, PAGE = 0
/* Allocate uninitalized data sections: */
.stack : > RAMM0, PAGE = 1
.ebss : > RAML2, PAGE = 1 fill = 0x00
.esysmem : > RAML2, PAGE = 1
.econst : > FLASHH_D, PAGE = 0
.switch : > FLASHH_D, PAGE = 0
FPUmathTables : > FPUTABLES, PAGE = 0, TYPE = NOLOAD
MotBuff : > RAML3, PAGE = 1
CanBuff : > RAML2, PAGE = 1
SciBuff : > RAML3, PAGE = 1
ComBuff : > RAML5, PAGE = 1
ClearAppZone : > IAPFLAG, PAGE = 1
.reset : > RESET, PAGE = 0, TYPE = DSECT
vectors : > VECTORS, PAGE = 0, TYPE = DSECT
}