In Z-Stack Samples, we generate .d51 file under "EXE" directory by default. To generate hex file for mass production, I found there is useful introduction at How to configure the IAR EW 8051 to generate a hex file for CC2530 using Z-Stack? (plus link for CC2430/CC2431)
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
For the rest steps you may follow "How to configure the IAR EW 8051 to generate a hex file for CC2530 using Z-Stack? (plus link for CC2430/CC2431)"
I was using
IAR Assembler for 8051
8.10.3 (8.10.3.40338)
ZStack-2.5.1a