Advertisement
Guest User

stm32f4 linker file

a guest
Dec 22nd, 2014
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. /*
  2. STM32F4.ld
  3.  
  4. Development board: STM32F407VGT6
  5.  
  6. */
  7.  
  8. /* Entry Point */
  9. ENTRY(RESET);
  10.  
  11. /* Highest address of the user mode stack */
  12.  
  13. _end_stack = 0x10010000;
  14. /* Generate a link error if the stack doesn't fit into ccm */
  15. _min_stack_size = 0x1000;
  16.  
  17.  
  18. /* Specify the memory areas */
  19. MEMORY
  20. {
  21. FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
  22. CCM (xrw) : ORIGIN = 0X10000000, LENGTH = 64K
  23. BUFFER1 (xrw) : ORIGIN = 0x20000000, LENGTH = 112K
  24. BUFFER2 (xrw) : ORIGIN = 0x2001C000, LENGTH = 16K
  25. FPGA (rw) : ORIGIN = 0x60000000, LENGTH = 0K
  26. }
  27.  
  28. /* Define output sections */
  29. SECTIONS
  30. {
  31.  
  32. /* Startup code first in flash */
  33. .isr_vector :
  34. {
  35. . = ALIGN(4);
  36. KEEP(*(.isr_vector)) /* Startup Code */
  37. . = ALIGN(4);
  38. } >FLASH
  39.  
  40. /* Program code and data located in flash */
  41. .text :
  42. {
  43. . = ALIGN(4);
  44. *(.text) /* .text sections (code) */
  45. *(.text*) /* .text* sections (code) */
  46. *(.rodata) /* .rodata sections (constants, strings, etc.) */
  47. *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
  48. *(.glue_7) /* glue arm to thumb code */
  49. *(.glue_7t) /* glue thumb to arm code */
  50. . = ALIGN(4);
  51. _etext = .; /* define a global symbols at end of code */
  52. } >FLASH
  53.  
  54. _start_ram = .;
  55.  
  56. /* Initialized data section */
  57. .data : AT (_start_ram)
  58. {
  59. . = ALIGN(4);
  60. _start_data = .;
  61. *(.data)
  62. *(.data*)
  63. _end_data = .;
  64. } >CCM
  65.  
  66. /* Unintialized data section */
  67. .bss (NOLOAD) :
  68. {
  69. . = ALIGN(4);
  70. _start_bss = .;
  71. *(.bss)
  72. *(.bss*)
  73. *(COMMON)
  74. _end_bss = .;
  75. } >CCM
  76.  
  77. /* Use this code to check that there is at least 4KB left for the stack */
  78. ._stack :
  79. {
  80. . = ALIGN(4);
  81. . = . + _min_stack_size;
  82. . = ALIGN(4);
  83. } >CCM
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement