You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
8.1 KiB

5 years ago
  1. /* ============================================================================ */
  2. /* Copyright (c) 2013, Texas Instruments Incorporated */
  3. /* All rights reserved. */
  4. /* */
  5. /* Redistribution and use in source and binary forms, with or without */
  6. /* modification, are permitted provided that the following conditions */
  7. /* are met: */
  8. /* */
  9. /* * Redistributions of source code must retain the above copyright */
  10. /* notice, this list of conditions and the following disclaimer. */
  11. /* */
  12. /* * Redistributions in binary form must reproduce the above copyright */
  13. /* notice, this list of conditions and the following disclaimer in the */
  14. /* documentation and/or other materials provided with the distribution. */
  15. /* */
  16. /* * Neither the name of Texas Instruments Incorporated nor the names of */
  17. /* its contributors may be used to endorse or promote products derived */
  18. /* from this software without specific prior written permission. */
  19. /* */
  20. /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" */
  21. /* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, */
  22. /* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
  23. /* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR */
  24. /* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */
  25. /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, */
  26. /* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; */
  27. /* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, */
  28. /* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR */
  29. /* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
  30. /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
  31. /* ============================================================================ */
  32. /******************************************************************************/
  33. /* lnk_msp430g2553.cmd - LINKER COMMAND FILE FOR LINKING MSP430G2553 PROGRAMS */
  34. /* */
  35. /* Usage: lnk430 <obj files...> -o <out file> -m <map file> lnk.cmd */
  36. /* cl430 <src files...> -z -o <out file> -m <map file> lnk.cmd */
  37. /* */
  38. /*----------------------------------------------------------------------------*/
  39. /* These linker options are for command line linking only. For IDE linking, */
  40. /* you should set your linker options in Project Properties */
  41. /* -c LINK USING C CONVENTIONS */
  42. /* -stack 0x0100 SOFTWARE STACK SIZE */
  43. /* -heap 0x0100 HEAP AREA SIZE */
  44. /* */
  45. /*----------------------------------------------------------------------------*/
  46. /****************************************************************************/
  47. /* SPECIFY THE SYSTEM MEMORY MAP */
  48. /****************************************************************************/
  49. MEMORY
  50. {
  51. SFR : origin = 0x0000, length = 0x0010
  52. PERIPHERALS_8BIT : origin = 0x0010, length = 0x00F0
  53. PERIPHERALS_16BIT : origin = 0x0100, length = 0x0100
  54. RAM : origin = 0x0200, length = 0x0200
  55. INFOA : origin = 0x10C0, length = 0x0040
  56. INFOB : origin = 0x1080, length = 0x0040
  57. INFOC : origin = 0x1040, length = 0x0040
  58. INFOD : origin = 0x1000, length = 0x0040
  59. FLASH : origin = 0xC000, length = 0x3FE0
  60. INT00 : origin = 0xFFE0, length = 0x0002
  61. INT01 : origin = 0xFFE2, length = 0x0002
  62. INT02 : origin = 0xFFE4, length = 0x0002
  63. INT03 : origin = 0xFFE6, length = 0x0002
  64. INT04 : origin = 0xFFE8, length = 0x0002
  65. INT05 : origin = 0xFFEA, length = 0x0002
  66. INT06 : origin = 0xFFEC, length = 0x0002
  67. INT07 : origin = 0xFFEE, length = 0x0002
  68. INT08 : origin = 0xFFF0, length = 0x0002
  69. INT09 : origin = 0xFFF2, length = 0x0002
  70. INT10 : origin = 0xFFF4, length = 0x0002
  71. INT11 : origin = 0xFFF6, length = 0x0002
  72. INT12 : origin = 0xFFF8, length = 0x0002
  73. INT13 : origin = 0xFFFA, length = 0x0002
  74. INT14 : origin = 0xFFFC, length = 0x0002
  75. RESET : origin = 0xFFFE, length = 0x0002
  76. }
  77. /****************************************************************************/
  78. /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
  79. /****************************************************************************/
  80. SECTIONS
  81. {
  82. .bss : {} > RAM /* GLOBAL & STATIC VARS */
  83. .data : {} > RAM /* GLOBAL & STATIC VARS */
  84. .sysmem : {} > RAM /* DYNAMIC MEMORY ALLOCATION AREA */
  85. .stack : {} > RAM (HIGH) /* SOFTWARE SYSTEM STACK */
  86. .text : {} > FLASH /* CODE */
  87. .cinit : {} > FLASH /* INITIALIZATION TABLES */
  88. .const : {} > FLASH /* CONSTANT DATA */
  89. .cio : {} > RAM /* C I/O BUFFER */
  90. .pinit : {} > FLASH /* C++ CONSTRUCTOR TABLES */
  91. .init_array : {} > FLASH /* C++ CONSTRUCTOR TABLES */
  92. .mspabi.exidx : {} > FLASH /* C++ CONSTRUCTOR TABLES */
  93. .mspabi.extab : {} > FLASH /* C++ CONSTRUCTOR TABLES */
  94. .infoA : {} > INFOA /* MSP430 INFO FLASH MEMORY SEGMENTS */
  95. .infoB : {} > INFOB
  96. .infoC : {} > INFOC
  97. .infoD : {} > INFOD
  98. /* MSP430 INTERRUPT VECTORS */
  99. .int00 : {} > INT00
  100. .int01 : {} > INT01
  101. PORT1 : { * ( .int02 ) } > INT02 type = VECT_INIT
  102. PORT2 : { * ( .int03 ) } > INT03 type = VECT_INIT
  103. .int04 : {} > INT04
  104. ADC10 : { * ( .int05 ) } > INT05 type = VECT_INIT
  105. USCIAB0TX : { * ( .int06 ) } > INT06 type = VECT_INIT
  106. USCIAB0RX : { * ( .int07 ) } > INT07 type = VECT_INIT
  107. TIMER0_A1 : { * ( .int08 ) } > INT08 type = VECT_INIT
  108. TIMER0_A0 : { * ( .int09 ) } > INT09 type = VECT_INIT
  109. WDT : { * ( .int10 ) } > INT10 type = VECT_INIT
  110. COMPARATORA : { * ( .int11 ) } > INT11 type = VECT_INIT
  111. TIMER1_A1 : { * ( .int12 ) } > INT12 type = VECT_INIT
  112. TIMER1_A0 : { * ( .int13 ) } > INT13 type = VECT_INIT
  113. NMI : { * ( .int14 ) } > INT14 type = VECT_INIT
  114. .reset : {} > RESET /* MSP430 RESET VECTOR */
  115. }
  116. /****************************************************************************/
  117. /* INCLUDE PERIPHERALS MEMORY MAP */
  118. /****************************************************************************/
  119. -l msp430g2553.cmd