This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problems to upload Hex file to CC2530F256

Hello:

 

I'm using the Zigbee ZStack-CC2530-2.3.0-1.4.0 with IAR workbench 8051 and SmartRF Flash Programmer to program a module CC2530F2530. I want to program the ESP coordinator application of Smart energy profile in this device but, when I want the program the .hex file (intel-extended) in flash, appear the next error:

I don't know why, because I'm using the original Smart energy profile application and when I build the code I have the next report:

________________________________________________________________
     IAR Universal Linker V4.61T/W32
     Copyright (C) 1987-2010 IAR Systems AB.
 
 176 825 bytes of CODE  memory
      18 bytes of DATA  memory (+ 83 absolute )
   7 615 bytes of XDATA memory
     192 bytes of IDATA memory
       8 bits  of BIT   memory
     697 bytes of CONST memory
 
Errors: none
Warnings: none
 
 
Total number of errors: 0
Total number of warnings: 1

___________________________________________________________________

I have enough space to program this code in CC2530F256 flash memory.

 

Please, if someone has the same problem and can solved please replay.

 

Best regards

 

NAlves

 

  • This has to do with how the linker treats the extended addresses when using banked code model for the 8051 architecture. You will need to remap the addresses to make this work. But this is really simple. just open the linker file (you'll find it in the project under the "Tools" group and the file is called f8w2530.xcl).

    Just scroll down and un-comment the two lines where it says "Include these two lines when generating a .hex file for banked code model:"

    You can leave the two lines un-commented also when you're not making HEX files (at least if you're using IAR EW8051 v7.51A or later), but you will always get a linker warning. This workning can be ignored. You can actually turn it off by adding the following line to the linker file:

    -ww69=i

    A few more details: The -M option is needed when linker output should be in the "intel-extended" (HEX) file format for banked code model. It translates the logical addresses used by EW8051/XLINK linker to the correct physical flash addresses used in output file format. (Without this, the HEX output file will include 32 kB blocks of empty space/gaps in between each code bank, and our HEX image will not work.)

  • That's perfect. Thank you very mutch, its working!

    Best Regards

    Nuno Alves