stm32f10x_ram.ld 3.2 KB

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