TI中文支持网
TI专业的中文技术问题搜集分享网站

CC2530 HEX文件如何产生

用SmartRF Flash Programmer给2530烧写程序的时候需要hex文件,

请问该文件在IAR里面怎么产生?要配置哪些选项?

YiKai Chen:

參考一下 zigbee-r.blogspot.com/…/zigbeecc2530-z-stackiar-generating-hex.html

Alvin Chen:

Step 1: Open the Z-stack workspace with IAR and locate the linker file f8w2530.xcl.
The f8w2530.xcl file can be found in the Tools file group in IAR.

To avoid change this file back and forth for debug and release, I copied it to the project folder and added to my release configuration (IAR->Project Option->Linker->Config Tab->Linker Configuration File, override default to the new .xcl)
at Output Tab of Linker, Click the “Override default” option in the “Output file” box and rename the xxx.a51 to xxx.hex

Step 2: Include the linker file –M option by including the 3 lines as shown in the figure below.
// Include these two lines when generating a .hex file for banked code model:
-M(CODE)[(_CODEBANK_START+_FIRST_BANK_ADDR)-(_CODEBANK_END+_FIRST_BANK_ADDR)]*\
_NR_OF_BANKS+_FIRST_BANK_ADDR=0x8000

Jesse Huang:

可参考:CC2530如何在协议栈中输出 .hex 文件 博文

user5367314:

回复 Alvin Chen:

好的,试了没问题
1.如果像debug模式是不是把修改的都再改回去?
2.CC2538是否是一样的步骤?
3.CC2630怎么用Flash Programmer 2下载(home 1.2.2)
2630比较特殊,协议栈和应用程序是分开的,该怎么通过Flash Programmer 2下载?

YiKai Chen:

回复 user5367314:

1. 是的
2. CC2538應該是產生bin不是hex
3. Flash Prgrammer 2可以同時下載协议栈和应用程序,只要選multiple就行

user5367314:

回复 YiKai Chen:

1.2538具体怎么生成bin文件?
2.2630在用Flash Programmer 2下载之前怎么生成烧写文件?

Alvin Chen:

回复 user5367314:

请看C:\ti\simplelink\zstack_home_1_02_02a_44539\Documents\Z-Stack Home Sample Application User's Guide.pdf

也就是说你之前都是用IDE在烧录?建议你在使用SDK前先阅读Documents里面的文档。

YiKai Chen:

回复 user5367314:

1. CC2538

2. CC2630

user5367314:

回复 YiKai Chen:

1.2630的文档里介绍的是直接用IAR下载的方法 2630的应用程序和协议栈都要输出一个hex文件吗?

ZStackCore.hex和SampleSwitch.hex吗?然后multiple这两个文件 2.另外请问NLME_DeviceJoiningInit函数在2630的应用程序里面怎么调用?Home 1.2.2

YiKai Chen:

回复 user5367314:

1. 对
2. 2630沒有辦法调用NLME_DeviceJoiningInit

赞(0)
未经允许不得转载:TI中文支持网 » CC2530 HEX文件如何产生
分享到: 更多 (0)