generic_gcc_nrf52.ld 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /* Linker script to configure memory regions. */
  2. SEARCH_DIR(.)
  3. GROUP(-lgcc -lc -lnosys)
  4. MEMORY
  5. {
  6. FLASH (rx) : ORIGIN = 0x2d000, LENGTH = 0x53000
  7. RAM (rwx) : ORIGIN = 0x20001f30, LENGTH = 0xe0d0
  8. }
  9. SECTIONS
  10. {
  11. }
  12. SECTIONS
  13. {
  14. . = ALIGN(4);
  15. .mem_section_dummy_ram :
  16. {
  17. }
  18. .cli_sorted_cmd_ptrs :
  19. {
  20. PROVIDE(__start_cli_sorted_cmd_ptrs = .);
  21. KEEP(*(.cli_sorted_cmd_ptrs))
  22. PROVIDE(__stop_cli_sorted_cmd_ptrs = .);
  23. } > RAM
  24. .fs_data :
  25. {
  26. PROVIDE(__start_fs_data = .);
  27. KEEP(*(.fs_data))
  28. PROVIDE(__stop_fs_data = .);
  29. } > RAM
  30. .log_dynamic_data :
  31. {
  32. PROVIDE(__start_log_dynamic_data = .);
  33. KEEP(*(SORT(.log_dynamic_data*)))
  34. PROVIDE(__stop_log_dynamic_data = .);
  35. } > RAM
  36. .log_filter_data :
  37. {
  38. PROVIDE(__start_log_filter_data = .);
  39. KEEP(*(SORT(.log_filter_data*)))
  40. PROVIDE(__stop_log_filter_data = .);
  41. } > RAM
  42. } INSERT AFTER .data;
  43. SECTIONS
  44. {
  45. .mem_section_dummy_rom :
  46. {
  47. }
  48. .sdh_ant_observers :
  49. {
  50. PROVIDE(__start_sdh_ant_observers = .);
  51. KEEP(*(SORT(.sdh_ant_observers*)))
  52. PROVIDE(__stop_sdh_ant_observers = .);
  53. } > FLASH
  54. .sdh_ble_observers :
  55. {
  56. PROVIDE(__start_sdh_ble_observers = .);
  57. KEEP(*(SORT(.sdh_ble_observers*)))
  58. PROVIDE(__stop_sdh_ble_observers = .);
  59. } > FLASH
  60. .sdh_soc_observers :
  61. {
  62. PROVIDE(__start_sdh_soc_observers = .);
  63. KEEP(*(SORT(.sdh_soc_observers*)))
  64. PROVIDE(__stop_sdh_soc_observers = .);
  65. } > FLASH
  66. .sdh_stack_observers :
  67. {
  68. PROVIDE(__start_sdh_stack_observers = .);
  69. KEEP(*(SORT(.sdh_stack_observers*)))
  70. PROVIDE(__stop_sdh_stack_observers = .);
  71. } > FLASH
  72. .sdh_req_observers :
  73. {
  74. PROVIDE(__start_sdh_req_observers = .);
  75. KEEP(*(SORT(.sdh_req_observers*)))
  76. PROVIDE(__stop_sdh_req_observers = .);
  77. } > FLASH
  78. .sdh_state_observers :
  79. {
  80. PROVIDE(__start_sdh_state_observers = .);
  81. KEEP(*(SORT(.sdh_state_observers*)))
  82. PROVIDE(__stop_sdh_state_observers = .);
  83. } > FLASH
  84. .nrf_queue :
  85. {
  86. PROVIDE(__start_nrf_queue = .);
  87. KEEP(*(.nrf_queue))
  88. PROVIDE(__stop_nrf_queue = .);
  89. } > FLASH
  90. .nrf_balloc :
  91. {
  92. PROVIDE(__start_nrf_balloc = .);
  93. KEEP(*(.nrf_balloc))
  94. PROVIDE(__stop_nrf_balloc = .);
  95. } > FLASH
  96. .cli_command :
  97. {
  98. PROVIDE(__start_cli_command = .);
  99. KEEP(*(.cli_command))
  100. PROVIDE(__stop_cli_command = .);
  101. } > FLASH
  102. .crypto_data :
  103. {
  104. PROVIDE(__start_crypto_data = .);
  105. KEEP(*(SORT(.crypto_data*)))
  106. PROVIDE(__stop_crypto_data = .);
  107. } > FLASH
  108. .pwr_mgmt_data :
  109. {
  110. PROVIDE(__start_pwr_mgmt_data = .);
  111. KEEP(*(SORT(.pwr_mgmt_data*)))
  112. PROVIDE(__stop_pwr_mgmt_data = .);
  113. } > FLASH
  114. .log_const_data :
  115. {
  116. PROVIDE(__start_log_const_data = .);
  117. KEEP(*(SORT(.log_const_data*)))
  118. PROVIDE(__stop_log_const_data = .);
  119. } > FLASH
  120. .log_backends :
  121. {
  122. PROVIDE(__start_log_backends = .);
  123. KEEP(*(SORT(.log_backends*)))
  124. PROVIDE(__stop_log_backends = .);
  125. } > FLASH
  126. } INSERT AFTER .text
  127. INCLUDE "nrf_common.ld"