f8w2530.xcl 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. /**************************************************************************************************
  2. Filename: f8w2530.xcl
  3. Revised: $Date: 2012-03-29 12:09:02 -0700 (Thu, 29 Mar 2012) $
  4. Revision: $Revision: 29943 $
  5. Description: This is a linker command line file for the IAR XLINK tool for the
  6. CC2530 SoC and Z-Stack sample applications where the General Options
  7. for location for constants and strings is "ROM mapped as data".
  8. Copyright 2009-2010 Texas Instruments Incorporated. All rights reserved.
  9. IMPORTANT: Your use of this Software is limited to those specific rights
  10. granted under the terms of a software license agreement between the user
  11. who downloaded the software, his/her employer (which must be your employer)
  12. and Texas Instruments Incorporated (the "License"). You may not use this
  13. Software unless you agree to abide by the terms of the License. The License
  14. limits your use, and you acknowledge, that the Software may not be modified,
  15. copied or distributed unless embedded on a Texas Instruments microcontroller
  16. or used solely and exclusively in conjunction with a Texas Instruments radio
  17. frequency transceiver, which is integrated into your product. Other than for
  18. the foregoing purpose, you may not use, reproduce, copy, prepare derivative
  19. works of, modify, distribute, perform, display or sell this Software and/or
  20. its documentation for any purpose.
  21. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  22. PROVIDED “AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  23. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  24. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  25. TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
  26. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  27. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  28. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  29. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  30. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  31. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  32. Should you have any questions regarding your right to use this Software,
  33. contact Texas Instruments Incorporated at www.TI.com.
  34. **************************************************************************************************/
  35. ////////////////////////////////////////////////////////////////////////////////
  36. //
  37. //
  38. // Segment limits
  39. // --------------
  40. //
  41. //
  42. // XDATA available to the program.
  43. //
  44. // Reserving address 0x0 for NULL.
  45. -D_XDATA_START=0x0001
  46. -D_XDATA_END=0x1EFF
  47. //
  48. //
  49. // The 8052 IDATA is overlayed on the SoC XDATA space from 0x1F00-0x1FFF.
  50. //
  51. -D_IDATA_END=0xFF // Last address of Idata memory.
  52. //
  53. //
  54. // CODE
  55. //
  56. -D_CODE_START=0x0000
  57. -D_CODE_END=0x7FFF // Last address for ROOT bank.
  58. //
  59. -D_FIRST_BANK_ADDR=0x10000
  60. //
  61. //
  62. //
  63. // Special SFRs
  64. // ------------
  65. //
  66. // Register bank setup
  67. //
  68. -D?REGISTER_BANK=0 // Default register bank (0,1,2,3).
  69. -D_REGISTER_BANK_START=0 // Start address for default register bank (00,08,10,18).
  70. //
  71. //
  72. // PDATA page setup
  73. //
  74. -D?PBANK_NUMBER=00 // High byte of 16-bit address to the PDATA area.
  75. //
  76. //
  77. // Virtual register setup
  78. // ----------------------
  79. //
  80. -D_BREG_START=0x00 // The bit address where the BREG segments starts.
  81. // Must be placed on: _BREG_START%8=0 where _BREG_START <= 0x78.
  82. -D?VB=0x20 // ?VB is used when referencing BREG as whole byte.
  83. // Must be placed on: ?VB=0x20+_BREG_START/8.
  84. //
  85. ////////////////////////////////////////////////////////////////////////////////
  86. ////////////////////////////////////////////////////////////////////////////////
  87. //
  88. // IDATA memory
  89. //
  90. // Setup "bit" segments (only for '__no_init bool' variables).
  91. -Z(BIT)BREG=_BREG_START
  92. -Z(BIT)BIT_N=0-7F
  93. -Z(DATA)REGISTERS+8=_REGISTER_BANK_START
  94. -Z(DATA)BDATA_Z,BDATA_N,BDATA_I=20-2F
  95. -Z(DATA)VREG+_NR_OF_VIRTUAL_REGISTERS=08-7F
  96. -Z(DATA)PSP,XSP=08-7F
  97. -Z(DATA)DOVERLAY=08-7F
  98. -Z(DATA)DATA_I,DATA_Z,DATA_N=08-7F
  99. -U(IDATA)0-7F=(DATA)0-7F
  100. -Z(IDATA)IDATA_I,IDATA_Z,IDATA_N=08-_IDATA_END
  101. -Z(IDATA)ISTACK+_IDATA_STACK_SIZE#08-_IDATA_END
  102. -Z(IDATA)IOVERLAY=08-FF
  103. ////////////////////////////////////////////////////////////////////////////////
  104. //
  105. // ROM memory
  106. //
  107. //
  108. // The following segments *must* be placed in the root bank. The order of
  109. // placement also matters for these segments, which is why we use the -Z
  110. // placement directive.
  111. //
  112. -Z(CODE)INTVEC=_CODE_START
  113. -Z(CODE)BIT_ID,BDATA_ID,DATA_ID,IDATA_ID,IXDATA_ID,PDATA_ID,XDATA_ID=_CODE_START-_CODE_END
  114. //
  115. // Sleep PCON instruction must be 4-byte aligned.
  116. //
  117. -D_SLEEP_CODE_SPACE_START=(_CODE_END-7)
  118. -D_SLEEP_CODE_SPACE_END=(_CODE_END)
  119. -Z(CODE)SLEEP_CODE=_SLEEP_CODE_SPACE_START-_SLEEP_CODE_SPACE_END
  120. //
  121. // The following segments *must* be placed in the root bank, but the order
  122. // of placement within the root bank is not important, which is why we use the
  123. // -P directive here.
  124. //
  125. -P(CODE)CSTART,BANK_RELAYS,RCODE,DIFUNCT,NEAR_CODE=_CODE_START-_CODE_END
  126. //
  127. // Setup for constants located in code memory:
  128. //
  129. -P(CODE)CODE_C=_CODE_START-_CODE_END
  130. //
  131. // Define segments for const data in flash.
  132. // First the segment with addresses as used by the program (flash mapped as XDATA)
  133. -P(CONST)XDATA_ROM_C=0x8000-0xFFFF
  134. //
  135. // Then the segment with addresses as put in the hex file (flash bank 1)
  136. -P(CODE)XDATA_ROM_C_FLASH=0x18000-0x1FFFF
  137. //
  138. // Finally link these segments (XDATA_ROM_C_FLASH is the initializer segment for XDATA_ROM_C,
  139. // we map the flash in the XDATA address range instead of copying the data to RAM)
  140. -QXDATA_ROM_C=XDATA_ROM_C_FLASH
  141. //
  142. // The directive below ensures that the remaining space in the root bank gets
  143. // filled, then starts filling the banks.
  144. //
  145. -P(CODE)BANKED_CODE=_CODE_START-_CODE_END,0x18000-0x1FFFF,0x28000-0x2FFFF,0x38000-0x3FFFF,\
  146. 0x48000-0x4FFFF,0x58000-0x5FFFF,0x68000-0x6FFFF,0x78000-0x7F7FF
  147. ////////////////////////////////////////////////////////////////////////////////
  148. //
  149. // XDATA memory
  150. //
  151. -Z(XDATA)XSTACK+_XDATA_STACK_SIZE=_XDATA_START-_XDATA_END
  152. -Z(XDATA)XDATA_Z,XDATA_I=_XDATA_START-_XDATA_END
  153. -P(XDATA)XDATA_N=_XDATA_START-_XDATA_END
  154. -cx51
  155. ////////////////////////////////////////////////////////////////////////////////
  156. //
  157. // Texas Instruments device specific
  158. // =================================
  159. //
  160. //
  161. // Layout of CODE banks
  162. // -------------------
  163. //
  164. //-D_BANK0_START=0x08000
  165. //-D_BANK0_END=0x0FFFF
  166. //
  167. //-D_BANK1_START=0x18000
  168. //-D_BANK1_END=0x1FFFF
  169. //
  170. //-D_BANK2_START=0x28000
  171. //-D_BANK2_END=0x2FFFF
  172. //
  173. //-D_BANK3_START=0x38000
  174. //-D_BANK3_END=0x3FFFF
  175. //
  176. //-D_BANK4_START=0x48000
  177. //-D_BANK4_END=0x4FFFF
  178. //
  179. //-D_BANK5_START=0x58000
  180. //-D_BANK5_END=0x5FFFF
  181. //
  182. //-D_BANK6_START=0x68000
  183. //-D_BANK6_END=0x6FFFF
  184. //
  185. //-D_BANK7_START=0x78000
  186. //-D_BANK7_END=0x7FFFF
  187. //
  188. //
  189. // Include these two lines when generating a .hex file for banked code model:
  190. -M(CODE)[(_CODEBANK_START+_FIRST_BANK_ADDR)-(_CODEBANK_END+_FIRST_BANK_ADDR)]*\
  191. _NR_OF_BANKS+_FIRST_BANK_ADDR=0x8000
  192. //
  193. //
  194. // Internal flash used for NV address space: reserving 6 pages.
  195. // NV memory segment size must coincide with page declarations in "hal_board_cfg.h" file.
  196. //
  197. -D_ZIGNV_ADDRESS_SPACE_START=(((_NR_OF_BANKS+1)*_FIRST_BANK_ADDR)-0x3800)
  198. -D_ZIGNV_ADDRESS_SPACE_END=(_ZIGNV_ADDRESS_SPACE_START+0x2FFF)
  199. -Z(CODE)ZIGNV_ADDRESS_SPACE=_ZIGNV_ADDRESS_SPACE_START-_ZIGNV_ADDRESS_SPACE_END
  200. //
  201. //
  202. //
  203. // The last available page of flash is reserved for special use as follows
  204. // (addressing from the end of the page down):
  205. // 16 bytes Lock bits
  206. // 8 bytes IEEE address space (EUI-64)
  207. // 22 bytes Device Private Key (21 bytes + 1 byte pad to NV word size)
  208. // 22 bytes CA Public Key (22 bytes)
  209. // 48 bytes Implicit Certificate (48 bytes)
  210. // 1932 bytes Reserved for future Z-Stack use (1932 bytes)
  211. //
  212. -D_LOCK_BITS_ADDRESS_SPACE_START=(((_NR_OF_BANKS+1)*_FIRST_BANK_ADDR)-0x10)
  213. -D_LOCK_BITS_ADDRESS_SPACE_END=(_LOCK_BITS_ADDRESS_SPACE_START+0x0F)
  214. -Z(CODE)LOCK_BITS_ADDRESS_SPACE=_LOCK_BITS_ADDRESS_SPACE_START-_LOCK_BITS_ADDRESS_SPACE_END
  215. //
  216. -D_IEEE_ADDRESS_SPACE_START=(_LOCK_BITS_ADDRESS_SPACE_START-0x08)
  217. -D_IEEE_ADDRESS_SPACE_END=(_IEEE_ADDRESS_SPACE_START+0x07)
  218. -Z(CODE)IEEE_ADDRESS_SPACE=_IEEE_ADDRESS_SPACE_START-_IEEE_ADDRESS_SPACE_END
  219. //
  220. -D_DEV_PRIVATE_KEY_ADDRESS_SPACE_START=(_IEEE_ADDRESS_SPACE_START-0x16)
  221. -D_DEV_PRIVATE_KEY_ADDRESS_SPACE_END=(_DEV_PRIVATE_KEY_ADDRESS_SPACE_START+0x15)
  222. -Z(CODE)DEV_PRIVATE_KEY_ADDRESS_SPACE=_DEV_PRIVATE_KEY_ADDRESS_SPACE_START-_DEV_PRIVATE_KEY_ADDRESS_SPACE_END
  223. //
  224. -D_CA_PUBLIC_KEY_ADDRESS_SPACE_START=(_DEV_PRIVATE_KEY_ADDRESS_SPACE_START-0x16)
  225. -D_CA_PUBLIC_KEY_ADDRESS_SPACE_END=(_CA_PUBLIC_KEY_ADDRESS_SPACE_START+0x15)
  226. -Z(CODE)CA_PUBLIC_KEY_ADDRESS_SPACE=_CA_PUBLIC_KEY_ADDRESS_SPACE_START-_CA_PUBLIC_KEY_ADDRESS_SPACE_END
  227. //
  228. -D_IMPLICIT_CERTIFICATE_ADDRESS_SPACE_START=(_CA_PUBLIC_KEY_ADDRESS_SPACE_START-0x30)
  229. -D_IMPLICIT_CERTIFICATE_ADDRESS_SPACE_END=(_IMPLICIT_CERTIFICATE_ADDRESS_SPACE_START+0x2F)
  230. -Z(CODE)IMPLICIT_CERTIFICATE_ADDRESS_SPACE=_IMPLICIT_CERTIFICATE_ADDRESS_SPACE_START-_IMPLICIT_CERTIFICATE_ADDRESS_SPACE_END
  231. //
  232. -D_RESERVED_ADDRESS_SPACE_START=(_IMPLICIT_CERTIFICATE_ADDRESS_SPACE_START-0x78C)
  233. -D_RESERVED_ADDRESS_SPACE_END=(_RESERVED_ADDRESS_SPACE_START+0x78B)
  234. -Z(CODE)RESERVED_ADDRESS_SPACE=_RESERVED_ADDRESS_SPACE_START-_RESERVED_ADDRESS_SPACE_END
  235. //
  236. ////////////////////////////////////////////////////////////////////////////////