stm32f10x_flash.ld 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /***********************************************************************************
  2. *
  3. * stm32f10x_flash.ld - linker script include for nutos on cotrex-m3 STM32F series
  4. *
  5. ***********************************************************************************/
  6. /* PROVIDE (__heap_start = _sheap); */
  7. _ramend = ORIGIN(SRAM0) + LENGTH(SRAM0);
  8. SECTIONS
  9. {
  10. .text :
  11. {
  12. . = ALIGN(4);
  13. _svect = .;
  14. KEEP(*(.isr_vector))
  15. _evect = .;
  16. *(.nutinit)
  17. *(.text .text.* .gnu.linkonce.t.*)
  18. *(.rodata .rodata* .gnu.linkonce.r.*)
  19. *(.glue_7t)
  20. *(.glue_7)
  21. *(.gcc_except_table)
  22. . = ALIGN(4);
  23. } > FLASH0
  24. /* .ARM.exidx is sorted, so has to go in its own output section. */
  25. .exidx : {
  26. __exidx_start = .;
  27. *(..exidx* .gnu.linkonce.armexidx.*)
  28. __exidx_end = .;
  29. } > FLASH0
  30. _etext = .;
  31. .vtable (NOLOAD):
  32. {
  33. . = ALIGN(4);
  34. _vtable = .;
  35. *(.vtable*)
  36. . = ALIGN(4);
  37. _evtable = .;
  38. } > SRAM0
  39. .data : AT (_etext)
  40. {
  41. _sdata = .;
  42. *(.data .data.* .gnu.linkonce.d.*)
  43. . = ALIGN(4);
  44. *(.ramfunc);
  45. . = ALIGN(4);
  46. _edata = .;
  47. } > SRAM0
  48. .bss (NOLOAD):
  49. {
  50. _sbss = .;
  51. *(.bss .bss.* .gnu.linkonce.b.*)
  52. *(COMMON)
  53. . = ALIGN(4);
  54. _ebss = .;
  55. } > SRAM0
  56. .stack (NOLOAD):
  57. {
  58. . = ALIGN(8);
  59. _stack_start = .;
  60. KEEP(*(.stack .stack.*));
  61. _stack_end = .;
  62. } > SRAM0
  63. .psp_stack (NOLOAD):
  64. {
  65. . = ALIGN(8);
  66. _pspstack_start = .;
  67. KEEP(*(.psp_stack .psp_stack.*));
  68. _pspstack_end = .;
  69. PROVIDE (__heap_start = .);
  70. } > SRAM0
  71. /*
  72. .heap (NOLOAD):
  73. {
  74. . = ALIGN(4);
  75. _sheap = .;
  76. . = _ramend - .;
  77. _eheap = .;
  78. } > SRAM0
  79. */
  80. end = .;
  81. /*
  82. DISCARD :
  83. {
  84. libc.a ( * )
  85. libm.a ( * )
  86. libgcc.a ( * )
  87. }
  88. */
  89. /* Stabs debugging sections. */
  90. .stab 0 : { *(.stab) }
  91. .stabstr 0 : { *(.stabstr) }
  92. .stab.excl 0 : { *(.stab.excl) }
  93. .stab.exclstr 0 : { *(.stab.exclstr) }
  94. .stab.index 0 : { *(.stab.index) }
  95. .stab.indexstr 0 : { *(.stab.indexstr) }
  96. .comment 0 : { *(.comment) }
  97. /* DWARF debug sections.
  98. Symbols in the DWARF debugging sections are relative to the beginning
  99. of the section so we begin them at 0. */
  100. /* DWARF 1 */
  101. .debug 0 : { *(.debug) }
  102. .line 0 : { *(.line) }
  103. /* GNU DWARF 1 extensions */
  104. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  105. .debug_sfnames 0 : { *(.debug_sfnames) }
  106. /* DWARF 1.1 and DWARF 2 */
  107. .debug_aranges 0 : { *(.debug_aranges) }
  108. .debug_pubnames 0 : { *(.debug_pubnames) }
  109. /* DWARF 2 */
  110. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  111. .debug_abbrev 0 : { *(.debug_abbrev) }
  112. .debug_line 0 : { *(.debug_line) }
  113. .debug_frame 0 : { *(.debug_frame) }
  114. .debug_str 0 : { *(.debug_str) }
  115. .debug_loc 0 : { *(.debug_loc) }
  116. .debug_macinfo 0 : { *(.debug_macinfo) }
  117. /* SGI/MIPS DWARF 2 extensions */
  118. .debug_weaknames 0 : { *(.debug_weaknames) }
  119. .debug_funcnames 0 : { *(.debug_funcnames) }
  120. .debug_typenames 0 : { *(.debug_typenames) }
  121. .debug_varnames 0 : { *(.debug_varnames) }
  122. }