Advertisement
teplofizik

stm32f0.ld (f0ledblinkgnu)

Nov 9th, 2012
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. /* Entry Point */
  2. ENTRY( Reset_Handler )
  3.  
  4. /* Highest address of the user mode stack */
  5. _estack = 0x20002000; /* end o f 8K RAM */
  6.  
  7. /* Generate a link error if heap and stack don’t fit int o RAM */
  8. _Min_Heap_Size = 0; /* required amount of heap */
  9. _Min_Stack_Size = 0x200; /* required amount of stack */
  10.  
  11. MEMORY
  12. {
  13. sram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K
  14. flash (rx) : ORIGIN = 0x08000000, LENGTH = 64K
  15. }
  16. SECTIONS
  17. {
  18. . = 0x08000000; /* From 0x08000000 */
  19.  
  20. /* for Cortex devices, the beginning of the startup code is stored in the .isr_vector section, which goes to FLASH */
  21. .isr_vector :
  22. {
  23. . = ALIGN(4);
  24. KEEP(*(.isr_vector)) /* Startup code */
  25. . = ALIGN(4);
  26. } >flash
  27.  
  28. .text :
  29. {
  30. . = ALIGN(4);
  31. *(.text) /* Program code */
  32. *(.text.*)
  33. *(.rodata) /* Read only data */
  34. *(.rodata.*)
  35. *(.glue_7)
  36. *(.glue_7t)
  37.  
  38. . = ALIGN(4);
  39. _etext = .;
  40. /* This is used by the startup in order to initialize the .data secion */
  41. _sidata = _etext;
  42. } >flash
  43.  
  44. . = 0x20000000; /* From 0x20000000 */
  45. .data : AT (_sidata)
  46. {
  47. . = ALIGN(4);
  48. _sdata = . ;
  49.  
  50. *(.data) /* Data memory */
  51. *(.data.*)
  52.  
  53. . = ALIGN(4);
  54. _edata = . ;
  55. } >sram
  56.  
  57. .bss :
  58. {
  59. . = ALIGN(4);
  60.  
  61. _sbss = . ;
  62. *(.bss) /* Zero-filled run time allocate data memory */
  63. *(COMMON)
  64.  
  65. _ebss = . ;
  66. } >sram
  67.  
  68. PROVIDE ( end = _ebss );
  69. PROVIDE ( _end = _ebss );
  70.  
  71.  
  72. /* This is the user stack section
  73. This is just to check that there is enough RAM left for the User mode stack
  74. It should generate an error if it's full.
  75. */
  76. ._usrstack :
  77. {
  78. . = ALIGN(4);
  79. _susrstack = . ;
  80.  
  81. . = . + _Min_Stack_Size ;
  82.  
  83. . = ALIGN(4);
  84. _eusrstack = . ;
  85. } > sram
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement