sb-boot.xcl 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /**************************************************************************************************
  2. Filename: sb-boot.xcl
  3. Revised: $Date: 2012-03-27 14:53:26 -0700 (Tue, 27 Mar 2012) $
  4. Revision: $Revision: 29910 $
  5. Description: This is a linker command line file for the IAR XLINK tool for the
  6. CC2530/31 SoC. This mapping is to build serial boot loader code.
  7. Copyright 2009-2012 Texas Instruments Incorporated. All rights reserved.
  8. IMPORTANT: Your use of this Software is limited to those specific rights
  9. granted under the terms of a software license agreement between the user
  10. who downloaded the software, his/her employer (which must be your employer)
  11. and Texas Instruments Incorporated (the "License"). You may not use this
  12. Software unless you agree to abide by the terms of the License. The License
  13. limits your use, and you acknowledge, that the Software may not be modified,
  14. copied or distributed unless embedded on a Texas Instruments microcontroller
  15. or used solely and exclusively in conjunction with a Texas Instruments radio
  16. frequency transceiver, which is integrated into your product. Other than for
  17. the foregoing purpose, you may not use, reproduce, copy, prepare derivative
  18. works of, modify, distribute, perform, display or sell this Software and/or
  19. its documentation for any purpose.
  20. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  21. PROVIDED “AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  22. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  23. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  24. TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
  25. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  26. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  27. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  28. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  29. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  30. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  31. Should you have any questions regarding your right to use this Software,
  32. contact Texas Instruments Incorporated at www.TI.com.
  33. **************************************************************************************************/
  34. ////////////////////////////////////////////////////////////////////////////////
  35. //
  36. //
  37. // Segment limits
  38. // --------------
  39. //
  40. //
  41. // XDATA available to the program.
  42. //
  43. -D_XDATA_START=0x0000
  44. -D_XDATA_END=0x1EFF
  45. //
  46. //
  47. // The 8052 IDATA is overlayed on the SoC XDATA space from 0x1F00-0x1FFF.
  48. //
  49. -D_IDATA_END=0xFF // Last address of Idata memory.
  50. //
  51. //
  52. // CODE
  53. //
  54. -D_CODE_START=0x0000
  55. -D_CODE_END=0x1FFF
  56. //
  57. //
  58. //
  59. // Special SFRs
  60. // ------------
  61. //
  62. // Register bank setup
  63. //
  64. -D?REGISTER_BANK=0 // Default register bank (0,1,2,3).
  65. -D_REGISTER_BANK_START=0 // Start address for default register bank (00,08,10,18).
  66. //
  67. //
  68. // PDATA page setup
  69. //
  70. -D?PBANK_NUMBER=00 // High byte of 16-bit address to the PDATA area.
  71. //
  72. //
  73. // Virtual register setup
  74. // ----------------------
  75. //
  76. -D_BREG_START=0x00 // The bit address where the BREG segments starts.
  77. // Must be placed on: _BREG_START%8=0 where _BREG_START <= 0x78.
  78. -D?VB=0x20 // ?VB is used when referencing BREG as whole byte.
  79. // Must be placed on: ?VB=0x20+_BREG_START/8.
  80. //
  81. ////////////////////////////////////////////////////////////////////////////////
  82. ////////////////////////////////////////////////////////////////////////////////
  83. //
  84. // IDATA memory
  85. //
  86. // Setup "bit" segments (only for '__no_init bool' variables).
  87. -Z(BIT)BREG=_BREG_START
  88. -Z(BIT)BIT_N=0-7F
  89. -Z(DATA)REGISTERS+8=_REGISTER_BANK_START
  90. -Z(DATA)BDATA_Z,BDATA_N,BDATA_I=20-2F
  91. -Z(DATA)VREG+_NR_OF_VIRTUAL_REGISTERS=08-7F
  92. -Z(DATA)PSP,XSP=08-7F
  93. -Z(DATA)DOVERLAY=08-7F
  94. -Z(DATA)DATA_I,DATA_Z,DATA_N=08-7F
  95. -U(IDATA)0-7F=(DATA)0-7F
  96. -Z(IDATA)IDATA_I,IDATA_Z,IDATA_N=08-_IDATA_END
  97. -Z(IDATA)ISTACK+_IDATA_STACK_SIZE#08-_IDATA_END
  98. -Z(IDATA)IOVERLAY=08-FF
  99. ////////////////////////////////////////////////////////////////////////////////
  100. //
  101. // ROM memory
  102. //
  103. //
  104. // The following segments *must* be placed in the root bank. The order of
  105. // placement also matters for these segments, which is why we use the -Z
  106. // placement directive.
  107. //
  108. -Z(CODE)INTVEC=_CODE_START
  109. -Z(CODE)BIT_ID,BDATA_ID,DATA_ID,IDATA_ID,IXDATA_ID,PDATA_ID,XDATA_ID=_CODE_START-_CODE_END
  110. //
  111. //
  112. // The following segments *must* be placed in the root bank, but the order
  113. // of placement within the root bank is not important, which is why we use the
  114. // -P directive here.
  115. //
  116. -P(CODE)CSTART,RCODE,DIFUNCT,NEAR_CODE=_CODE_START-_CODE_END
  117. ////////////////////////////////////////////////////////////////////////////////
  118. //
  119. // XDATA memory
  120. //
  121. -Z(XDATA)XSTACK+_XDATA_STACK_SIZE=_XDATA_START-_XDATA_END
  122. -Z(XDATA)XDATA_Z,XDATA_I=_XDATA_START-_XDATA_END
  123. -P(XDATA)XDATA_N=_XDATA_START-_XDATA_END
  124. -cx51
  125. ////////////////////////////////////////////////////////////////////////////////
  126. //
  127. // Texas Instruments device specific
  128. // =================================
  129. //
  130. //
  131. // Fill code gaps with 0xFFFF so that the .hex image produced is full.
  132. -HFFFF
  133. //
  134. ////////////////////////////////////////////////////////////////////////////////