从 CCS 调试工具中刷写时、我的程序完全正常运行。
当我创建一个二进制文件并使用 LM 闪存时、我必须对代码进行奇数调整才能使其正确运行。
例如、从 CCS 内刷写时、以下代码正确运行。 但是、当转换为二进制文件并使用 LM 闪存刷写时、它会立即崩溃。
int etherInit(void)
{
/* normal code */
ipaddr_aton(OUR_IP,&gd.requestedIpAddr);
/* normal code */
ipaddr_aton(OUR_SUBNET,&gd.subnetMask);
}
插入以下行、允许代码从 CCS 和 LM 闪存运行。
int etherInit(void)
{
/* had to add this to have the program run correctly using LM Flash */
gd.u32_junk_variable++;
/* normal code */
ipaddr_aton(OUR_IP,&gd.requestedIpAddr);
/* had to add this to have the program run correctly using LM Flash */
gd.u32_junk_variable++;
/* normal code */
ipaddr_aton(OUR_SUBNET,&gd.subnetMask);
}
无论编译器/链接器配置的变体是什么(优化级别、数据对齐等)、使用 CCS 刷写代码时、代码始终有效。
但是、在刷写 LM 闪存时、任何内容都不允许我删除垃圾变量递增器。
任何建议都将受到非常欢迎、
Peter
环境:
Code Composer Studio 版本:11.2.0.00007


调用:ARM 编译器
"c:/ti/ccs1120/cs/tools/compiler/ti-cgt-arm_20.2.LTS / bin/armcl"-mv7M4 -code_state=16 -float_support=FPv4SPD16 -me -fp1 -fp_mode=relaxed -include_tradeway/ti_tran.transc/ove/tif_tran.tran.transc/tran.tran.tran.transc/tran.tran.transc/include/tine/tex-tran.tran.tran.tran.tran/tran/transc/tran.tran.tran.tran.tran.transc/tran.transc/tran.tran.tran.tran.tran.tran.tran.tran.tran.tran.tran.tran.tran.tran.tran.transc/content/tex-content/content/content/content/content/content/content/content/tran.
建筑完工:"../乙醚.c"
构建目标:"FlexGen.out"
调用:ARM 链接器
"c:/ti/ccs1120/ccs/tools/compiler/ti-cgt-arm_20.2.LTS / bin/armcl"-mv7M4 -code_state=16 -float_support=FPv4SPD16 -me -op1 -fp_mode=relaxed=ccs="ccs"-code_status=tex-mag/cc=tex-code.tex-ctrab-code.tex-codest-codest-ctrab-codest-codest-mag=tex-mag-mag-ctrab-codest-cortex-mag-m=tex-m=tex-mag-mag-mag-mag-cortex-mag-cortex-cortex-mag-cortex-m=tex-cortex-cortex-cortex-cortex-cortex-codest-cortex-cortex-cortex-tex-tex-codest-cortex-tex-ctr- xml_link_info="FlexGen_linkInfo.xml"--rom_model -o "FlexGen.out""/dataCollect.obj ""/datib.lib""/define./define.obj "./dq.obj "./filter.obj "./hardware./librt/latit.htm"/content/tobj "/latit.cn/tools.html/rtobj "/latit./latit./latit.cn/lib.cn/tools/tobj status.htm.htm./latit.htm.htm.htm.htm./latit.html/rtobj "/latit./latit.htm.htm.htm.htm.htm.htm./latit.htm./latits.htm./latits.html/rtobj
完成构建目标:"FlexGen.out"
构建次要目标:"FlexGen.bin"
调用:ARM 十六进制实用程序
"C:/ti/ccs1120/ccs/tools/compiler/ti-cgt-arm_20.2.ls/bin/armhex"--fill=0 --binary -o "FlexGen.bin""FlexGen.out"
正在转换为二进制格式...
"FlexGen.out".intvecs =>.intvecs
"FlexGen.out".text =>.text
"FlexGen.out".const =>.const
"FlexGen.out".cinit =>.cinit
已完成构建次要目标:"FlexGen.bin"